/* =================================================================================================
   DonorBoss — design tokens + type layer   (staff admin: app.donorboss.com)

   THE ONLY PLACE COLOURS LIVE. DESIGN_SYSTEM §2/§7 rule 1: no page ever writes a raw hex, and a
   rebrand is an edit to this file alone.

   Load order:  vendors.min.css -> app.min.css -> THIS FILE

   ── Why this file overrides more than just --ins-primary ──────────────────────────────────────
   Inspinia's compiled CSS is inconsistent about it. `.text-primary` and `.bg-primary` read
   `var(--ins-primary-rgb)` and follow the token, but **`.btn-primary` and `.btn-outline-primary`
   bake the hex in literally** (`--ins-btn-bg:#1ab394`), and the sidenav/topbar hover+active colours
   are hardcoded inside `html[data-menu-color=light]` / `html[data-topbar-color=light]`.

   Setting only `--ins-primary` therefore produces green buttons under a navy sidebar — which is
   exactly the mismatch vHours shipped and DESIGN_SYSTEM §7 rule 2 exists to prevent. Every literal
   was found by grepping the compiled CSS for #1ab394 (76 occurrences) and is overridden below.

   Avoid `!important` here — we set the same custom properties the template does, at equal or higher
   specificity, rather than fighting it.
   ================================================================================================= */

/* ── 1 · Brand ─────────────────────────────────────────────────────────────────────────────────
   From donorboss.svg. Ryan's decision: NAVY is the primary (buttons, links, active nav, focus
   rings); the green is the accent for positive and progress states. */
:root {
    --db-primary:        #19375b;   /* navy — the wordmark */
    --db-primary-rgb:    25, 55, 91;
    --db-primary-hover:  #142c49;
    --db-primary-active: #102341;
    --db-primary-subtle: #e9edf3;   /* tint: active nav background, light badges */
    --db-primary-border: #b9c4d3;

    --db-accent:         #3a6a5a;   /* green — the "$" in the logo */
    --db-accent-rgb:     58, 106, 90;
    --db-accent-subtle:  #eaf1ee;

    /* Semantic set stays Inspinia's — these carry meaning, not brand, and recolouring them to fit
       a palette is how a "success" state stops reading as success. */
    --db-success: #18bb9b;
    --db-info:    #23c6c8;
    --db-warning: #f8ac59;
    --db-danger:  #d96262;

    --db-focus-ring: 0 0 0 3px rgba(var(--db-primary-rgb), .15);
}

/* ── 2 · Map onto Inspinia's tokens ────────────────────────────────────────────────────────────
   Everything that DOES respect var() picks the brand up from here. */
:root,
[data-bs-theme="light"] {
    --ins-primary:               var(--db-primary);
    --ins-primary-rgb:           var(--db-primary-rgb);
    --ins-primary-text-emphasis: var(--db-primary-active);
    --ins-primary-bg-subtle:     var(--db-primary-subtle);
    --ins-primary-border-subtle: var(--db-primary-border);

    --ins-link-color:            var(--db-primary);
    --ins-link-color-rgb:        var(--db-primary-rgb);
    --ins-link-hover-color:      var(--db-primary-hover);
    --ins-link-hover-color-rgb:  var(--db-primary-rgb);
}

/* ── 3 · The literals Inspinia bakes in ────────────────────────────────────────────────────────
   Our configuration is skin=classic, menu-color=light, topbar-color=light, so these three blocks
   are the ones that actually apply. */
html[data-menu-color="light"],
html[data-menu-color="gray"] {
    --ins-sidenav-item-hover-color:  var(--db-primary);
    --ins-sidenav-item-active-color: var(--db-primary);
    --ins-sidenav-item-active-bg:    var(--db-primary-subtle);
}

html[data-topbar-color="light"],
html[data-topbar-color="gray"] {
    --ins-topbar-item-hover-color: var(--db-primary);
}

.btn-primary {
    --ins-btn-bg:                  var(--db-primary);
    --ins-btn-border-color:        var(--db-primary);
    --ins-btn-hover-bg:            var(--db-primary-hover);
    --ins-btn-hover-border-color:  var(--db-primary-hover);
    --ins-btn-active-bg:           var(--db-primary-active);
    --ins-btn-active-border-color: var(--db-primary-active);
    --ins-btn-disabled-bg:         var(--db-primary);
    --ins-btn-disabled-border-color: var(--db-primary);
    --ins-btn-focus-shadow-rgb:    var(--db-primary-rgb);
}

.btn-outline-primary {
    --ins-btn-color:               var(--db-primary);
    --ins-btn-border-color:        var(--db-primary);
    --ins-btn-hover-bg:            var(--db-primary);
    --ins-btn-hover-border-color:  var(--db-primary);
    --ins-btn-active-bg:           var(--db-primary-active);
    --ins-btn-active-border-color: var(--db-primary-active);
    --ins-btn-disabled-color:      var(--db-primary);
    --ins-btn-focus-shadow-rgb:    var(--db-primary-rgb);
}

.nav-pills-primary                                    { --ins-nav-pills-link-active-bg: var(--db-primary); }
.nav-tabs.nav-bordered-primary .nav-item .nav-link.active,
.nav-tabs.nav-bordered-primary .nav-item .nav-link:hover,
.nav-tabs.nav-bordered-primary .nav-item .nav-link:focus { border-bottom-color: var(--db-primary); }

/* A visible focus ring. Inspinia removes the box-shadow on .form-control:focus entirely, which is
   an accessibility regression — keyboard users lose track of where they are. */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--db-primary);
    box-shadow: var(--db-focus-ring);
}

::selection { background: rgba(var(--db-primary-rgb), .15); }

/* Accent helpers — the brand green, for goal thermometers and positive states. */
.text-accent  { color: var(--db-accent) !important; }
.bg-accent    { background-color: var(--db-accent) !important; }
.progress-bar.bg-accent { background-color: var(--db-accent) !important; }


/* ── 4 · Self-hosted Inter ─────────────────────────────────────────────────────────────────────
   DESIGN_SYSTEM §7 rule 5: self-host, no ad-hoc CDN pulls. Google now serves Inter as a VARIABLE
   font, so one file per subset covers 400-700 — 132 KB for both subsets, versus eight static cuts.
   Only latin and latin-ext are shipped; cyrillic/greek/vietnamese are dead weight here. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-var-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-var-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ── 5 · The DonorBoss type layer ──────────────────────────────────────────────────────────────
   Ported verbatim from design-proof/assets/css/donorboss-type.css, which Ryan reviewed live and
   approved (2026-07-26), with the `body.db-type` scope removed now that it is not a toggle.

   Root cause it fixes: Inspinia ships at --ins-body-font-size 0.813rem = 13px, and its components
   HARDCODE 13px paddings and line-heights. That is why stock Inspinia feels small and dated, and
   why a naive body{font-size} bump "looks bad" — the text grows but the components do not. This is
   a COORDINATED SCALE, not a font-size change. Do not deviate casually. */
body {
    --ins-font-sans-serif:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ins-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ins-body-font-size:   0.9375rem;   /* 15px, up from 13px */
    --ins-body-line-height: 1.55;        /* unitless, so line boxes grow WITH the text */
    --ins-font-weight-semibold: 600;

    font-family: var(--ins-body-font-family);
    font-size: 0.9375rem;
    line-height: 1.55;
    letter-spacing: -0.005em;            /* Inter reads cleaner very slightly tightened */
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.page-title { font-size: 1.35rem; font-weight: 700; }
.card-title { font-size: 1.02rem; font-weight: 600; }

/* The components that hardcode 0.813rem — this is the half a naive bump misses. */
p, .side-nav-link, .dropdown-item, .form-control, .form-select, .form-label, label {
    font-size: 0.9375rem;
}

.table { font-size: 0.9rem; }
.table > :not(caption) > * > * { padding: 0.72rem 0.9rem; vertical-align: middle; }
.table thead th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }

.btn      { font-size: 0.9rem; font-weight: 600; padding: 0.5rem 0.95rem; border-radius: 0.4rem; }
.btn-sm   { font-size: 0.82rem; padding: 0.35rem 0.7rem; }
.btn-icon { padding: 0.5rem; }

/* Badges look worst of all under a naive bump — they need real padding, not just bigger text. */
.badge { font-size: 0.76rem; font-weight: 600; padding: 0.42em 0.66em; letter-spacing: 0.01em; }

.form-control, .form-select { padding: 0.55rem 0.85rem; line-height: 1.5; }

.dropdown-item   { padding: 0.5rem 1rem; }
.dropdown-header { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }

.side-nav-link  { padding-top: 0.62rem; padding-bottom: 0.62rem; font-weight: 500; }
.side-nav-title { font-size: 0.7rem; letter-spacing: 0.08em; font-weight: 700; }
.menu-icon i    { font-size: 1.15rem; }

.card-body   { padding: 1.35rem; }
.card-header { padding: 1rem 1.35rem; }

.small, small { font-size: max(0.8rem, 12.5px); }


/* ── 6 · Shared components (DESIGN_SYSTEM §5) ──────────────────────────────────────────────────
   Defined once here rather than re-declared per page — the per-page <style> block with a literal
   hex is the specific drift all three existing LCO apps suffered. */

/* Left-border stat card — the LCO dashboard signature, from InEvently via the design proof. */
.stat-card {
    border-left: 4px solid var(--db-primary);
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover     { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.stat-card.sc-accent  { border-left-color: var(--db-accent); }
.stat-card.sc-success { border-left-color: var(--db-success); }
.stat-card.sc-info    { border-left-color: var(--db-info); }
.stat-card.sc-warning { border-left-color: var(--db-warning); }
.stat-card.sc-danger  { border-left-color: var(--db-danger); }

.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.8rem; color: var(--ins-secondary-color); text-transform: uppercase; letter-spacing: .05em; }

/* Empty state — a genuine LCO strength worth inheriting. Distinguish TRULY empty (a create CTA)
   from FILTERED empty (a clear-filters link); they are different problems for the user. */
.db-empty        { text-align: center; padding: 3rem 1.5rem; }
.db-empty i      { font-size: 3rem; color: var(--ins-tertiary-color, #adb5bd); display: block; margin-bottom: .75rem; }
.db-empty h5     { font-weight: 600; margin-bottom: .35rem; }
.db-empty p      { color: var(--ins-secondary-color); max-width: 26rem; margin: 0 auto 1.25rem; }

/* Avatar */
.db-avatar {
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .85rem; letter-spacing: .02em;
    background: var(--db-primary-subtle); color: var(--db-primary);
}
.db-avatar-lg { width: 4rem; height: 4rem; font-size: 1.35rem; }

/* Org switcher in the topbar — multi-agency staff need to know at a glance WHICH org they are in,
   because entering a gift against the wrong one is a genuinely costly mistake. */
.db-org-switcher .dropdown-toggle {
    display: flex; align-items: center; gap: .5rem;
    padding: .35rem .75rem; border-radius: .4rem;
    background: var(--db-primary-subtle); color: var(--db-primary);
    font-weight: 600; font-size: .875rem; border: 1px solid transparent;
}
.db-org-switcher .dropdown-toggle:hover { border-color: var(--db-primary-border); }
.db-org-switcher .dropdown-menu { min-width: 17rem; }

/* Read-only banner — a suspended tenant can still see and export everything (STRATEGY §12), so it
   must be obvious WHY saving is unavailable rather than looking like the app is broken. */
.db-readonly-banner {
    background: #fff4e5; border-bottom: 1px solid #f5d9ae; color: #8a5a12;
    padding: .6rem 1rem; font-size: .875rem; text-align: center;
}

/* Impersonation banner — always visible while an LCO admin is viewing as a tenant. */
.db-impersonation-banner {
    background: #d96262; color: #fff; padding: .5rem 1rem;
    font-size: .85rem; font-weight: 600; text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════════════════════════════════════════════════
   Printing straight from the browser has to produce a document, not a screenshot of an app. Every
   piece of chrome — sidebar, topbar, filter controls, pagination, buttons — is navigation, and
   navigation on paper is noise.

   The two rules that actually decide whether a printed report is usable:
     • thead { display: table-header-group } repeats the column headings on EVERY page. Without it
       page 2 onward is a wall of unlabelled numbers.
     • tr { break-inside: avoid } stops a row being sliced in half across a page boundary.

   `print-color-adjust: exact` keeps the totals rule and header shading, which browsers otherwise
   strip. This is the free, always-available path; the PDF export is the one to use when the output
   has to look designed. */
@media print {
    @page { margin: 14mm 12mm; }

    .sidenav-menu, .app-topbar, .footer,
    .db-readonly-banner, .db-impersonation-banner,
    .db-print-hide, .pagination, .breadcrumb {
        display: none !important;
    }

    .content-page, .page-content, .container-fluid { margin: 0 !important; padding: 0 !important; }
    body { background: #fff !important; font-size: 10.5pt; }

    a[href]::after { content: none !important; }   /* never print raw URLs after links */
    a { color: #000 !important; text-decoration: none !important; }

    .card {
        border: none !important; box-shadow: none !important;
        break-inside: avoid; margin-bottom: .6rem !important;
    }
    .card-header { background: transparent !important; border-bottom: 1px solid #999 !important; padding-left: 0; }
    .card-body   { padding-left: 0 !important; padding-right: 0 !important; }

    /* Stat tiles read as a single line of figures rather than four floating boxes. */
    .stat-card { border-left: none !important; }
    .stat-card .stat-value { font-size: 1.1rem !important; }

    table { width: 100% !important; border-collapse: collapse !important; }
    thead { display: table-header-group; }         /* repeat headings on every page */
    tfoot { display: table-row-group; }            /* totals stay with the data, not pinned */
    tr    { break-inside: avoid; page-break-inside: avoid; }
    th, td {
        padding: .28rem .4rem !important;
        border-bottom: 1px solid #ddd !important;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    thead th { border-bottom: 1.5px solid #666 !important; background: #f1f3f5 !important; }
    tfoot td { border-top: 1.5px solid #666 !important; font-weight: 700; }

    /* Every column prints, whatever the screen width was hiding. */
    .db-report-table .d-none { display: table-cell !important; }
    .table-responsive { overflow: visible !important; }

    /* Badges print as plain text — a coloured pill costs ink and says nothing extra on paper. */
    .badge {
        background: transparent !important; color: #000 !important;
        border: none !important; padding: 0 !important; font-weight: 600;
    }

    svg { max-width: 100% !important; break-inside: avoid; }
}

/* Blocks that exist only on paper. Hidden on screen by Bootstrap's d-none; revealed for print. */
@media print {
    .db-print-only { display: block !important; }
}

/* ══════════════════════════════════════════════════════════════════════════════════════════════
   REPORT LIBRARY
   ══════════════════════════════════════════════════════════════════════════════════════════════
   Compact rows, not cards. Cards suit discovery — reading what each report tells you, once. The
   everyday job is getting to a report you already know, and large cards made that worse: seventeen
   reports scrolled, everything looked equally weighted, and finding one meant scanning.

   A row is ~52px against the card's ~120px, two to a line, so the whole library fits one screen. The
   description survives because it is the genuinely good part — it just stops costing a card. */

.db-report-row {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .65rem;
    border: 1px solid var(--ins-border-color, #e7e9eb);
    border-radius: .4rem;
    background: var(--ins-secondary-bg, #fff);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.db-report-row:hover {
    border-color: var(--db-primary-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.db-report-link {
    display: flex; align-items: center; gap: .65rem;
    flex: 1 1 auto; min-width: 0;          /* min-width:0 is what lets the description ellipsis */
    text-decoration: none; color: inherit;
}

.db-report-icon {
    flex: 0 0 auto;
    width: 2rem; height: 2rem; border-radius: .35rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--db-primary-subtle); color: var(--db-primary);
    font-size: 1rem;
}

.db-report-text { display: flex; flex-direction: column; min-width: 0; }
.db-report-name { font-weight: 600; font-size: .9rem; line-height: 1.25; }
.db-report-desc {
    font-size: .78rem; color: var(--ins-secondary-color, #6b7280); line-height: 1.3;
    /* One line, clipped. The full text is in the title attribute and on the report itself; a
       wrapping description is what made the cards tall. */
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* The star stays quiet until it is set or hovered — seventeen bright stars is noise, and the
   control is not what the page is for. */
.db-report-star {
    flex: 0 0 auto;
    background: none; border: 0; padding: .15rem .25rem; line-height: 1;
    color: var(--ins-tertiary-color, #c3c8ce);
    /* Faint but PRESENT. Fully hidden until hover meant nobody discovered favorites existed, and an
       affordance you cannot see is one nobody uses. */
    opacity: .35; transition: opacity .12s ease, color .12s ease;
}
.db-report-row:hover .db-report-star { opacity: 1; }
.db-report-star.is-on { opacity: 1; color: #f0a92b; }
.db-report-star:hover { color: #f0a92b; }
.db-report-star:focus-visible { opacity: 1; outline: 2px solid var(--db-primary); border-radius: .2rem; }

/* ── Favorites / recents strips ───────────────────────────────────────────────────────────────
   One line each. This is the whole point of the redesign: the everyday case is one click and
   involves no scanning at all. */
.db-quickstrip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.db-quickstrip-label {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ins-secondary-color, #6b7280); margin-right: .15rem;
}
.db-quickstrip-label .ti { color: #f0a92b; }

.db-quickchip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .6rem; border-radius: 1rem;
    background: var(--db-primary-subtle); color: var(--db-primary);
    font-size: .8rem; font-weight: 600; text-decoration: none;
    border: 1px solid transparent;
}
.db-quickchip:hover { border-color: var(--db-primary-border); color: var(--db-primary); }
.db-quickchip-muted {
    background: transparent; color: var(--ins-secondary-color, #6b7280); font-weight: 500;
    border-color: var(--ins-border-color, #e7e9eb);
}
.db-quickchip-muted .text-muted { font-size: .72rem; }

/* ── Top-bar donor search (D41, assets/js/donor-search.js) ─────────────────────────────────────────
   A dropdown under the box: recents on focus, live matches as you type. Rows are tight but separated
   (Ryan: "I can not see what goes with what"), the face is the same square-ish shape as the profile. */
.db-ts-menu {
    position: absolute; top: calc(100% + 4px); left: 0; width: 440px; max-height: 70vh; overflow-y: auto;
    background: var(--ins-secondary-bg, #fff); border: 1px solid var(--ins-border-color, #dfe3e8);
    border-radius: .5rem; box-shadow: 0 10px 30px rgba(15, 23, 42, .14); z-index: 1060; padding: .25rem 0;
}
.db-ts-head { padding: .35rem .85rem .2rem; font-size: .68rem; font-weight: 700; letter-spacing: .05em;
              text-transform: uppercase; color: var(--ins-secondary-color, #6b7684); }
.db-ts-none { padding: .5rem .85rem .7rem; font-size: .85rem; color: var(--ins-secondary-color, #6b7684); }
.db-ts-item { display: flex; align-items: center; gap: .65rem; padding: .4rem .85rem; color: inherit; text-decoration: none;
              border-top: 1px solid var(--ins-border-color, #eef0f3); }
.db-ts-item.active, .db-ts-item:hover { background: var(--db-primary-subtle); color: inherit; }
.db-ts-face { flex: 0 0 34px; width: 34px; height: 34px; border-radius: .4rem; overflow: hidden; display: flex;
              align-items: center; justify-content: center; font-size: .75rem; font-weight: 700;
              background: var(--db-primary); color: #fff; }
.db-ts-face.org { background: var(--db-accent); }
.db-ts-face img { width: 100%; height: 100%; object-fit: cover; }
.db-ts-body { display: flex; flex-direction: column; min-width: 0; }
.db-ts-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-ts-name strong { font-weight: 800; color: var(--db-primary); }
.db-ts-meta { font-size: .76rem; color: var(--ins-secondary-color, #6b7684); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-ts-meta .badge { font-size: .64rem; vertical-align: 1px; }
.db-ts-all { display: block; padding: .5rem .85rem; border-top: 1px solid var(--ins-border-color, #eef0f3);
             font-size: .82rem; font-weight: 600; color: var(--db-primary); text-decoration: none; }
.db-ts-all:hover { background: var(--db-primary-subtle); }

/* ── The profile's look, shared (S83, 2026-11-11) ──────────────────────────────────────────────────
   Ryan: every screen follows the PROFILE's concept — dense, grouped, at a glance, actions on hover — never a list of
   records beside a form. Until now these rules lived only inside donors/profile.php, so no other page could use them,
   which is part of why the other screens look different. Copied here verbatim (the profile keeps its identical inline
   copy until the redesign folds it in) so any page builds from the same pieces: .dbp (page width), .dbp-head (the
   header band), .dbp-kpi (figure tiles), .dbp-card + h6 + .dbp-add (a box with its add button in the header),
   .dbp-rows / .dbp-item / .dbp-ctl (striped rows with hover actions), .dbp-dl, .dbp-table, .dbp-muted, .dbp-none. */
.dbp { max-width: 1680px; margin: 0 auto; font-size: .9rem; }
.dbp-head { background: #fff; border: 1px solid #dfe3e8; border-top: 4px solid var(--db-primary); border-radius: .5rem;
            padding: .85rem 1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.dbp-name { font-size: 1.5rem; font-weight: 700; line-height: 1.15; margin: 0; color: var(--db-primary); }
.dbp-sub { color: #5f6b7a; font-size: .85rem; margin: .1rem 0 .35rem; }
.dbp-badges .badge { font-weight: 600; font-size: .72rem; padding: .32em .55em; margin: 0 .2rem .2rem 0; }
.dbp-kpis { display: flex; gap: .4rem; margin-left: auto; flex-wrap: wrap; }
.dbp-kpi { background: var(--db-primary-subtle); border-radius: .4rem; padding: .35rem .7rem; min-width: 104px; }
.dbp-kpi .v { font-size: 1.15rem; font-weight: 700; color: var(--db-primary); line-height: 1.2; }
.dbp-kpi .l { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: #5f6b7a; }
.dbp-kpi.accent { background: var(--db-accent-subtle); } .dbp-kpi.accent .v { color: var(--db-accent); }
.dbp-actions { display: flex; flex-direction: column; gap: .35rem; }
.dbp-card { background: #fff; border: 1px solid #dfe3e8; border-radius: .5rem; margin-bottom: .85rem; overflow: hidden; }
.dbp-card > h6 { margin: 0; padding: .4rem .5rem .4rem .85rem; background: var(--db-primary-subtle); color: var(--db-primary);
                 font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; min-height: 2.6rem;
                 display: flex; justify-content: space-between; align-items: center; }
.dbp-card > h6 .dbp-add { font-size: .82rem; padding: .28rem .75rem; line-height: 1.4; color: var(--db-primary); background: #fff;
                          border: 1px solid var(--db-primary-border); text-transform: none; letter-spacing: 0; font-weight: 600; }
.dbp-card > h6 .dbp-add:hover { background: var(--db-primary); color: #fff; }
.dbp-body { padding: .55rem .75rem; }
.dbp-dl { display: grid; grid-template-columns: 88px 1fr; gap: .2rem .6rem; margin: 0; }
.dbp-dl dt { color: #6b7684; font-weight: 500; font-size: .8rem; }
.dbp-dl dd { margin: 0; overflow-wrap: anywhere; }
.dbp-dl-wide { grid-template-columns: 132px 1fr; }
.dbp-rows > div { padding: .4rem .75rem; border-top: 1px solid #eef0f3; }
.dbp-rows > div:nth-child(even) { background: #f7f9fb; }
.dbp-rows > div:first-child { border-top: 0; }
.dbp-item { position: relative; }
.dbp-ctl { float: right; display: inline-flex; gap: .45rem; margin-left: .5rem; opacity: 0; transition: opacity .12s; }
.dbp-item:hover .dbp-ctl, .dbp-item:focus-within .dbp-ctl { opacity: 1; }
.dbp-table tr:hover .dbp-ctl, .dbp-table tr:focus-within .dbp-ctl { opacity: 1; }
@media (hover: none), (max-width: 991.98px) { .dbp-ctl { opacity: 1; } }
.dbp-ctl .btn { font-size: .95rem; line-height: 1; }
.dbp-table { width: 100%; font-size: .84rem; border-collapse: collapse; }
.dbp-table th { font-size: .7rem; text-transform: uppercase; color: #6b7684; font-weight: 600; padding: .35rem .5rem;
                border-bottom: 1px solid #dfe3e8; background: #fbfcfd; position: sticky; top: 0; }
.dbp-table td { padding: .32rem .5rem; border-top: 1px solid #eef0f3; vertical-align: top; }
.dbp-table tbody tr:nth-child(even) td { background: #f7f9fb; }
.dbp-table .amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.dbp-table a { color: inherit; } .dbp-table a:hover { color: var(--db-primary); text-decoration: underline; }
.dbp-muted { color: #6b7684; font-size: .78rem; }
.dbp-none { padding: .45rem .75rem; color: #8a94a1; font-style: italic; font-size: .82rem; }

/* ── Settings › Codes (P1-26; S101/S102) — designed for its own job, not a copy of the profile: ONE calm line per campaign
   or fund (click it for a pop-up with everything), folded groups, a find box. No figures on the lines — they live in the
   pop-up (.dbc-years, .dbc-figbox). */
.dbc-tools .form-control { width: 18rem; max-width: 60vw; }
.dbc-list { max-height: none; }
.dbc-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .85rem; border-top: 1px solid #eef0f3; cursor: pointer; }
.dbc-list > .dbc-row:first-child, .dbc-list > .dbc-row[hidden] + .dbc-row { border-top: 0; }
.dbc-row:hover { background: var(--db-primary-subtle); }
.dbc-row.dbc-static { cursor: default; } .dbc-row.dbc-static:hover { background: none; }
.dbc-row.dbc-kid { padding-left: 2rem; }
.dbc-open { background: none; border: 0; padding: 0; font-weight: 600; color: inherit; text-align: left; }
.dbc-row.dbc-kid .dbc-open { font-weight: 500; }
.dbc-open:focus-visible { outline: 2px solid var(--db-primary); outline-offset: 2px; }
.dbc-latest { margin-left: auto; color: #6b7684; font-size: .85rem; font-variant-numeric: tabular-nums; }
.dbc-next .btn { font-size: .82rem; padding: .2rem .6rem; }
.dbc-tag { display: inline-block; font-size: .7rem; font-weight: 600; color: #5f6b7a; background: #f1f3f6; border: 1px solid #e3e7ec;
           border-radius: .3rem; padding: .05rem .4rem; margin-left: .35rem; vertical-align: middle; }
.dbc-foot { display: flex; gap: 1rem; padding: .4rem .85rem; border-top: 1px solid #eef0f3; background: #fbfcfd; }
.dbc-foot .btn-link { font-size: .8rem; text-decoration: none; }
.dbc-fact { color: #5f6b7a; font-size: .86rem; margin-bottom: .15rem; }
.dbc-years { font-size: .86rem; }
.dbc-years th { font-size: .7rem; text-transform: uppercase; color: #6b7684; font-weight: 600; }
.dbc-years td, .dbc-years th { vertical-align: middle; }
.dbc-years td.text-end, .dbc-years th.text-end { font-variant-numeric: tabular-nums; }
.dbc-years tfoot th { border-top: 2px solid #dfe3e8; text-transform: none; font-size: .86rem; color: inherit; }
.dbc-figbox { background: var(--db-primary-subtle); border-radius: .4rem; padding: .5rem .75rem; }
.dbc-figbox .l { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #5f6b7a; }
.dbc-figbox .v { font-size: 1.25rem; font-weight: 700; color: var(--db-primary); line-height: 1.25; }

/* ── Campaigns & Appeals (P1-26 note 11; D122) — one year's appeals, biggest first, one line each (name · raised · donors ·
   last gift); a line opens its pop-up. Figures in the pop-up use .dbc-figbox / .dbc-years (Settings › Codes). */
.dbk { max-width: 60rem; }
.dbk-head { margin-bottom: .6rem; }
.dbk-total { font-size: 1.05rem; color: #4b5563; } .dbk-total strong { color: var(--db-primary); font-size: 1.3rem; }
.dbk-card { background: #fff; border: 1px solid #dfe3e8; border-radius: .5rem; overflow: hidden; }
.dbk-cols, .dbk-row { display: grid; grid-template-columns: minmax(0, 1fr) 8rem 5rem 7rem; gap: .75rem; align-items: center; padding: .6rem .95rem; }
.dbk-cols { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #5f6b7a; background: #f7f9fb;
            padding-top: .5rem; padding-bottom: .4rem; }
.dbk-row { border-top: 1px solid #eef0f3; cursor: pointer; }
.dbk-row:hover, .dbk-row:focus-visible { background: var(--db-primary-subtle); outline: none; }
.dbk-row.dbk-static { cursor: default; background: #fbfcfd; } .dbk-row.dbk-static:hover { background: #fbfcfd; }
.dbk-cols .n, .dbk-row .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dbk-name { font-weight: 600; min-width: 0; }
.dbk-quiet .dbk-name { font-weight: 500; }
.dbk-note { display: block; font-weight: 400; color: #6b7684; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbk-amt { font-weight: 600; }
.dbk-muted { color: #6b7684; }
.dbk-goal { display: block; height: .4rem; max-width: 16rem; background: #eef0f3; border-radius: 1rem; overflow: hidden; margin: .3rem 0 .1rem; }
.dbk-goal > span { display: block; height: 100%; background: var(--db-primary); }
/* S116: the optional comparison column, the totals line, the pop-up's goal box. */
.dbk-cols.cmp, .dbk-row.cmp { grid-template-columns: minmax(0, 1fr) 8rem 9rem 5rem 7rem; }
.dbk-chg { font-size: .78rem; font-weight: 600; margin-left: .25rem; } .dbk-chg.up { color: #1f7a4d; } .dbk-chg.down { color: #b42318; }
.dbk-totals { border-top: 2px solid #dfe3e8; }
.dbk-goalbox { border: 1px solid #e3e7ec; border-radius: .45rem; padding: .6rem .8rem; }
.dbk-goal-lg { height: .55rem; max-width: none; margin-top: .45rem; }
.dbk-fold { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid #eef0f3; background: #f7f9fb; padding: .55rem .95rem;
            color: #4b5563; font-weight: 600; }
.dbk-fold:hover { color: var(--db-primary); }
.dbk-fold .dbk-muted { font-weight: 400; }
@media (max-width: 575.98px) { .dbk-cols, .dbk-row { grid-template-columns: minmax(0, 1fr) 6rem; } .dbk-cols > :nth-child(n+3), .dbk-row > :nth-child(n+3) { display: none; } }

/* ── Settings (P1-26 note 9; D121) — visited rarely, to change ONE thing: one calm list, grouped, one line per setting with
   where it stands on the right; the whole line is the link. */
.dbs { max-width: 54rem; }
.dbs-group { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #5f6b7a; margin: 1.1rem 0 .4rem .2rem; }
.dbs-group:first-child { margin-top: 0; }
.dbs-card { background: #fff; border: 1px solid #dfe3e8; border-radius: .5rem; overflow: hidden; }
.dbs-row { position: relative; display: flex; align-items: center; gap: .75rem; padding: .7rem .95rem; border-top: 1px solid #eef0f3; }
.dbs-row:first-child { border-top: 0; }
.dbs-row:hover { background: var(--db-primary-subtle); }
.dbs-icon { font-size: 1.15rem; color: var(--db-primary); width: 1.4rem; text-align: center; flex: 0 0 auto; }
.dbs-name { font-weight: 600; color: inherit; text-decoration: none; white-space: nowrap; }
.dbs-name:focus-visible { outline: 2px solid var(--db-primary); outline-offset: 2px; }
.dbs-hint { color: #6b7684; font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbs-where { margin-left: auto; color: #4b5563; white-space: nowrap; text-align: right; }
.dbs-where.todo { color: #a15c07; font-weight: 600; }
.dbs-extra { position: relative; z-index: 2; color: #6b7684; padding: .1rem .3rem; border-radius: .3rem; }
.dbs-extra:hover { color: var(--db-primary); background: #fff; }
.dbs-chev { color: #b0b8c3; flex: 0 0 auto; }
@media (max-width: 575.98px) { .dbs-row { flex-wrap: wrap; } .dbs-hint { display: none; } }

/* ── Import, step 1 (P1-26, S82; D125) — the drop box is the page; earlier imports below use the Settings list (.dbs-*). */
.dbi { max-width: 92rem; }
/* The guide beside the drop box: readable size, numbered steps, the recognized columns as chips (folded). */
.dbi-guide { background: #fff; border: 1px solid #dfe3e8; border-radius: .5rem; padding: 1rem 1.1rem; position: sticky; top: 5rem; }
.dbi-steps { padding-left: 1.2rem; margin-bottom: .9rem; } .dbi-steps li { margin-bottom: .5rem; line-height: 1.45; }
.dbi-sample { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; margin-bottom: .6rem; }
.dbi-cols { margin-top: .5rem; } .dbi-cols summary { cursor: pointer; font-weight: 600; color: var(--db-primary); }
.dbi-cols > div:not(.dbi-also) { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.dbi-chip { display: inline-block; padding: .15rem .55rem; border: 1px solid #e3e7ec; border-radius: 1rem; background: #f7f9fb; font-size: .88rem; }
.dbi-also { color: #6b7684; margin-top: .45rem; }
.dbi-card { background: #fff; border: 1px solid #dfe3e8; border-radius: .5rem; padding: 1rem 1.1rem; }
.dbi-title { font-weight: 600; font-size: 1.05rem; margin-bottom: .7rem; }
.dbi-zone { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.6rem 1rem; border: 2px dashed #b8c2cf;
            border-radius: .5rem; background: #fbfcfd; cursor: pointer; text-align: center; margin: 0; }
.dbi-zone:hover, .dbi-zone.over { border-color: var(--db-primary); background: var(--db-primary-subtle); }
.dbi-zone.has-file { border-style: solid; border-color: var(--db-primary); }
.dbi-zone > .ti { font-size: 2rem; color: var(--db-primary); }
.dbi-big { font-size: 1.02rem; }
.dbi-file { color: #6b7684; font-size: .88rem; }
.dbi-zone.has-file .dbi-file { color: var(--db-primary); font-weight: 600; font-size: .95rem; }
.dbi-kind { margin-top: .9rem; }
.dbi-foot { display: flex; align-items: center; gap: .75rem; margin-top: .9rem; flex-wrap: wrap; }
.dbi-when { color: #6b7684; white-space: nowrap; width: 6.5rem; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.dbi-none { color: #6b7684; }
/* Import preview (S180): a row's couple, or two rows sharing an email — set under the row's action with a thin rule to the left, so it
   reads as part of that row; a reading still to be chosen is outlined amber, the way an undecided value is. */
.dbi-couple { margin-top: .4rem; padding: .3rem 0 .3rem .6rem; border-left: 2px solid #c9d3df; }
.dbi-couple.dbi-ask { border-left-color: #e0a800; background: #fff8e1; border-radius: 0 .3rem .3rem 0; }
.dbi-couple .form-check { margin-bottom: .1rem; }

/* ── To-dos (P1-26 note 6; D120) — a work list grouped by WHEN (Late · Today · Coming up · No date), one line per to-do saying
   what it is and why it is there, actions on hover; done and closed folded at the bottom. Built on .dbl-card. */
.dbt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; min-height: 2.1rem; }
.dbt-tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
.dbt-tabs a { padding: .3rem .75rem; border-radius: 2rem; color: #4b5563; text-decoration: none; font-weight: 500; }
.dbt-tabs a span { color: #8a94a1; font-weight: 400; }
.dbt-tabs a:hover { background: var(--db-primary-subtle); }
.dbt-tabs a.active { background: var(--db-primary); color: #fff; } .dbt-tabs a.active span { color: rgba(255, 255, 255, .8); }
.dbt-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-left: auto; }
.dbt-bulk[hidden] { display: none; }
/* Its own card box: .dbl-card's rules live in lists.css, which this page doesn't load. */
.dbt-card { background: #fff; border: 1px solid #dfe3e8; border-radius: .5rem; overflow: hidden; margin-bottom: 1rem; }
.dbt-group { display: block; width: 100%; text-align: left; border: 0; font-size: .74rem; font-weight: 700; text-transform: uppercase;
             letter-spacing: .05em; color: #5f6b7a; padding: .55rem .85rem .35rem; background: #f7f9fb; border-top: 1px solid #eef0f3; }
.dbt-card > .dbt-group:first-child, .dbt-card > .dbt-empty + .dbt-group { border-top: 0; }
.dbt-group.late { color: #b42318; }
.dbt-fold { cursor: pointer; } .dbt-fold:hover { color: var(--db-primary); }
.dbt-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .85rem; border-top: 1px solid #eef0f3; }
.dbt-row:hover, .dbt-row:focus-within { background: var(--db-primary-subtle); }
.dbt-main { flex: 1 1 auto; min-width: 0; }
.dbt-what { line-height: 1.35; }
.dbt-what a { color: var(--db-primary); }
.dbt-why { color: #6b7684; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbt-when { color: #6b7684; font-size: .86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dbt-when.late { color: #b42318; font-weight: 600; }
.dbt-who { width: 9.5rem; flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbt-acts { display: flex; gap: .25rem; flex: 0 0 auto; visibility: hidden; }
.dbt-row:hover .dbt-acts, .dbt-row:focus-within .dbt-acts, .dbt-acts:has(.show) { visibility: visible; }
.dbt-closed .dbt-what strong { color: #8a94a1; text-decoration: line-through; font-weight: 500; }
.dbt-high { color: #b42318; border-color: #f3c7c2; background: #fdf0ee; }
.dbt-empty { padding: .9rem .85rem; color: #6b7684; }
@media (max-width: 767.98px) { .dbt-row { flex-wrap: wrap; } .dbt-who { width: auto; } .dbt-acts { visibility: visible; width: 100%; } }

/* ── Needs coding (S120) — a work queue: one line per gift with its two boxes on the line (the missing one amber), a second
   line for the clue (a suggestion, the part of the event, the gift's note); a coded line closes up into "✓ … Undo".
   Uses .dbt-bar / .dbt-card / .dbt-empty from To-dos. One grid so every line's boxes sit in the same columns. */
.dbc-row { display: grid; grid-template-columns: 1.3rem 6.2rem minmax(9rem, 1fr) 6.4rem minmax(10rem, 13rem) minmax(12rem, 18rem) 4.2rem;
           gap: .15rem .75rem; align-items: center; padding: .5rem .85rem; border-top: 1px solid #eef0f3; }
.dbc-row:hover, .dbc-row:focus-within { background: var(--db-primary-subtle); }
.dbc-row { scroll-margin-top: 7rem; }   /* a badge on All Gifts opens the page at #g<id>, clear of the top bar */
.dbc-row:target { background: #fff8e1; }
.dbc-head { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #5f6b7a; background: #f7f9fb;
            border-top: 0; padding-top: .45rem; padding-bottom: .4rem; }
.dbc-head:hover { background: #f7f9fb; }
.dbc-when { color: #6b7684; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dbc-who { min-width: 0; line-height: 1.3; }
.dbc-who a { color: var(--db-primary); }
.dbc-how { display: block; color: #6b7684; font-size: .84rem; }
.dbc-amt { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dbc-missing { border-color: #e0a100; box-shadow: 0 0 0 .15rem rgba(224, 161, 0, .18); }
.dbc-gap { color: #9a6700; }
.dbc-split { grid-column: 5 / -1; color: #6b7684; font-size: .9rem; }
.dbc-sub { grid-column: 3 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem 1.1rem; font-size: .86rem; color: #6b7684; }
.dbc-sub:empty { display: none; }
.dbc-sug { border: 0; background: none; padding: 0; color: #4b5563; text-align: left; }
.dbc-sug strong { color: var(--db-primary); font-weight: 600; }
.dbc-sug:hover strong, .dbc-sug:focus strong { text-decoration: underline; }
.dbc-partask { border: 0; background: none; padding: 0; color: var(--db-primary); visibility: hidden; }
.dbc-row:hover .dbc-partask, .dbc-row:focus-within .dbc-partask { visibility: visible; }
.dbc-part label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.dbc-part .form-select { width: auto; }   /* the theme's .form-select is full width */
.dbc-note { max-width: 32rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbc-done { display: flex; align-items: center; gap: .6rem; padding: .45rem .85rem .45rem 2.9rem; border-top: 1px solid #eef0f3;
            background: #f3faf6; color: #3d4a57; }
.dbc-done > i { color: #2f8f5b; font-size: 1.1rem; }
.dbc-done .btn-link { margin-left: auto; padding: 0 .25rem; }
/* The count line stays pinned under the top bar (65px, itself sticky) — the tick bar lives in it, so ticking moves nothing. */
.dbc-top { position: sticky; top: 65px; z-index: 6; background: var(--bs-body-bg, #f1f2f7); padding: .35rem 0; margin-bottom: .4rem; min-height: 3.35rem; }   /* = its height with the tick bar in it: nothing moves when it appears */
.dbc-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-left: auto; }
.dbc-bulk[hidden] { display: none; }
.dbc-bulk .form-select { width: auto; max-width: 18rem; }
/* ── The board or committee seat pop-up (S120) — read as a sentence: "<name> serves on [board] as [role]". ──────────── */
.dbseat { font-size: 1rem; }
.dbseat-line { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .5rem; margin-bottom: .85rem; }
.dbseat-line > .invalid-feedback { flex-basis: 100%; margin-top: 0; }
/* The theme's .form-select is width:100% and its w-auto doesn't win here — the board box would take a line of its own. */
.dbseat-board { width: auto; min-width: 14rem; max-width: 100%; }
/* Settings › Emails to donors (P1-27): the hour and time zone sit IN the sentence — the theme's .form-select is width:100%. */
.dbe-pick { width: auto; min-width: 8rem; max-width: 100%; }
.dbseat-name { width: 16rem; max-width: 100%; }
.dbseat-role { width: 17rem; max-width: 100%; }
.dbseat-notes { flex: 1 1 18rem; }
.dbseat-no { width: 4.5rem; }
.dbseat-mo { width: 5.6rem; } .dbseat-yr { width: 5.8rem; }
.dbseat-lbl { color: #4b5563; min-width: 3rem; }
.dbseat-to { color: #4b5563; min-width: 2.6rem; text-align: center; }
.dbseat-need { color: #b42318; font-weight: 600; }
.dbseat-chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.dbseat-chip { border: 1px solid #dfe3e8; background: #f7f9fb; border-radius: 2rem; padding: .1rem .6rem; font-size: .86rem; color: #4b5563; }
.dbseat-chip:hover, .dbseat-chip:focus { border-color: var(--db-primary); color: var(--db-primary); background: var(--db-primary-subtle); }
.dbseat-preview { margin: -.35rem 0 .85rem 3.5rem; color: #6b7684; font-size: .9rem; }
.dbseat-also { border-top: 1px solid #eef0f3; padding-top: .7rem; color: #4b5563; font-size: .9rem; line-height: 1.45; }

@media (max-width: 991.98px) {
    .dbc-row { grid-template-columns: 1.3rem 1fr auto; }
    .dbc-head { display: none; }
    .dbc-when { grid-column: 2; } .dbc-who { grid-column: 2; } .dbc-amt { grid-column: 3; grid-row: 1 / span 2; }
    .dbc-row > div:nth-child(n+5) { grid-column: 2 / -1; }
    .dbc-sub { grid-column: 2 / -1; }
    .dbc-partask { visibility: visible; }
}

/* ── Smarty's confirm box (P1-17, S24b) — what was typed beside Smarty's postal address, Smarty's highlighted ──────── */
.db-addr-popup { width: 36rem; max-width: calc(100vw - 2rem); }
.db-addr-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; text-align: left; margin-bottom: .75rem; }
.db-addr-choice { border: 1px solid #e3e7ec; border-radius: .4rem; padding: .6rem .75rem; font-size: .92rem; line-height: 1.45; }
.db-addr-choice-strong { border-color: var(--db-primary-border); background: var(--db-primary-subtle); }
.db-addr-choice-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7684;
                        margin-bottom: .25rem; }
@media (max-width: 480px) { .db-addr-choices { grid-template-columns: 1fr; } }
.dbp-addr-check { font-size: .76rem; margin-top: .15rem; }

/* ── Donation Forms — the giving page's settings (P1-07 step 7 + note 10, S129) ─────────────────────────────────
   Where it stands in one line (green when donors can give, amber when they can't), then the settings; the latest online
   gifts on the right, one calm line each, the whole line opening the donor. */
.dbf-ok   { color: #1a6b53; font-weight: 500; }
.dbf-warn { color: #8a5a12; background: #fdf6e7; border: 1px solid #f3dfb2; border-radius: .4rem; padding: .5rem .7rem; }
.dbf-funds .form-check-inline { margin-right: 1.25rem; }
.dbf-gifts { display: flex; flex-direction: column; }
.dbf-gift { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .6rem; align-items: baseline; padding: .55rem 1rem;
            border-bottom: 1px solid var(--bs-border-color, #e7e9ee); color: inherit; text-decoration: none; }
.dbf-gift:last-child { border-bottom: 0; }
.dbf-gift:hover { background: #f6f8fb; }
.dbf-when { color: #6b7684; white-space: nowrap; }
.dbf-who  { font-weight: 500; min-width: 0; }
.dbf-sub  { display: block; font-weight: 400; color: #6b7684; font-size: .85rem; }
.dbf-amt  { font-weight: 600; white-space: nowrap; text-align: right; }
.dbf-gift.is-void .dbf-amt { text-decoration: line-through; color: #6b7684; }

/* ── Letters & Mail (the redo, S131) ────────────────────────────────────────────────────────────────────────────────────
   Mailings as calm lines (the whole line opens the mailing), letters to the side, the mailing page's people beside the letter.
   Normal reading sizes — Ryan's walk-through: "All this little font instructions … is just too much". */
.dbm-mailings .card-header, .dbm-letters .card-header, .dbm-people .card-header, .dbm-preview .card-header { background: var(--db-primary-subtle, #eef3f9); }
.dbm-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .7rem 1rem; border-top: 1px solid #eef0f3; }
.dbm-line:first-of-type { border-top: 0; }
.dbm-line:hover { background: #f8fafc; }
.dbm-line.is-draft { background: #fbfaf4; }
.dbm-line-main { flex: 1 1 18rem; min-width: 0; color: inherit; text-decoration: none; }
.dbm-line-name { display: block; font-weight: 600; color: var(--db-primary, #19375b); }
.dbm-line-sub { display: block; color: #5f6b7a; font-size: .9rem; }
.dbm-line-state { color: #3d4652; font-size: .9rem; white-space: nowrap; }
.dbm-line-date { color: #8a94a1; margin-left: .5rem; }
.dbm-line-acts { display: flex; flex-wrap: wrap; gap: .3rem; }
.dbm-none { padding: .9rem 1rem; color: #6b7684; }
.dbm-more { padding: .5rem 1rem; font-size: .9rem; }
.dbm-letters-head { padding: .5rem 1rem .2rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #8a94a1; }
.dbm-letter { display: block; padding: .5rem 1rem; color: inherit; text-decoration: none; border-top: 1px solid #f1f3f6; }
.dbm-letter:hover { background: #f6f8fb; }
.dbm-letter-name { display: block; font-weight: 600; color: var(--db-primary, #19375b); }
.dbm-letter-sub { display: block; font-size: .85rem; color: #6b7684; }
/* New mailing: three numbered questions. */
.dbm-new .dbm-q { padding: .4rem 0 1.4rem; border-bottom: 1px solid #eef0f3; margin-bottom: 1.2rem; max-width: 46rem; }
.dbm-new .dbm-q:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.dbm-new h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: .8rem; display: flex; align-items: center; gap: .55rem; }
.dbm-new h2 span { display: inline-flex; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--db-primary, #19375b); color: #fff;
                   align-items: center; justify-content: center; font-size: .9rem; }
.dbm-why { color: #5f6b7a; margin-bottom: .7rem; }
/* The mailing page. */
.dbm-head-what { font-weight: 600; }
.dbm-head-state { color: #5f6b7a; }
.dbm-counts { color: #5f6b7a; font-size: .9rem; }
.dbm-list { max-height: 62vh; overflow-y: auto; }
.dbm-person { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem 1rem; border-top: 1px solid #f1f3f6; cursor: pointer; }
.dbm-person:hover { background: #f8fafc; }
.dbm-person.active { background: var(--db-primary-subtle, #eef3f9); box-shadow: inset 3px 0 0 var(--db-primary, #19375b); }
.dbm-person.is-off .dbm-name { color: #8a94a1; text-decoration: line-through; }
.dbm-person .dbm-tick { margin-top: .2rem; flex: none; width: 1.1rem; height: 1.1rem; }
.dbm-who { min-width: 0; flex: 1; }
.dbm-name { font-weight: 600; color: var(--db-primary, #19375b); text-decoration: none; }
.dbm-greet, .dbm-addr, .dbm-note { display: block; font-size: .87rem; color: #5f6b7a; }
.dbm-note { color: #7a6420; }
.dbm-see { flex: none; font-size: .87rem; }
.dbm-group { border-top: 1px solid #e3e7ec; }
.dbm-group-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1rem .3rem; font-weight: 600; color: #3d4652; }
.dbm-fixed { padding: 0 1rem .7rem; color: #5f6b7a; font-size: .9rem; }
.dbm-preview { position: sticky; top: 80px; }
.dbm-frame { position: relative; height: 72vh; background: #eef0f3; }
.dbm-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.dbm-frame-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6b7684; background: #f6f7f9; padding: 1rem; text-align: center; }

/* ── Pop-ups (P1-20, S142 — Ryan: "do all three") ─────────────────────────────────────────────────────────────
   1. A clear header: the title bold in the brand colour with its icon, whose record it is under it, on a light band.
   2. A group's heading inside a long pop-up (.dbm-sec — Contact: Email & phone · Mailing address · Preferences).
   3. Tighter: smaller muted labels, less space between rows, slightly shorter boxes — a compact form, not a long page. */
.modal-header { background: var(--db-primary-subtle); border-bottom: 1px solid #dfe5ee; padding: .7rem 1.1rem; }
.modal-header .modal-title { font-size: 1.05rem; font-weight: 700; color: var(--db-primary); line-height: 1.3; }
.modal-header .dbm-for { font-size: .82rem; color: #5f6b7a; margin-top: .05rem; }
.modal-body .row.g-3 { --bs-gutter-y: .6rem; }
.modal-body .form-label { font-size: .8rem; font-weight: 600; color: #5f6b7a; margin-bottom: .2rem; }
.modal-body .form-control, .modal-body .form-select { padding-top: .38rem; padding-bottom: .38rem; }
.modal-body .form-text { font-size: .78rem; margin-top: .2rem; }
/* A group's heading as a tinted band with room above it (S143 — Ryan: "a little more obvious separation between things"). */
.modal-body .dbm-sec { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--db-primary);
                       background: var(--db-primary-subtle); border-left: 3px solid var(--db-primary); border-radius: 4px;
                       padding: .32rem .6rem; margin-top: .9rem; margin-bottom: -.1rem; }
.modal-body .row > .dbm-sec:first-child { margin-top: 0; }
/* A scrollable pop-up whose header, body and footer sit inside a <form> (the profile's): the form takes the height, the body scrolls,
   so the header and the footer with Save are always on screen (S143). */
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; max-height: 100%; min-height: 0; overflow: hidden; }
.modal-dialog-scrollable .modal-content > form > .modal-body { overflow-y: auto; }

/* ── Help tips (P1-25; help/CONVENTIONS.md) — the (i) beside a label whose help registry entry has a one-sentence tip. Quiet until
   hovered: it must not compete with the label, and it is not a tab stop (gift entry is keyboard-first, D23). ──────────── */
.db-help-tip { display: inline-flex; align-items: center; margin-left: .3rem; color: var(--bs-secondary-color); cursor: help; font-weight: 400; vertical-align: -1px; }
.db-help-tip .ti { font-size: 1.05em; }
.db-help-tip:hover { color: var(--db-primary, #19375b); }

/* ── The help panel (P1-25; S187) — slides in from the right BELOW the top bar and pushes the page over, so help never covers
   what it explains. The highlight ring's colour is ONE value (--db-help-ring), shared later by the videos and screenshots. ─ */
:root { --db-help-ring: #f08c00; --db-help-panel-w: 400px; }
.db-help-btn { gap: .15rem; font-weight: 500; }
/* The width is Inspinia's --ins-offcanvas-width (its renamed Bootstrap variable; --bs-offcanvas-width does nothing here — it only
   seemed to work because both were 400 px, until the laptop width made them differ, 2026-11-24). */
.db-help-panel.offcanvas-end { --ins-offcanvas-width: var(--db-help-panel-w); --bs-offcanvas-width: var(--db-help-panel-w); top: var(--ins-topbar-height, 65px); border-left: 1px solid var(--bs-border-color); box-shadow: -6px 0 18px rgba(25, 55, 91, .08); }
.db-help-panel .offcanvas-header { border-bottom: 1px solid var(--bs-border-color); padding: .85rem 1.1rem; }
.db-help-panel .offcanvas-title { font-size: 1.05rem; font-weight: 600; color: var(--db-primary, #19375b); }
.db-help-panel .offcanvas-body { padding: 1rem 1.1rem 2rem; font-size: .9rem; line-height: 1.5; }
.db-help-summary { font-size: .95rem; font-weight: 500; }
.db-help-h { margin: 1.25rem 0 .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bs-secondary-color); }
.db-help-part { border: 1px solid var(--bs-border-color); border-radius: .4rem; margin-bottom: .4rem; background: var(--bs-body-bg); }
.db-help-part > summary { padding: .5rem .75rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.db-help-part > summary::-webkit-details-marker { display: none; }
.db-help-part > summary::after { content: "\203A"; color: var(--bs-secondary-color); transition: transform .15s; }
.db-help-part[open] > summary::after { transform: rotate(90deg); }
.db-help-part[open] > summary { border-bottom: 1px solid var(--bs-border-color); }
.db-help-part-body { padding: .6rem .75rem .75rem; }
.db-help-part-body p { margin-bottom: .55rem; }
.db-help-right { background: var(--db-accent-subtle, #eef5f2); border-radius: .3rem; padding: .45rem .6rem; }
.db-help-when { color: var(--bs-secondary-color); font-size: .85rem; }
@media (min-width: 992px) {
    .content-page { transition: margin-right .25s ease-in-out; }
    html.db-help-open .content-page { margin-right: var(--db-help-panel-w); }
}
/* The highlight (driver.js): DonorBoss's type and buttons, and the orange ring around the part being explained. */
.driver-active .driver-active-element { outline: 3px solid var(--db-help-ring); outline-offset: 4px; border-radius: 6px; }
.driver-popover.db-help-pop { font-family: inherit; border-radius: .5rem; max-width: 340px; padding: 1rem 1.1rem; }
.driver-popover.db-help-pop .driver-popover-title { font-size: 1rem; font-weight: 600; color: var(--db-primary, #19375b); }
.driver-popover.db-help-pop .driver-popover-description { font-size: .9rem; line-height: 1.45; color: #333; }
.driver-popover.db-help-pop .driver-popover-footer button { text-shadow: none; font: inherit; font-size: .85rem; border-radius: .35rem; padding: .3rem .75rem; }
.driver-popover.db-help-pop .driver-popover-next-btn { background: var(--db-primary, #19375b); color: #fff; border-color: var(--db-primary, #19375b); }
.driver-popover.db-help-pop .driver-popover-progress-text { font-size: .8rem; }
/* While help is open, messages (toasts) appear beside the panel, never on top of its title and close button. */
@media (min-width: 992px) { html.db-help-open body > .toast-container { right: var(--db-help-panel-w) !important; } }

/* ── The help panel's search and how-tos (P1-25, 2026-11-24) — "How do I…" at the top of every page's panel; results one calm line
   each; a how-to's "Where to start" (S191) and steps. Same quiet look as the rest of the panel. ─────────────────────────────── */
.db-help-search { position: relative; margin-bottom: 1rem; }
.db-help-search .ti { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--bs-secondary-color); }
.db-help-search input { padding-left: 2rem; }
.db-help-hit { display: flex; gap: .6rem; align-items: flex-start; width: 100%; text-align: left; background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color); border-radius: .4rem; padding: .55rem .7rem; margin-bottom: .4rem; color: inherit; }
.db-help-hit:hover, .db-help-hit:focus-visible { border-color: var(--db-primary, #19375b); }
.db-help-hit .ti { color: var(--db-primary, #19375b); margin-top: .15rem; }
.db-help-hit strong { display: block; font-weight: 600; }
.db-help-hit small { display: block; color: var(--bs-secondary-color); line-height: 1.35; }
.db-help-ask { display: flex; gap: .6rem; background: var(--db-accent-subtle, #eef5f2); border-radius: .4rem; padding: .7rem .8rem; margin-bottom: .75rem; }
.db-help-ask > .ti { color: var(--db-accent, #3a6a5a); margin-top: .15rem; }
.db-help-none { color: var(--bs-secondary-color); }
.db-help-howto-title { font-size: 1.05rem; font-weight: 600; color: var(--db-primary, #19375b); margin-bottom: .35rem; }
.db-help-ways { padding-left: 1.1rem; margin-bottom: .5rem; }
.db-help-ways li { margin-bottom: .2rem; }
.db-help-steps { padding-left: 1.2rem; margin-bottom: .9rem; }
.db-help-steps li { margin-bottom: .45rem; }
/* "Watch it" — a how-to whose walkthrough is on the help site (help/published.json): one calm line in the accent tint, the video's
   title as the link, its length and where it opens underneath. Same look as the Ask DonorBoss note above. */
.db-help-watch { background: var(--db-accent-subtle, #eef5f2); border-radius: .4rem; padding: .5rem .7rem; margin: .5rem 0 0; }
.db-help-watch a { font-weight: 600; text-decoration: none; }
.db-help-watch a:hover { text-decoration: underline; }
.db-help-watch small { display: block; color: var(--bs-secondary-color); line-height: 1.35; }
/* A slightly narrower help panel on laptop-sized screens (Ryan, 2026-11-24 — "slightly narrower and collapse the menu"; the menu fold is
   help-panel.js foldMenu). The page's push uses the same value, so the two always meet exactly. */
@media (max-width: 1599.98px) { :root { --db-help-panel-w: 340px; } }
