/* =====================================================================
   EngageSAE Console theme — BASE
   ---------------------------------------------------------------------
   Re-skins the Bootstrap classes the application already emits, so pages
   inherit the theme without any markup change. This is the layer that
   reaches ~460 pages, and therefore the riskiest one — it is kept in its
   own file so it can be reviewed, gated and reverted independently.

   SCOPING
   -------
   Every rule is prefixed `.engage-console` — the class the masters put on
   <body>. Removing that one class disables the theme site-wide, which is
   the kill switch. Keep to ONE class of nesting past the prefix so a page
   can still override a rule with `body.engage-console ...`; anything
   deeper belongs in a page-scoped block in components.css.

   Bootstrap note: this app loads Bootstrap 3 *and* (via plugins.css) the
   Bootstrap 4 based admin template, so `.panel*` (BS3) and `.card*` (BS4)
   both occur. Rules below cover both vocabularies together so a shared
   user control renders the same under either master.
   ===================================================================== */

/* ============================ TYPOGRAPHY ============================ */

.engage-console {
    /* Poppins arrives via a Google Fonts @import inside style.css and has
       no fallback there; if that request fails every page renders in the
       browser default serif. Give it a real stack. No !important — the
       point of the theme is to stop fighting the cascade. */
    font-family: var(--v3-font);
    color: var(--v3-ink);
}

/* style.css (the BS4 template) sets `h1..h6 { font-family: Poppins }` with
   no fallback. An element rule beats inheritance from the body whatever
   the specificity, so headings ignored the stack above and dropped to the
   browser default serif whenever the Google Fonts request failed. */
.engage-console h1,
.engage-console h2,
.engage-console h3,
.engage-console h4,
.engage-console h5,
.engage-console h6 {
    font-family: var(--v3-font);
}

    .engage-console h1,
    .engage-console h2,
    .engage-console h3,
    .engage-console h4 {
        color: var(--v3-navy);
        font-weight: 800;
    }

    .engage-console h2 {
        font-size: 22px;
    }

    .engage-console strong {
        font-weight: 700;
    }

    .engage-console small {
        color: var(--v3-muted);
        font-size: 12px;
    }

    .engage-console .text-success {
        color: var(--v3-success);
        font-weight: 600;
    }

    .engage-console .text-primary {
        color: var(--v3-blue);
    }

    /* ========================= CARDS (BS4) + PANELS (BS3) =========================
   `.card-body` is defined NOWHERE in the Engage3 stylesheet chain, so the
   ~400 pages built as <div class="card"><div class="card-body"> currently
   render with no padding at all. Defining it here is the single highest
   leverage rule in the theme — and it is additive, not an override. */

    .engage-console .card,
    .engage-console .panel {
        background: var(--v3-card);
        border: 1px solid var(--v3-line);
        border-radius: var(--v3-radius);
        box-shadow: var(--v3-shadow-card);
        margin-bottom: 20px;
        /* NOTE: deliberately NO `overflow: hidden`. The prototype clipped the
       panel so the heading's corners would round, but that also clips
       every absolutely-positioned child — Bootstrap dropdowns, jQuery UI
       autocomplete, the DateTimePicker popup and selectize menus, all of
       which are used heavily inside panels. Corners are rounded on the
       heading itself instead (below). */
    }

    .engage-console .card-body,
    .engage-console .panel-body {
        padding: 20px 22px;
    }

    /* Shared heading chrome. Backgrounds are set per-type below. */
    .engage-console .card-header,
    .engage-console .panel-heading,
    .engage-console .panel-heading.white {
        font-weight: 700;
        font-size: 15px;
        padding: 15px 18px;
        border-top-left-radius: var(--v3-radius-inner);
        border-top-right-radius: var(--v3-radius-inner);
    }

        /* Bare `.panel-heading` keeps the light treatment. In practice every
   panel now carries `.panel-primary`, which overrides this below, but a
   heading outside one still needs a sane default. */
        .engage-console .panel-heading,
        .engage-console .panel-heading.white {
            background: linear-gradient(130deg, #ffffff 0%, #eef3f9 100%);
            color: var(--v3-navy);
            border-bottom: 1px solid var(--v3-line);
        }

        /* `.card-header` uses the .v3-banner gradient, matching
   `.panel-primary > .panel-heading` so cards and panels read alike.

   `.bg-white` is honoured as a deliberate opt-out — three headers pair
   it with `.no-border` to sit flush against the card body, and painting
   those blue would defeat the point. Excluding via :not() also keeps the
   white-text rules below off them, so they never go white-on-white. */
        .engage-console .card-header:not(.bg-white) {
            background: linear-gradient(130deg, var(--v3-navy) 0%, var(--v3-blue) 60%, var(--v3-blue-2) 100%);
            color: #fff;
            border-bottom: none;
        }

/* Text nested inside a dark heading has to come with it. Bootstrap gives
   `.panel-title` `color: inherit`, but the theme's
   `.engage-console h1-h4 { color: var(--v3-navy) }` is (0,1,1) and beats
   it — so an <h3 class="panel-title"> rendered navy on the blue gradient
   and was unreadable (ImpersonateUser.aspx).

   Rather than enumerate every element that might appear, make descendants
   inherit the heading's white. `.btn`, `.badge` and `.label` are excluded
   because they carry their own foreground, and form controls because an
   <input> would end up white-on-white.

   Applies to all three dark heading surfaces in this section. */
.engage-console .card-header:not(.bg-white) *:not(.btn):not(.badge):not(.label):not(input):not(select):not(textarea):not(.form-control),
.engage-console .panel-primary > .panel-heading:not(.bg-white) *:not(.btn):not(.badge):not(.label):not(input):not(select):not(textarea):not(.form-control),
.engage-console .panel-heading.bg-primary *:not(.btn):not(.badge):not(.label):not(input):not(select):not(textarea):not(.form-control) {
    color: #fff;
}

/* panels.css paints `.panel-title { background: silver; height: 16px }`,
   which drew a grey bar across the heading and clipped the text.
   ImpersonateUser.ascx carries a local !important hack to undo it; with
   this in the theme that page-level workaround is redundant. */
/* `.bg-white` opts a heading out of the brand fill — same convention as
   `.card-header`. Declared explicitly rather than leaning on Bootstrap's
   `.bg-white { background-color: #fff !important }`, because that sets a
   background-COLOR and a gradient background-IMAGE would still paint over
   it. Used by SP/SponsorDisplayTile.ascx, whose heading holds a sponsor's
   promotional graphic and must sit on white. */
.engage-console .panel-heading.bg-white {
    background: #fff;
    color: var(--v3-ink);
    border-bottom: 1px solid var(--v3-line);
}

.engage-console .panel-heading .panel-title,
.engage-console .card-header .panel-title {
    background: none;
    height: auto;
}


        /* A panel heading explicitly painted `.bg-primary` keeps that intent;
   BS4 declares `.bg-primary` !important so the colour wins on its own,
   and we only fix the foreground. `.card-header` is no longer listed
   here — it now takes the gradient above like every other card. */
        .engage-console .panel-heading.bg-primary {
            background-image: none;
            color: #fff;
            border-bottom: none;
        }

    /* BS3 `.panel-primary` header. Painted with the same gradient as
   `.v3-banner` in components.css so the two read as one family — keep
   them in step if either changes. The `background` shorthand is
   deliberate: it clears the `background-color` BS3 sets, which a bare
   `background-image` would leave showing through. */
    .engage-console .panel-primary > .panel-heading:not(.bg-white) {
        background: linear-gradient(130deg, var(--v3-navy) 0%, var(--v3-blue) 60%, var(--v3-blue-2) 100%);
        color: #fff;
        border-bottom: none;
    }

    /* ============================== BUTTONS ==============================
   Bootstrap 3 has no .btn-secondary / .btn-light / .btn-outline-*, and
   the BS4 template does not define them either — so today 261 uses of
   `btn-secondary` across the app render as bare, unstyled buttons.
   These are new definitions, not overrides. */

    .engage-console .btn {
        border-radius: var(--v3-radius-sm);
        font-weight: 600;
        font-size: 13.5px;
        padding: 9px 16px;
        box-shadow: none;
    }

    .engage-console .btn-primary {
        background-color: var(--v3-blue);
        border: 1px solid var(--v3-blue);
        color: #fff;
    }

        .engage-console .btn-primary:hover,
        .engage-console .btn-primary:focus {
            background-color: var(--v3-navy);
            border-color: var(--v3-navy);
            color: #fff;
        }

    /* Neutral / outline buttons — previously unstyled. */
    .engage-console .btn-default,
    .engage-console .btn-light {
        background-color: #fff;
        border: 1px solid var(--v3-line);
        color: var(--v3-ink);
    }

    .engage-console .btn-secondary {
        background-color: rgba(227, 227, 226, .8);
        border: 1px solid var(--v3-line);
        color: var(--v3-ink);
    }

        .engage-console .btn-secondary:hover,
        .engage-console .btn-secondary:focus,
        .engage-console .btn-default:hover,
        .engage-console .btn-light:hover {
            background-color: #f2f7fd;
            border-color: #bcd2ee;
            color: var(--v3-navy);
        }

    .engage-console .btn-outline-primary,
    .engage-console .btn-outline-secondary {
        background-color: transparent;
        border: 1px solid var(--v3-blue);
        color: var(--v3-blue);
    }

        .engage-console .btn-outline-primary:hover,
        .engage-console .btn-outline-secondary:hover {
            background-color: var(--v3-blue);
            color: #fff;
        }

    .engage-console .btn-danger {
        background-color: #b2413b;
        border: 1px solid #f0c9c9;
        color: #fff;
    }

        .engage-console .btn-danger:hover {
            background-color: #fdf1f1;
            border-color: #e3a9a9;
            color: #8f302b;
        }

    .engage-console .btn-info {
        background-color: #fff;
        border: 1px solid #cdeee6;
        color: var(--v3-ink);
    }

        .engage-console .btn-info:hover {
            border-color: #9fdcca;
        }

    .engage-console .btn-lg {
        font-size: 15px;
        padding: 12px 20px;
        border-radius: 12px;
    }

    .engage-console .btn-sm {
        font-size: 12.5px;
        padding: 6px 12px;
        border-radius: 9px;
    }

    .engage-console .btn-block {
        display: block;
        width: 100%;
    }

/* A button that leads with a `.badge` — SponsorDisplayTile's "Connect
   with Sponsor" carries the sponsor's goal as a pill. The control used
   Bootstrap's `.pull-left`, whose `float: left !important` pulled the
   badge out of flow so it collided with the label. That float is gone
   from the control; this lays the pair out as a centred row instead.

   Scoped to an opt-in class rather than every `.btn` — switching 261
   buttons to inline-flex to fix one is not a trade worth making. */
.engage-console .btn-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.engage-console .btn-badge .badge {
    float: none;   /* belt and braces, in case .pull-left returns */
    margin: 0;
    flex: 0 0 auto;
    background: #fff;
    color: var(--v3-blue);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 999px;
    text-shadow: none;
}

    /* Round the OUTSIDE of a button group to the theme radius. Bootstrap
   squares every corner where two buttons meet, which is right — this is
   a segmented control and the joins should stay flush — but it left the
   four outer corners at the plain button radius, so the group read as
   squarer than the panels and breadcrumbs around it.

   Only the outer corners are touched, so this never fights Bootstrap's
   inner-join rules. It must stay ABOVE the mobile block below: there the
   group wraps and every button gets its full radius back, and that rule
   matches at the same specificity, so it has to come later to win. */
    .engage-console .btn-group > .btn:first-child,
    .engage-console .btn-group > .btn-group:first-child > .btn:first-child {
        border-top-left-radius: var(--v3-radius);
        border-bottom-left-radius: var(--v3-radius);
    }

    .engage-console .btn-group > .btn:last-child,
    .engage-console .btn-group > .btn-group:last-child > .btn:last-child {
        border-top-right-radius: var(--v3-radius);
        border-bottom-right-radius: var(--v3-radius);
    }

/* ---------- Mobile: every button renders at .btn-lg size ----------
   Below the Bootstrap `sm` breakpoint every button — whatever size
   class it carries — takes the .btn-lg metrics, for thumb-sized touch
   targets. 767.98px is the shared boundary: it is BS3's `xs` ceiling
   and BS4's `md` floor, so it lines up on both masters.

   Listing .btn-xs/.btn-sm/.btn-lg explicitly is required. They match at
   the same (0,2,0) specificity as `.engage-console .btn`, so a bare
   `.btn` rule here would lose the tie to the size classes above. This
   block sits after them, so on an equal-specificity tie it wins.

   .btn-xs and .btn-sm are still worth covering even though no Engage
   markup uses them any more: bootstrap-select, footable, x-editable,
   daterangepicker and clockpicker all emit `btn-sm` at runtime. */
@media (max-width: 767.98px) {
    .engage-console .btn,
    .engage-console .btn-xs,
    .engage-console .btn-sm,
    .engage-console .btn-lg {
        font-size: 15px;
        padding: 12px 20px;
        border-radius: 12px;
    }

    /* Keep an input-group's button aligned with its field. BS3 lays the
       group out as a table and BS4 as a flex row, so both stretch the
       field to the taller button — but the text inside would still sit
       a point smaller than the button's. Match them up. */
    .engage-console .input-group .form-control {
        font-size: 15px;
    }

    /* A .btn-group of full-size buttons overflows a phone viewport — the
       Inbox toolbar (Inbox / Sent Items / My Preferences) is ~360px at
       this size, wider than a 375px screen. Let the group wrap.

       Once it wraps, the joined-corner styling has to go too, or the
       detached buttons keep their squared-off inner edges. Bootstrap
       squares them at (0,5,0) via stacked :not()s, so the restore has to
       repeat that shape behind `.engage-console` to reach (0,6,0). */
    .engage-console .btn-group,
    .engage-console .btn-group-vertical {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 4px;
    }

        .engage-console .btn-group > .btn,
        .engage-console .btn-group > .btn-group > .btn {
            float: none;
        }

            /* Restore the radius Bootstrap strips to join the buttons together.
       Each selector below mirrors a real Bootstrap rule with
       `.engage-console` prepended — that added class is what wins the
       cascade. Matching the shapes exactly is deliberate: BS squares
       these at up to (0,6,0), so a simpler `.btn-group > .btn` rule
       silently loses and the corners stay square. Verified against the
       CSSOM of a rendered page rather than assumed. */
            .engage-console .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle),
            .engage-console .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle),
            .engage-console .btn-group > .btn:last-child:not(:first-child),
            .engage-console .btn-group > .dropdown-toggle:not(:first-child),
            .engage-console .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn,
            .engage-console .btn-group > .btn-group:first-child > .btn:last-child,
            .engage-console .btn-group > .btn-group:first-child > .dropdown-toggle,
            .engage-console .btn-group > .btn-group:last-child > .btn:first-child,
            .engage-console .btn-group-vertical > .btn:not(:first-child):not(:last-child),
            .engage-console .btn-group-vertical > .btn:first-child:not(:last-child),
            .engage-console .btn-group-vertical > .btn:last-child:not(:first-child),
            .engage-console .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn,
            .engage-console .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
            .engage-console .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle,
            .engage-console .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
                border-radius: 12px;
            }

            /* Undo the -1px border collapse; with a gap it just misaligns. */
            .engage-console .btn-group > .btn + .btn,
            .engage-console .btn-group > .btn + .btn-group,
            .engage-console .btn-group > .btn-group + .btn {
                margin-left: 0;
            }
}

/* =============================== FORMS =============================== */

.engage-console .form-group {
    margin-bottom: 16px;
}

.engage-console .form-control,
.engage-console select.form-control,
.engage-console textarea.form-control {
    border: 1px solid var(--v3-line);
    border-radius: var(--v3-radius-sm);
    min-height: 42px;
    max-width: 100%;
    font-size: 14px;
    color: var(--v3-ink);
    box-shadow: none;
    background-color: #fff;
    padding: 8px 12px;
}

    .engage-console .form-control:focus {
        border-color: #9dc3ef;
        box-shadow: var(--v3-focus-ring);
    }

.engage-console .help-block {
    font-size: 13px;
    line-height: 1.55;
    color: var(--v3-muted);
}

/* Labels: normal case at body size.
   NOT-GLOBALISED counterpart below — the prototype's compact uppercase
   label is intentionally NOT applied site-wide. ASP.NET emits a <label>
   for every CheckBox / RadioButtonList / CheckBoxList item, so uppercasing
   globally would shout long sentence-case option text on hundreds of
   pages. (The prototype already needed three separate un-shout
   exceptions to survive on 17 pages.) */
.engage-console label {
    font-size: 14px;
    font-weight: 700;
    color: var(--v3-ink);
    margin-bottom: 6px;
}

/* Validation messages. ASP.NET validators render as <span> with the
   control id in them, hence the attribute selectors. */
.engage-console .text-danger,
.engage-console span[id*="rfv"],
.engage-console span[id*="Validator"] {
    color: var(--v3-danger);
    font-weight: 700;
    font-size: 12px;
}

.engage-console .help-block.text-danger {
    color: var(--v3-danger);
}

/* Checkbox / radio lists — keep option text readable. */
.engage-console .checkbox label,
.engage-console .radio label,
.engage-console .styled label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--v3-ink);
    margin: 4px 0;
}

.engage-console .styled td {
    padding: 4px 10px 4px 0;
    vertical-align: middle;
}

.engage-console .styled input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--v3-blue);
}

/* Selectize (country / state pickers). */
.engage-console .selectize-input {
    border: 1px solid var(--v3-line);
    border-radius: var(--v3-radius-sm);
    min-height: 42px;
    box-shadow: none;
    padding: 8px 12px;
    font-size: 14px;
}

    .engage-console .selectize-input.focus {
        border-color: #9dc3ef;
        box-shadow: var(--v3-focus-ring);
    }

.engage-console .selectize-dropdown {
    border-radius: var(--v3-radius-sm);
    border: 1px solid var(--v3-line);
    box-shadow: 0 12px 30px rgba(16, 40, 70, .14);
}

/* BOOTSTRAP 3 / 4 BRIDGE — attached input-group buttons.

   Bootstrap 4 turns `.input-group` into a flex container but renamed the
   button wrapper to `.input-group-append`, so it declares nothing at all
   for Bootstrap 3's `.input-group-btn`. Bootstrap 3's own
   `.input-group-btn { width: 1% }` — meant for a table-cell — then applies
   to a flex item and collapses the span to about 3px, leaving its button
   hanging outside the group and, in a narrow cell, off the page.

   Six controls still emit the Bootstrap 3 markup: GEN/ProcessAutocomplete,
   LL/AddRemoveRoles, LT/FunderRepManage, res/CompetitionResults,
   rpt/LateNoteInline and SP/RequestedSubmissionEdit. Sizing the wrapper to
   its content restores the attached-button layout for all of them.

   Delete this block if those controls are moved to `.input-group-append`. */
.engage-console .input-group-btn {
    width: auto;
    display: flex;
    align-items: stretch;
}

/* The BS4 admin template paints EVERY appended input-group button grey:

       master_dependencies/css/style.css:1417
       .input-group-btn:last-child > .btn { background: #eee; border: 1px solid #dfdfdf; ... }

   It is written for a plain search-box button, but at (0,3,0) it outranks
   `.engage-console .btn-primary` (0,2,0) and repaints any contextual button
   put in an input-group. A Save button rendered grey with the theme's white
   label — near-invisible — then flipped to blue on hover, because the
   template sets no hover and `.btn-primary:hover` came back through.

   Restoring the contextual colours at matching specificity (and winning on
   load order, since base.css follows style.css) lets the button's own class
   paint it. `.btn-primary` is the only contextual class used this way today;
   the rest are listed so a future one does not silently go grey. */
.engage-console .input-group-btn > .btn-primary {
    background-color: var(--v3-blue);
    border-color: var(--v3-blue);
}

    .engage-console .input-group-btn > .btn-primary:hover,
    .engage-console .input-group-btn > .btn-primary:focus {
        background-color: var(--v3-navy);
        border-color: var(--v3-navy);
    }

.engage-console .input-group-btn > .btn-danger {
    background-color: #b2413b;
    border-color: #f0c9c9;
}

    .engage-console .input-group-btn > .btn-danger:hover,
    .engage-console .input-group-btn > .btn-danger:focus {
        background-color: #fdf1f1;
        border-color: #e3a9a9;
    }

/* =============================== TABLES ===============================
   Deliberately conservative. The prototype used 12px cell padding, a bold
   navy first column and `width: 100% !important`, all tuned for short
   8-row lists. Applied to the many 30-row x 15-column grids in this app
   that roughly doubles table height, bolds what is often a checkbox or
   row number, and breaks fixed-layout report tables. Use the opt-in
   `.table-dense` class where a grid genuinely needs tighter rows. */

.engage-console table.table {
    border: none;
    margin: 12px 0 0;
    background: transparent;
}

    .engage-console table.table thead th {
        background: transparent;
        border: none;
        border-bottom: 2px solid var(--v3-line);
        color: var(--v3-muted);
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: .4px;
        /*font-weight: 700;*/
        padding: 8px 10px;
        white-space: nowrap;
    }

        .engage-console table.table thead th small {
            text-transform: none;
            letter-spacing: 0;
            font-weight: 500;
        }

    /* An explicit blue thead stays blue and readable. */
    .engage-console table.table thead.bg-primary th {
        background: transparent;
        color: #fff;
        border-bottom: none;
        text-transform: none;
        letter-spacing: normal;
    }

        .engage-console table.table thead.bg-primary th small {
            color: #fff;
        }

    .engage-console table.table tbody td {
        border: none;
        border-bottom: 1px solid var(--v3-line);
        padding: 8px 10px;
        font-size: 13.5px;
        color: var(--v3-ink);
        vertical-align: middle;
    }

    .engage-console table.table.table-striped tbody tr:nth-of-type(odd) {
        background: rgba(247, 249, 252, .7);
    }

    .engage-console table.table.table-hover tbody tr:hover {
        background: #eef5ff;
    }

    .engage-console table.table .btn {
        white-space: nowrap;
    }

        .engage-console table.table .btn + .btn {
            margin-left: 6px;
        }

    /* Opt-in escape hatch for genuinely dense grids. */
    .engage-console table.table.table-dense tbody td,
    .engage-console table.table.table-dense thead th {
        padding: 4px 6px;
        font-size: 12.5px;
    }

/* ---------- Stacked tables on mobile ----------
   `table-responsive` does two unrelated jobs in this app:

     as a WRAPPER div  -> Bootstrap's horizontal-scroll container
     on the TABLE      -> CdsWeb.css's stacked-card pattern, which hides
                          the thead and turns every cell into a block

   17 controls use both at once, nesting `<table class="table
   table-responsive">` inside `<div class="table-responsive">`. That
   satisfies Bootstrap 3's

       .table-responsive > .table > tbody > tr > td { white-space: nowrap }

   so on a phone every stacked cell refuses to wrap. A long first-column
   title then sets the table's width far beyond the card, and because
   Engage3Overrides.css forces `.table-responsive { display: table
   !important }` the wrapper is no longer a scroll container either — so
   the row is simply clipped at the card's edge with nothing to scroll.

   Cells that have been turned into blocks are not laid out by the table
   algorithm and never needed nowrap; restoring normal wrapping is enough,
   and it is scoped to the stacking table so ordinary scrolling tables
   keep Bootstrap's behaviour. */
@media (max-width: 768px) {
    .engage-console table.table-responsive > tbody > tr > td,
    .engage-console table.table-responsive > tfoot > tr > td {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ========================= DATATABLES CHROME ========================= */

.engage-console .dataTables_wrapper {
    padding-top: 4px;
}

.engage-console .dataTables_filter {
    margin-bottom: 6px;
}

    .engage-console .dataTables_filter input,
    .engage-console .dataTables_length select {
        border: 1px solid var(--v3-line);
        border-radius: 10px;
        height: 38px;
        padding: 0 12px;
        font-size: 13px;
        color: var(--v3-ink);
    }

        .engage-console .dataTables_filter input:focus {
            border-color: #9dc3ef;
            box-shadow: var(--v3-focus-ring);
            outline: none;
        }

.engage-console .dataTables_info {
    color: var(--v3-muted);
    font-size: 12.5px;
    padding-top: 12px;
}

.engage-console .dataTables_paginate .paginate_button {
    /*    border-radius: 9px;
    border: 1px solid var(--v3-line);*/
    padding: 5px 11px;
    margin: 0 2px;
    color: var(--v3-ink);
    background: #fff;
}

    .engage-console .dataTables_paginate .paginate_button.current {
        background: var(--v3-blue);
        border-color: var(--v3-blue);
        color: #fff;
    }

    .engage-console .dataTables_paginate .paginate_button:hover {
        background: #f2f7fd;
        border-color: #bcd2ee;
        color: var(--v3-navy);
    }
/* Keep the length <select> from stretching (was in Engage3Overrides). */
.engage-console div.dataTables_wrapper div.dataTables_length select {
    width: 75px;
    display: inline-block;
}

/* =============================== ALERTS =============================== */

.engage-console .alert {
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    padding: 12px 14px;
}

.engage-console .alert-warning {
    background: var(--v3-warning-bg);
    border-color: var(--v3-warning-line);
    color: var(--v3-warning);
}

.engage-console .alert-danger {
    background: var(--v3-danger-bg);
    border-color: var(--v3-danger-line);
    color: var(--v3-danger);
}

.engage-console .alert-info {
    background: var(--v3-info-bg);
    border-color: var(--v3-info-line);
    color: var(--v3-info);
}

.engage-console .alert-success {
    background: var(--v3-success-bg);
    border-color: var(--v3-success-line);
    color: var(--v3-success);
}

/* ============================= BREADCRUMBS ============================= */

/* Bootstrap 3 ships `.breadcrumb { border-radius: 4px }`, which left the
   "Go Back To:" bar with near-square corners sitting directly above
   18px-rounded cards. Nothing else in the app styles `.breadcrumb`, so
   this single rule is the whole treatment.

   Shared by all three breadcrumb controls, which emit the same class:
   vol/VolBreadcrumbs.ascx (141 pages), cst/CSTBreadcrumbs.ascx (25) and
   DPR/DprBreadcrumbs.ascx (2). */
.engage-console .breadcrumb {
    border-radius: var(--v3-radius);
}

/* ============================== MODALS ==============================

   BOOTSTRAP 3 / 4 BRIDGE — without this, no modal on an Engage3.master
   page is ever visible.

   Engage3.master loads Bootstrap 3.2.0's CSS and JS, then (line 35)
   `/master_dependencies/css/plugins.css`, whose first line is
   `@import "bootstrap.min.css"` — and that sibling file is Bootstrap
   v4.5.0. So BS4's CSS lands on top of BS3's while the page still runs
   BS3's JavaScript.

   The two frameworks disagree on which class means "shown": BS3's JS adds
   `.in`, BS4's CSS only reveals on `.show`. BS4 therefore keeps every
   opened modal at `opacity: 0` and leaves its dialog translated up 50px:

       .fade:not(.show) { opacity: 0 }                        (0,2,0)
       .modal.fade .modal-dialog { transform: translate(0,-50px) }

   The symptom is a modal that "doesn't open" even though Bootstrap ran:
   the backdrop is in the DOM and <body> gets `modal-open`, so the page
   scrollbar disappears, but nothing is drawn. It affects every `.fade`
   component BS3 toggles with `.in` — modals, tab panes, alerts, popovers.

   Restoring BS3's reveal is enough; the `.engage-console` prefix puts
   these at (0,3,0)/(0,4,0) so they outrank the BS4 rules on specificity
   rather than relying on file order. They match only when `.in` is
   present, so they are inert on Engage4.master, which runs BS4's JS.

   Delete this block if plugins.css ever stops importing Bootstrap 4. */

.engage-console .fade.in {
    opacity: 1;
}

.engage-console .modal.in .modal-dialog {
    -webkit-transform: none;
    transform: none;
}

/* BS3's backdrop opacity, which `.fade:not(.show)` also zeroes — without
   it the page behind an open modal is never dimmed. */
.engage-console .modal-backdrop.in {
    opacity: .5;
}

/* Collapse is the same collision as `.fade` above and needs the same
   bridge: BS3 reveals with `.collapse.in { display: block }`, BS4 hides
   with `.collapse:not(.show) { display: none }` at equal specificity and
   later in the cascade. A panel toggled by BS3's JS therefore gained `.in`
   and stayed `display: none` — it never opened at all, which reads as a
   section that snaps shut the moment you expand it.

   The table variants are BS3's; a collapsed <tr>/<tbody> has to go back to
   its table display value, not `block`. */
.engage-console .collapse.in {
    display: block;
}

.engage-console tr.collapse.in {
    display: table-row;
}

.engage-console tbody.collapse.in {
    display: table-row-group;
}

.engage-console .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(16, 40, 70, .28);
}

/* Title left, close right — regardless of which order the markup puts them
   in. The app has both conventions: 26 modals write the title first (the
   Bootstrap 4 order) and 13 write the close button first (the Bootstrap 3
   order, e.g. reg/RegistrationDashboard, reg/CompetitionRoster,
   SP/UpdateStudentProfile).

   Bootstrap 4's header is a flex row and its close button carries
   `margin: -1rem -1rem -1rem auto`. On a flex item that `margin-left: auto`
   absorbs the free space, pushing the button AND everything after it to the
   right — so the close-first modals rendered as a right-aligned "✖ Title"
   clump instead of a title on the left with the close in the corner.

   `order` decides the visual arrangement independently of source order, so
   both conventions land in the same place and neither has to be edited. */
.engage-console .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--v3-line);
    padding: 16px 20px;
}

.engage-console .modal-header .modal-title {
    order: 0;
    flex: 1 1 auto;
    margin: 0;
    font-weight: bold;
}

/* Reset BS4's auto margin and oversized padding (both exist to hang the
   button in the header's corner, which `order` now handles), and BS3's
   `top:-2px; right:-21px` nudge, which pushed it outside the header. */
.engage-console .modal-header .close {
    order: 1;
    flex: 0 0 auto;
    float: none;
    position: static;
    margin: 0;
    padding: 0 0 0 12px;
    font-size: 22px;
    line-height: 1;
    color: var(--v3-muted);
    text-shadow: none;
    opacity: 1;
}

.engage-console .modal-header .close:hover,
.engage-console .modal-header .close:focus {
    color: var(--v3-ink);
    opacity: 1;
}

.engage-console .modal-title {
    font-weight: 700;
    color: var(--v3-navy);
    font-size: 16px;
}

.engage-console .modal-body {
    padding: 20px;
    color: var(--v3-ink);
}

.engage-console .modal-footer {
    border-top: 1px solid var(--v3-line);
    padding: 14px 20px;
}

.engage-console .dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--v3-line);
    box-shadow: 0 12px 30px rgba(16, 40, 70, .14);
    padding: 6px;
}

.engage-console .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13.5px;
}

    .engage-console .dropdown-item:hover {
        background: #f2f7fd;
        color: var(--v3-navy);
    }

.engage-console .card > .card-header:last-child,
.engage-console .card > .card-header:has(+ .card-body.p-0) {
    border-bottom-left-radius: var(--v3-radius-inner);
    border-bottom-right-radius: var(--v3-radius-inner);
}

.engage-console .card > .card-body:first-child,
.engage-console .card > .card-footer:first-child {
    border-top-left-radius: var(--v3-radius-inner);
    border-top-right-radius: var(--v3-radius-inner);
}

.engage-console .card > .card-body:last-child,
.engage-console .card > .card-footer:last-child {
    border-bottom-left-radius: var(--v3-radius-inner);
    border-bottom-right-radius: var(--v3-radius-inner);
}

.engage-console .card > .list-group:first-child > .list-group-item:first-child {
    border-top-left-radius: var(--v3-radius-inner);
    border-top-right-radius: var(--v3-radius-inner);
}

.engage-console .card > .list-group:last-child > .list-group-item:last-child {
    border-bottom-left-radius: var(--v3-radius-inner);
    border-bottom-right-radius: var(--v3-radius-inner);
}

.engage-console .card-group > .card:not(:first-child),
.engage-console .card-group > .card:not(:last-child) {
    border-radius: var(--v3-radius);
}

.engage-console .card-group > .card + .card {
    border-left: 1px solid var(--v3-line);
}

.engage-console .card:has(> .card-header:only-child) {
    border: 0;
    background: transparent;
}

.engage-console .card:has(> .card-header:only-child) > .card-header {
    border-radius: var(--v3-radius);
}
