/* ==========================================================================
   AAMPS Bootstrap 5 custom styles.
   Loads on every page.
   --------------------------------------------------------------------------
   Contents:
     Section 1 - AAMPS disabled-state utilities + dropdown caret suppression
     Section 2 - AAMPS brand / typography
     Section 3 - Spacing & component tweaks
     Section 4 - Forms, validation & baseline elements
   ========================================================================== */

/* Brand web fonts (Google Fonts): Playfair Display (headings) + Inter (UI/body).
   Falls back to Georgia / Helvetica stacks if the CDN is unreachable. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@400;500&display=swap');

/* ==========================================================================
   AAMPS brand palette - single source of truth.
   *-rgb variants exist so rules that need alpha can do
   `rgba(var(--aamps-orange-rgb), 0.6)` instead of hardcoding the channels.
   ========================================================================== */

:root {
    --aamps-orange:        #C8511F;
    --aamps-orange-rgb:    200, 81, 31;
    --aamps-orange-dark:   #A33F16;
    --aamps-orange-light:  #E8A464;
    --aamps-orange-settlement: #C8511F;
    --aamps-navy:          #1A3A5C;
    --aamps-navy-registry: #1A3A5C;
    /* No brown in the brand palette - folded into the amber family. */
    --aamps-brown:         #C8511F;
    --aamps-brown-light:   #E8A464;
    --aamps-grey-band:     #c3c3c3;

    /* Brand neutrals */
    --aamps-parchment:     #F7F5F0;
    --aamps-stone:         #D4D0C4;
    --aamps-slate:         #5A6B7A;
    --aamps-ink:           #2C2C2A;
}


/* ==========================================================================
   SECTION 1 - AAMPS UTILITY HELPERS
   --------------------------------------------------------------------------
   Small runtime-toggled utilities used by the AAMPS JS layer (sales.js,
   bondsForSales.js) and a global caret suppression for dropdown toggles.
   ========================================================================== */

/* [KEEP] Ported from Site.css:695-703. sales.js / bondsForSales.js adds
   .disabledbutton to #pendingPanel / #soldPanel when a sale is still in
   Reservation state so those panels can't be clicked open. */
.disabledbutton {
    pointer-events: none;
    opacity: 0.4;
}
.disabledbuttonclear {
    pointer-events: none;
    opacity: 0.6;
}
/* [KEEP] Ported from Site.css:705-708. Applied by sales.js to specific fields
   (e.g. txtFirstNamePending / txtLastNamePending) that should LOOK disabled
   but still allow JS access; the form around them stays interactive.
   Added: grey bg so the visual cue matches BS3's [disabled] input rendering -
   sales.js strips the `disabled` attribute so the BS5 form-control goes back
   to white otherwise. */
.disabledControls,
.form-control.disabledControls {
    opacity: 0.6;
    background-color: #eee !important;
    cursor: not-allowed;
}

/* Block interaction. Applied to children when .disabledControls is a wrapper
   (e.g. #divReservationExtend) and to the element itself when applied to an
   actual form-control. Keeping pointer-events on the wrapper lets the cursor
   declaration render when hovering its background. */
.disabledControls *,
input.disabledControls,
select.disabledControls,
textarea.disabledControls,
button.disabledControls,
a.disabledControls {
    pointer-events: none;
}

/* Don't gray out div background, just the buttons/labels */
#divReservationExtend.disabledControls {
    background-color: transparent !important;
}

/* Show the not-allowed cursor on read-only inputs (browsers don't apply it
   by default since readonly elements are still focusable per the spec). */
input[readonly],
select[readonly],
textarea[readonly] {
    cursor: not-allowed;
}

/* Hide Edge / IE's native password-reveal pseudo - we render our own eye
   toggle on the Login form so the native one duplicates it. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* When an element has pointer-events: none (.disabledControls form-controls,
   readonly datepicker inputs - see rules further down, etc.) its own cursor
   declaration doesn't render. Put cursor: not-allowed on the parent so the
   cursor still flips when hovering the disabled element. */
:has(> input.disabledControls),
:has(> select.disabledControls),
:has(> textarea.disabledControls),
:has(> button.disabledControls),
:has(> a.disabledControls),
:has(> input[readonly][data-date-format]),
:has(> input.datepicker[readonly]),
:has(> .form-control[readonly][data-date-format]),
:has(> .form-control.datepicker[readonly]),
:has(> input[type="file"]:disabled) {
    cursor: not-allowed;
}

/* The "Choose File" button on <input type="file"> is a pseudo-element with
   its own cursor; the input's cursor doesn't propagate to it. */
input[type="file"]:disabled::file-selector-button {
    cursor: not-allowed;
}

/* [KEEP] Modal form labels left-aligned but indented slightly so they don't
   hug the modal-body's left edge - keeps the BS3 "form-horizontal" rhythm
   without flipping them right-aligned. */
.modal .row > .col-form-label {
    padding-left: 1.5rem;
}

/* [KEEP] Suppress BS5's auto-caret on .dropdown-toggle. Every AAMPS layout
   emits a manual chevron icon (<i class="bi bi-chevron-down">) inside its
   dropdown-toggle - without this rule both the manual icon AND BS5's ::after
   pseudo-element render, giving the user two stacked arrows. Kept global
   rather than per-layout so any new dropdown we add inherits the behavior. */
.dropdown-toggle::after {
    display: none;
}




/* ==========================================================================
   SECTION 2 - AAMPS BRAND / TYPOGRAPHY   [KEEP]
   Matches the BS3 visual identity. Permanent - not a shim.
   ========================================================================== */

body {
    font-family: Inter, Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: var(--aamps-slate);
    background-color: var(--aamps-parchment);
}

/* Panel / card headers: same grey band as .aamps-page-header so collapsed panels read
   clearly against the parchment page background (the BS default cap-bg is near-invisible). */
.card-header {
    background-color: #eee;
}
[data-bs-theme="dark"] .card-header {
    background-color: #15293F;
}

/* Type scale (brand Typography section). Headings are Playfair Display 500;
   sizes are the brand pt scale converted to px (10pt body = 13px baseline);
   letter-spacing is the brand tracking value expressed as /1000 em. */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    color: var(--aamps-navy);
}

h1 { font-size: 37px; letter-spacing: 0.04em; }   /* Page heading  - 28pt */
h2 { font-size: 24px; letter-spacing: 0.02em; }   /* Section (H2)  - 18pt */
h3 { font-size: 16px; letter-spacing: 0.01em; }   /* Subsection    - 12pt */

/* Brand roles that have no default HTML tag. */
.aamps-display-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    font-size: 64px;            /* Display title - 48pt */
    letter-spacing: 0.06em;
    color: var(--aamps-navy);
}

.aamps-caption {                /* Caption / label - 9pt */
    font-family: Inter, Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.01em;
}

.aamps-eyebrow {                /* Eyebrow / small caps - 8pt */
    font-family: Inter, Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.container {
    padding-left: 0;
    padding-right: 0;
    max-width: 1300px;
}

/* AAMPS brand orange gradient btn-primary (not BS5's default blue) */
.btn-primary {
    border-radius: 5px;
    border: 0;
    color: #fff;
    background: var(--aamps-orange);
    background: linear-gradient(to bottom, var(--aamps-orange) 0%, var(--aamps-orange-dark) 100%);
}

.btn-primary:is(:hover, :focus, :active, .active),
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background: var(--aamps-orange-dark);
    background: linear-gradient(to bottom, var(--aamps-orange-dark) 0%, var(--aamps-orange) 100%);
    border: 0;
    box-shadow: none;
}

/* Logout / destructive actions use the brand Blocked red, not BS5's default #dc3545. */
.btn-danger {
    background-color: #A32D2D;
    border-color: #A32D2D;
}
.btn-danger:is(:hover, :focus, :active, .active) {
    background-color: #8a2626;
    border-color: #8a2626;
}

/* Brand colour utilities - Ported from Site.css:484-531 */
.orange        { color: var(--aamps-orange-light); }
.dark-orange   { color: var(--aamps-orange); font-weight: bold; }
.dark-navy     { color: var(--aamps-navy); font-weight: bold; }
.light-brown   { color: var(--aamps-brown-light); }
.dark-brown    { color: var(--aamps-brown); }

/* Header brand lockup: square icon + AAMPS wordmark (Playfair, navy) acting as the home link. */
.aamps-brand img {
    height: 54px;
    width: 54px;
}
.aamps-brand-wordmark {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: var(--aamps-navy);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 3px;
    margin-left: 16px;
    line-height: 1;
    border-bottom: 1px solid var(--aamps-navy);
    padding-bottom: 3px;
    transition: color 0.15s, text-shadow 0.15s, border-color 0.15s;
}
/* AAMPS home/brand link glows amber on hover, matching the report-nav glow. */
.aamps-brand:hover .aamps-brand-wordmark,
.aamps-brand:focus .aamps-brand-wordmark {
    color: var(--aamps-orange);
    border-bottom-color: var(--aamps-orange);
    text-shadow: 0 0 8px rgba(var(--aamps-orange-rgb), 0.5);
}

/* Shared page header.
   No centre nav (home, sales, etc.): brand + left nav grouped left, welcome + logo grouped
   right, within a centred container (.aamps-header-bar / .aamps-header-split).
   Dev logo + centre nav present (.aamps-header-3zone): brand + left nav on the left, the
   rest of the nav centred, welcome + dev logo on the right. Narrow screens stack/wrap
   centred; the 1fr/auto/1fr grid only kicks in at >=xl where there's room. */
.aamps-header,
.aamps-header-bar {
    margin-bottom: 3px;
}
.aamps-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 22px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.aamps-header-3zone > .hdr-left,
.aamps-header-3zone > .hdr-center,
.aamps-header-3zone > .hdr-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 22px;
    flex: 1 1 100%;
}
/* Narrow: each zone is its own centred row; welcome + dev logo stack so the logo sits
   centred on the bottom row (restores the old stacked-header behaviour). */
.aamps-header-3zone > .hdr-right { flex-direction: column; }
.hdr-dev-logo { object-fit: contain; }

@media (min-width: 1200px) {
    .aamps-header-3zone > .hdr-left   { flex: 1 1 0; justify-content: flex-start; }
    .aamps-header-3zone > .hdr-center { flex: 0 1 auto; justify-content: center; }
    .aamps-header-3zone > .hdr-right  { flex: 1 1 0; flex-direction: row; justify-content: flex-end; gap: 28px; }
}

/* Split header (no centre nav): brand + left nav grouped on the left, welcome + dev logo
   grouped on the right, inside a centred container - the home-header look. */
.aamps-header-split { gap: 16px 22px; }
.aamps-header-split > .hdr-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
}
@media (max-width: 991.98px) {
    .aamps-header-split { justify-content: center !important; }
    .aamps-header-split > .hdr-group { flex: 1 1 100%; justify-content: center; }
    .aamps-header-split > .hdr-group:last-child { flex-direction: column; }
}

/* Welcome dropdown menu: slightly thicker edge than the default 1px. */
#welcomedropdown .dropdown-menu {
    border-width: 3px;
}

/* Centre the Welcome dropdown menu under its toggle when the header is stacked/centred
   (toggle uses data-bs-display="static" so this CSS positions it). 3-zone stacks < xl;
   the split header centres < lg. */
@media (max-width: 1199.98px) {
    .aamps-header-3zone #welcomedropdown .dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}
@media (max-width: 991.98px) {
    .aamps-header-bar #welcomedropdown .dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Page-header bar (back button + centred title). Title is centred via equal-width side
   columns; the back button sits on one side with a balanced spacer on the other. On
   narrow screens it stacks: title on top, back button below. */
.pg-hdr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.pg-hdr > .pg-hdr-title { order: -1; margin: 0; text-align: center; }
@media (min-width: 768px) {
    .pg-hdr { flex-direction: row; gap: 1rem; }
    .pg-hdr > .pg-hdr-side { flex: 1 1 0; min-width: 0; }
    .pg-hdr > .pg-hdr-side:last-child { text-align: right; }
    .pg-hdr > .pg-hdr-title { order: 0; }
}

/* ==========================================================================
   DARK MODE
   Brand dark palette (guidelines p.07) mapped onto Bootstrap 5.3's
   data-bs-theme="dark": Deep Registry canvas, Registry Navy raised surfaces,
   Parchment text, Mist secondary text / hairlines; amber accents unchanged.
   Toggle lives in the header Welcome dropdown, persisted via Scripts/app/theme.js.
   ========================================================================== */
[data-bs-theme="dark"] {
    /* The body rule keys off the brand canvas/text vars, so remap those too. */
    --aamps-parchment: #0E1E2F;       /* page canvas -> Deep Registry */
    --aamps-slate: #B8C5D4;           /* body text -> Mist */

    --bs-body-bg: #0E1E2F;            /* Deep Registry */
    --bs-body-color: #F7F5F0;         /* Parchment */
    --bs-emphasis-color: #F7F5F0;
    --bs-secondary-color: #B8C5D4;    /* Mist */
    --bs-secondary-bg: #15293F;
    --bs-tertiary-bg: #1A3A5C;        /* Registry Navy - raised surfaces */
    --bs-tertiary-color: #B8C5D4;
    --bs-border-color: #2D5A8C;       /* Transit Navy hairline */
    --bs-heading-color: #F7F5F0;
    --bs-link-color: #E8A464;         /* Draw Amber */
    --bs-link-color-rgb: 232, 164, 100;
    --bs-link-hover-color: #C8511F;   /* Settlement Amber */
    --bs-link-hover-color-rgb: 200, 81, 31;
    --bs-card-bg: #15293F;
    --bs-card-cap-bg: #1A3A5C;
    --bs-modal-bg: #15293F;
    --bs-dropdown-bg: #15293F;
    --bs-dropdown-link-color: #F7F5F0;
    --bs-dropdown-border-color: #2D5A8C;
}

[data-bs-theme="dark"] .aamps-brand-wordmark {
    color: #F7F5F0;
    border-bottom-color: #F7F5F0;
}

/* Report headers + nav (light-mode glow; was duplicated inline in each layout) */
.report-nav-pills .nav-link {
    color: var(--aamps-navy, #2d3342);
    font-weight: 500;
    transition: color 0.15s, text-shadow 0.15s;
}
.report-nav-pills .nav-link:hover,
.report-nav-pills .nav-link:focus,
.report-nav-pills .dropdown-toggle.show,
.report-nav-pills .nav-link.active {
    color: var(--aamps-orange, #ff8248);
    background-color: transparent;
    text-shadow: 0 0 8px rgba(var(--aamps-orange-rgb, 255, 130, 72), 0.5);
}
.report-nav-pills .dropdown-item:hover,
.report-nav-pills .dropdown-item:focus,
.report-nav-pills .dropdown-item.active {
    color: #fff;
    background-color: var(--aamps-orange, #ff8248);
}
/* Dev header nav glow ('!important' beats the legacy '.navbar .nav.navbar-nav > li > a' shim). */
header .navbar .nav-link,
header .navbar .nav.navbar-nav > li > a.nav-link {
    color: var(--aamps-navy, #2d3342) !important;
    transition: color 0.15s, text-shadow 0.15s;
}
header .navbar .nav-link:hover,
header .navbar .nav-link:focus,
header .navbar .dropdown-toggle.show,
header .navbar .nav-link.active,
header .navbar .nav.navbar-nav > li > a.nav-link:hover,
header .navbar .nav.navbar-nav > li > a.nav-link:focus,
header .navbar .nav.navbar-nav > li > a.nav-link.active {
    color: var(--aamps-orange, #ff8248) !important;
    background-color: transparent;
    text-shadow: 0 0 8px rgba(var(--aamps-orange-rgb, 255, 130, 72), 0.5);
}
header .navbar .dropdown-item:hover,
header .navbar .dropdown-item:focus,
header .navbar .dropdown-item.active {
    color: #fff;
    background-color: var(--aamps-orange, #ff8248);
}

/* Report headers + nav */
[data-bs-theme="dark"] .report-background {
    background-color: #0E1E2F;
}
[data-bs-theme="dark"] .report-nav-pills .nav-link {
    color: #F7F5F0;
}

/* Page-header bands (markup uses inline background-color:#eee -> !important) */
[data-bs-theme="dark"] .aamps-page-header {
    background-color: #15293F !important;
    color: #F7F5F0;
}

/* Footer */
[data-bs-theme="dark"] footer {
    color: #B8C5D4;
}

/* DrawDown / report summary panels */
[data-bs-theme="dark"] .summary-panel {
    background-color: #15293F;
    border-color: #2D5A8C;
}
[data-bs-theme="dark"] .summary-panel-header {
    color: #F7F5F0;
}

/* Summary header card - only the table sits on white; the surrounding area shows the
   page background. Matches the Sales/BuildingDocs treatment: width 10px shorter on each
   side, centred with mx-auto, taller cells. Use with a transparent wrapper, then
   <div class="rounded shadow-sm overflow-hidden mx-auto aamps-summary-card"> around a
   <table class="table text-center align-middle mb-0 aamps-summary">. */
.aamps-summary-card { background-color: #fff; width: calc(100% - 20px); }
/* Summary header table: previously these were repeated inline on every page
   (width:100%; font-size:0.96em on the table, font-size:14px; font-weight:200 on tbody). */
table.aamps-summary { width: 100%; font-size: 0.96em; }
table.aamps-summary > tbody { font-size: 14px; font-weight: 200; }
table.aamps-summary > thead > tr > th,
table.aamps-summary > tbody > tr > td { padding: 0.6rem 1.2rem; }
table.aamps-summary > thead > tr:first-child > th { border-top: 0; }
table.aamps-summary > tbody > tr:last-child > td { border-bottom: 0; }
/* Small screens: keep columns at full width (no squish) and let the card scroll
   horizontally instead of clipping the table (the card carries .overflow-hidden). */
@media (max-width: 767.98px) {
    .aamps-summary-card { overflow-x: auto !important; }
    table.aamps-summary > thead > tr > th,
    table.aamps-summary > tbody > tr > td { white-space: nowrap; }
}

/* Standard heading above the summary tables (Inter, navy, ~22px). Replaces the
   inconsistent inline font/colour that varied across Sales/DrawDown/etc. */
.aamps-summary-heading {
    font-family: Inter, Helvetica, Arial, sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: var(--aamps-navy);
}

/* NOTE: .light-grey and .dark-grey in Site.css both currently resolve to
   #FF703C (orange) - appears to be a legacy typo but ported verbatim to
   preserve existing behaviour. Revisit when safe. */
.light-grey    { color: var(--aamps-orange-light); }
.dark-grey     { color: var(--aamps-orange-light); }

/* Anchor default + hover - Ported from Site.css:442-445, 385-389.
   BS5 defaults <a> to blue (#0d6efd); AAMPS uses dark navy + orange hover. */
a {
    color: var(--aamps-navy);
    text-decoration: none;
}
/* AAMPS orange clickables - ported from Site.css:447-450.
   Document view/download links (#openFile) and delete links (.deleteFileUploaded)
   render in brand orange across all Documents partials (Attorney/Edit modal +
   BS3 Sales/DrawDown/Vetting/Report). .doc-list a covers the DeveloperSetup
   View All Documents modal which uses its own delete handler. */
#openFile, .deleteFileUploaded, .doc-list a {
    color: var(--aamps-orange);
    text-decoration: none;
}
#openFile:hover, .deleteFileUploaded:hover, .doc-list a:hover {
    color: var(--aamps-orange-dark);
    text-decoration: underline;
    cursor: pointer;
}

/* Transparent-background "View" row action used in Report/DocumentsReport and
   Report/CommentsReport. Reads as a brand-orange text link with an icon;
   glows orange on hover to give it the same visual weight as btn-primary
   without a filled background. */
.btn-background {
    color: var(--aamps-navy);
    background: transparent;
    border: 0;
    padding: 4px 10px;
    text-decoration: none;
    white-space: nowrap;
}
.btn-background:hover,
.btn-background:focus {
    color: var(--aamps-orange);
    background: transparent;
    text-shadow: 0 0 8px rgba(var(--aamps-orange-rgb), 0.9);
    text-decoration: none;
}
a:hover, a:focus {
    color: var(--aamps-orange-light);
    text-decoration: underline;
    cursor: pointer;
}

/* Required-field red border (used by form validation) - Ported from Site.css:498 */
.required-field { border: 1px solid #f00; }

/* Pagination active page - Ported from Site.css:357-363 and adapted for
   BS5's new selector (.page-item.active .page-link instead of
   .pagination > .active > a). AAMPS brand orange instead of BS5 blue. */
.page-item.active .page-link {
    z-index: 2;
    color: #fff;
    background-color: var(--aamps-orange);
    border-color: var(--aamps-orange);
}
.page-link {
    color: var(--aamps-orange-dark);
}
.page-link:hover,
.page-link:focus {
    color: #fff;
    background-color: var(--aamps-orange);
    border-color: var(--aamps-orange);
    box-shadow: 0 0 8px rgba(var(--aamps-orange-rgb), 0.6);
}
/* Disabled pager links - grey text on white background (not BS5's grey
   background), and a not-allowed cursor on hover. Events block on the
   .page-link (BS5 default) so clicks can't trigger :active highlight; the
   cursor comes from the parent .page-item via pointer-event bubbling. */
.page-item.disabled .page-link {
    color: #999;
    background-color: #fff;
    border-color: #dee2e6;
    pointer-events: none;
}
.page-item.disabled {
    cursor: not-allowed;
}

/* Home dashboard app-selector buttons - Ported from Site.css:172-178.
   Flat-corner, padded, Calibri buttons inside p#buttonsDashBoard. */
p#buttonsDashBoard .btn-lg,
.btn-group-lg > .btn {
    border-radius: 0;
    padding: 15px 40px;
    font-size: 18px;
    font-family: Calibri;
    margin: 5px;
}

/* [KEEP] Unified AAMPS page header band - the grey strip at the top of
   landing-style pages where the user picks a development / attorney / etc.
   Single-source-of-truth so every page's header band looks consistent.
   (White working-header band, used on pages inside a sale / attorney record,
   is a different layout - usually a d-flex with Back + heading + actions -
   and is intentionally NOT unified via this class.) */
.aamps-page-header {
    background-color: #eee;
    padding: 12px 15px;
    border-radius: 4px;
    border-top: 1px solid #d4d4d4;
    border-bottom: 1px solid #d4d4d4;
    margin-top: 20px;
    margin-bottom: 20px;
}
.aamps-page-header h1,
.aamps-page-header h2,
.aamps-page-header h3 {
    margin: 0;
    font-size: 30px;          /* H1-ish size for every gray-band heading */
    letter-spacing: 0.04em;
    line-height: 1.1;
    position: relative;
    top: -2px;                /* Playfair sits low in its line box; nudge the caps up so they read centred in the band */
}

/* [KEEP] Ported from Site.css:284-293. AAMPS brand orange for every badge
   (BS5 defaults to transparent bg and relies on .bg-* modifier; without this
   the badge text renders white-on-white in contexts like Dashboard's Total
   Units row). !important so BS5's per-element `.bg-*` or inline overrides
   don't accidentally beat it when we want the AAMPS orange default. */
.badge {
    background-color: var(--aamps-orange) !important;
    color: #fff !important;
    display: inline-block;
    min-width: 10px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10px;
}

/* Grey band background for fieldset legends (Admin Ar* views, Sales/Details Bond Applications). */
.legend-banded {
    width: 100%;
    background-color: var(--aamps-grey-band);
}

/* Legend heading size - Ported from Site.css:1006-1008 */
.legend-heading {
    font-size: 18px;
}

/* fountainG loader animation - Ported from Site.css:824-940, 944-954.
   Vendor prefixes dropped (-o-/-ms-/-webkit-/-moz-); modern browsers only. */
#fountainG {
    position: relative;
    width: 186px;
    height: 15px;
    margin: auto;
}

.fountainG {
    position: absolute;
    top: 0;
    background-color: rgb(0,0,0);
    width: 22px;
    height: 10px;
    margin-top: -10px;
    animation-name: bounce_fountainG;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    animation-direction: normal;
    transform: scale(.3);
    border-radius: 15px;
}

#fountainG_1 { left: 0;     animation-delay: 0.60s; }
#fountainG_2 { left: 23px;  animation-delay: 0.75s; }
#fountainG_3 { left: 46px;  animation-delay: 0.90s; }
#fountainG_4 { left: 70px;  animation-delay: 1.05s; }
#fountainG_5 { left: 93px;  animation-delay: 1.20s; }
#fountainG_6 { left: 116px; animation-delay: 1.35s; }
#fountainG_7 { left: 139px; animation-delay: 1.50s; }
#fountainG_8 { left: 163px; animation-delay: 1.64s; }

@keyframes bounce_fountainG {
    0%   { transform: scale(1);  background-color: rgb(0,0,0); }
    100% { transform: scale(.3); background-color: rgb(255,255,255); }
}

/* BS5's default <hr> is too dark - restore BS3's subtle divider */
hr {
    border: 0;
    border-top: 1px solid #eeeeee;
    opacity: 1;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Logo img in the header - BS5 adds a visible border by default */
.img-thumbnail {
    border: 1px solid #fff;
    padding: 4px;
    background-color: #fff;
}

/* Development-selector tile: image with caption overlay that fades in on hover.
   Used by Attorney/Dashboard, DrawDown/Dashboard, Vetting/Home "select a development" grids. */
.dev-thumbnail {
    display: block;
    padding: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}
.dev-thumbnail:hover {
    cursor: pointer;
}
.dev-thumbnail > img {
    display: block;
    height: auto;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}
.caption {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    height: 100%;
    padding: 2%;
    display: none;
    text-align: center;
    color: #fff !important;
    z-index: 2;
}

/* Caption is a dark hover overlay - keep its headings white (the global heading
   rule colours h1-h6 navy, which is unreadable on the overlay). */
.caption h1, .caption h2, .caption h3,
.caption h4, .caption h5, .caption h6 {
    color: #fff;
}

/* Inline addon prefix/suffix on form inputs - Ported from Site.css:255-282.
   Used for the "R" currency prefix and glyphicon/bi suffix positioning over an input.
   BS5 has `.input-group` for this but AAMPS markup uses the legacy pattern throughout. */
.left-inner-addon {
    position: relative;
}
.left-inner-addon input {
    padding-left: 30px;
}
.left-inner-addon span {
    position: absolute;
    padding: 9px 12px;
    pointer-events: none;
}
.right-inner-addon {
    position: relative;
}
.right-inner-addon input {
    padding-right: 30px;
}
.right-inner-addon i {
    position: absolute;
    right: 0px;
    padding: 10px 12px;
    pointer-events: none;
}

/* Horizontal centering utility - Ported from Site.css:1050-1054.
   Used by Attorney/Edit's Cancel Sale button. BS5 equivalent would be
   `position-absolute start-50 translate-middle-x` but existing markup uses this class. */
.center-element-horizontal {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Input-group addon (prefix/suffix span) - match the adjacent readonly input's
   grey so the prefix and input read as one connected control. BS5 default is
   `--bs-tertiary-bg` (#e9ecef) which is a shade off the readonly `#eee` we set
   in site-bs5.css. Used across reservation money / size fields (R, m²). */
.input-group-text {
    background-color: #eee;
    border-color: #ced4da;
}

/* Tooltips - restore AAMPS orange instead of BS5's white-on-black default.
   BS5 exposes `--bs-tooltip-bg` / `--bs-tooltip-color` CSS variables scoped to
   `.tooltip`, so swapping them is enough to colour the bubble AND the arrow. */
.tooltip {
    --bs-tooltip-bg: var(--aamps-orange);
    --bs-tooltip-color: #fff;
    --bs-tooltip-opacity: 1;
}

/* Navbar link text - match BS3's near-black, not BS5's blue */
.navbar .nav.navbar-nav > li > a,
.navbar .nav.navbar-nav > li > a:hover,
.navbar .nav.navbar-nav > li > a:focus {
    color: #232323;
}

/* Welcome dropdown panel sizing + profile icon - Ported from Site.css:365-379 */
.navbar-login {
    width: 305px;
    padding: 10px 10px 0 10px;
}
.navbar-login-session {
    padding: 0 10px;
}
.icon-size {
    font-size: 87px;
}

/* ==========================================================================
   SECTION 3 - SPACING & COMPONENT TWEAKS   [KEEP]
   Scoped carefully so component internals (modal-title, card-title, etc.)
   keep their BS5 defaults.
   ========================================================================== */

/* Headings inside page content areas - restore BS3-ish top margin.
   Scoped via `.container` / `.container-fluid` and `:not()` exclusions so
   modals, cards, and navbars don't inherit a 20px push. `.container-fluid`
   is added for report PDF pages (see _ReportLayoutPDF.cshtml) which
   otherwise render h4s with only BS5's default 0.5rem bottom margin and
   compress the "Bankable Summary" / similar section headings against
   their tables. */
:is(.container, .container-fluid) :is(h1, h2, h3, h4):not(.card-title):not(.modal-title):not(.card-header) {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Top padding on page body container for header-to-content breathing room.
   `div.container` excludes `<footer class="container">` which has its own
   padding overrides below. */
body > div.container {
    padding-top: 20px;
}

/* Space between the page's content <hr /> (inside a row) and the button
   or whatever sits directly above it. Targets only intra-row hrs. */
.row > hr {
    margin-top: 40px;
}

/* Layout header bar - white across every layout (main, sales, development, report,
   reservation). Each layout has its own <header>; the parchment body would otherwise
   show through. .aamps-page-header is a div, so it's unaffected. */
header {
    background-color: #fff;
}

/* Footer: remove grey background, give text breathing room top & bottom */
footer.container {
    background-color: transparent !important;
    padding-top: 12px;
    padding-bottom: 12px;
}
footer.container h6 {
    padding-top: 10px !important;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}
/* Removed previous `footer.container img { height: 24px !important }` override -
   it was clobbering the `style="height: ..."` set on the layout's AAMPS footer
   logo. Inline 40px (BS3-matching) now wins. */


/* ==========================================================================
   SECTION 4 - FORMS, VALIDATION & BASELINE ELEMENTS   [KEEP]
   --------------------------------------------------------------------------
   Foundational rules so MVC unobtrusive validation, <fieldset>, <legend>,
   <label>, and <textarea> render consistently with BS3 pages.
   Ported from AAMPS.Web/Content/Site.css (line numbers noted per block).
   ========================================================================== */

/* Fieldset / legend - Ported from Site.css:31-41.
   BS5 normalises <legend> to `display: block; width: 100%` which ruins
   native rendering (legend sitting on the top border). Restoring classic
   fieldset+legend look with rounded border. */
fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1em 1.5em 1.5em;
    margin: 0 0 1em 0;
}

legend {
    float: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    margin-bottom: 1em;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.3;
    color: var(--aamps-navy);
    background-color: var(--aamps-grey-band);
    border: 1px solid #000;
    border-radius: 6px;
}

/* Readonly form-control - restore BS3's grey background for read-only inputs
   and show a not-allowed cursor so users can see it isn't editable.
   `.form-select[readonly]` is included because HTML5 doesn't style `readonly`
   on `<select>` natively (only `disabled`), but Razor views use `@readonly`
   to mean "display-only" (e.g. Development/Edit Type field). */
.form-control[readonly],
.form-select[readonly],
.form-select[disabled],
.form-control[disabled] {
    background-color: #eee;
    cursor: not-allowed;
}
/* `readonly` on `<select>` has no native effect - the dropdown still opens
   and changes commit. Block pointer events so readonly selects behave like
   disabled ones. Cursor still shows `not-allowed` via the general-purpose
   `[readonly] { cursor: not-allowed }` rule further down because that rule
   uses `!important`. */
.form-select[readonly] {
    pointer-events: none;
}

/* bootstrap-datepicker plugin doesn't honour the HTML `readonly` attribute -
   typing is blocked, but the picker popup still opens on click and a selection
   writes through. Block pointer events on any readonly date input so the
   popup never opens. `[data-date-format]` is AAMPS's universal marker for
   date inputs (present whether or not the `.datepicker` class is applied -
   e.g. `txtSalesTrBondGrantDueExpiryDt` in Sales/Details + Bonds/Details is
   `form-control` only). Live attribute toggling (BuildingDocs / Sales /
   Bond / DrawDown all flip `readonly` on + off based on checkbox state) keeps
   working - CSS reacts to the attribute change. */
input[readonly][data-date-format],
input.datepicker[readonly],
.form-control[readonly][data-date-format],
.form-control.datepicker[readonly] {
    pointer-events: none;
}

/* Not-allowed cursor on every disabled / readonly control.
   `:disabled` already matches every form element with the disabled attribute
   (input/button/select/textarea/option/fieldset); `.disabled` covers anchors
   and BS5 components that use the class instead. BS5 puts pointer-events:none
   on .btn:disabled which would suppress the cursor - restore it to auto so
   the cursor shows; the disabled HTML attribute still blocks the click. */
:disabled,
[readonly],
.disabled {
    cursor: not-allowed !important;
}
.btn:disabled,
.btn.disabled,
button:disabled {
    pointer-events: auto;
}

/* Twitter typeahead - typeahead.css hardcodes width:396px on .tt-input.
   Override so the input fills its column like sibling form-controls. */
.twitter-typeahead {
    width: 100%;
}
.twitter-typeahead .tt-input,
.twitter-typeahead .tt-hint {
    width: 100% !important;
    box-sizing: border-box;
}
/* Hide the ghost `.tt-hint` when the main `.tt-input` is empty.
   Typeahead.js keeps the previously-shown autocomplete completion text in the
   hint input's `value` even after the user clears the primary input. Because
   the hint sits behind the real input, that stale text renders through and
   collides with the placeholder (e.g. "Access Africa" bleeding through the
   "Search for a Developer" placeholder). `:has()` lets us disable the hint
   colour only when the real input is showing its placeholder. */
.twitter-typeahead:has(.tt-input:placeholder-shown) .tt-hint {
    color: transparent !important;
}
.twitter-typeahead .tt-hint::placeholder {
    color: transparent !important;
}

/* Placeholder colour */
.form-control::placeholder,
.form-select::placeholder {
    color: #999;
    opacity: 1;
}

/* Checkbox / radio tint */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--aamps-orange);     /* fallback for browsers that ignore appearance:none */
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    -webkit-appearance: none;
}
input[type="checkbox"] { border-radius: 0.25em; }
input[type="radio"]    { border-radius: 50%; }

input[type="checkbox"]:checked,
input[type="radio"]:checked,
.form-check-input:checked {
    background-color: var(--aamps-orange);
    border-color: var(--aamps-orange);
}
input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}
input[type="checkbox"]:focus,
input[type="radio"]:focus,
.form-check-input:focus {
    border-color: var(--aamps-orange);
    box-shadow: 0 0 8px rgba(var(--aamps-orange-rgb), 0.6);
    outline: none;
}

/* Disabled checkbox / radio - grey instead of orange. Listed AFTER the
   :checked rule so it wins in cascade. Grey SVG check / dot replaces the
   white one used on enabled state. */
input:disabled[type="checkbox"],
input:disabled[type="radio"],
.form-check-input:disabled {
    background-color: #e9ecef;
    border-color: #adb5bd;
    opacity: 0.65;
}
input:disabled[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
input:disabled[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%236c757d'/%3e%3c/svg%3e");
}

/* MVC editor scaffolding */
.editor-label { margin: 1em 0 0 0; }
.editor-field { margin: 0.5em 0 0 0; }

/* MVC unobtrusive validation helpers */
.field-validation-error     { color: #f00; }
.field-validation-valid     { display: none; }
.input-validation-error     { border: 1px solid #f00; background-color: #fee; }
.validation-summary-errors  { font-weight: bold; color: #f00; }
.validation-summary-valid   { display: none; }
.validationMessage {
    font-size: 11px;
    color: red;
    display: inline-block;
}

/* Label & textarea baseline */
label {
    font-weight: 400;
    font-size: 1.02em;
}

textarea {
    min-height: 75px;
    width: 100%;
}

/* Text input / select focus in soft glowing AAMPS orange. */
.form-control:focus,
.form-select:focus {
    border-color: var(--aamps-orange);
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
                0 0 8px rgba(var(--aamps-orange-rgb), 0.6);
}


/* ==========================================================================
   SECTION 5 - DATATABLES 2.x OVERRIDES
   --------------------------------------------------------------------------
   The DataTables 2.x BS5 integration defaults give its length/search controls
   form-control-sm / form-select-sm sizing and a layout that collapses the
   label-next-to-input spacing. Override to match AAMPS's regular form sizing
   and give a clear gap between the label and the control.
   ========================================================================== */

/* Restore regular form-control height on search + length inputs. */
div.dt-container .dt-length select.form-select-sm,
div.dt-container .dt-search input.form-control-sm {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    min-height: 38px;
}

/* Label + control gap - DataTables 2.x defaults to 0.5em but with the small-
   sizing override above the visual gap reads tight. Bump to 0.75rem. */
div.dt-container div.dt-length label,
div.dt-container div.dt-search label {
    margin-right: 0.75rem;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
}

/* Give the search input a comfortable width - the default auto-width shrinks
   it to ~100px which is too small for anything but single-word searches. */
div.dt-container div.dt-search input.form-control {
    min-width: 260px;
}

/* Pagination: DataTables 2.x renders the pager inside .dt-layout-end
   (ms-auto). On desktop, ensure the ul.pagination itself doesn't center. */
div.dt-container div.dt-paging ul.pagination {
    margin: 0;
    justify-content: flex-end;
}
@media (max-width: 767px) {
    div.dt-container div.dt-paging ul.pagination {
        justify-content: center;
    }
}

/* DataTables 2.x FixedHeader: the floating clone table sits at the top of
   the viewport. Pin a z-index above our AAMPS navbar / modals-ancestor so it
   doesn't render underneath on stacking-context clashes. Force table-layout:
   fixed so the clone's <thead> cells strictly follow the <col> widths that
   FixedHeader's _widths() sets on the colgroup - without this, header-only
   tables under table-layout:auto size to the <th> text content instead of
   matching the body widths, causing visible misalignment.

   Alternative considered (not adopted): swap FixedHeader for a CSS
   `position: sticky; top: 0` rule on thead cells. That skips the
   clone/swap/placeholder dance that FH performs, which eliminates the
   few-pixel layout jump on un-stick that FH's mode transitions can
   cause - but it also drops FH's `fixedHeader-locked` "below" mode
   (parks thead at bottom of table when you scroll past), and requires
   that no scrollable ancestor sits between the table and the viewport
   (rules out .table-responsive wrappers, which we've already removed).
   If the un-stick jump becomes a problem, switch by dropping
   `fixedHeader: true` from each DataTable init and adding
   `position: sticky; top: 0; z-index: 2` to this rule. */
table.dataTable.fixedHeader-floating,
table.dataTable.fixedHeader-locked {
    z-index: 3 !important;
    table-layout: fixed !important;
}

/* AAMPS legacy form pattern: `<div class="col-sm-1"><div class="checkbox">
   <label><input type="checkbox"></label></div></div>` sitting next to a
   form-control / datepicker. The BS3-era `<label>` default margin + the
   wrapper's lack of height push the checkbox to the top of the col, so it
   misaligns with the adjacent input. Pin the wrapper to form-control height
   and flex-center the checkbox inside. */
.col-sm-1 > .checkbox {
    height: 38px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.col-sm-1 > .checkbox > label {
    margin: 0;
}

/* Report / DrawDown filter bars use `display: flex; align-items: end` to
   line up the select + Clear + Filter buttons. Each select sits inside a
   `<div class="mb-3">` wrapper - the mb-3's bottom margin pushes the
   wrapper's margin-box 1rem below the select, and flex `align-items: end`
   aligns margin boxes, so the buttons end up sitting 1rem BELOW the
   select. Zero the wrapper's bottom margin in the filter-bar context so
   the ends line up. */
.drawdown-filter-bar .mb-3,
.bonds-filter-bar .mb-3,
.sales-filter-bar .mb-3,
.developer-filter-bar .mb-3,
.vetting-filter-bar .mb-3 {
    margin-bottom: 0 !important;
}

/* Dark-navy thead marker class - needed for FixedHeader compatibility.
   FixedHeader clones the <table> via cloneNode(false), preserving the
   class list but appending the clone to <body> (outside any `#wrapperId`
   scope). Wrapper-scoped thead-bg CSS therefore doesn't match the clone;
   a class-based selector travels with the table. Apply this class to
   report DataTables and their summaries that want the dark header band. */
table.dt-thead-dark > thead > tr > * {
    background-color: #403f41 !important;
    color: #ffffff !important;
}

/* Broken-image alt-text styling. When an <img> 404s the browser renders
   the alt attribute in place of the picture. Default browser styling for
   that text is very light grey on white and almost unreadable; bump it
   to the AAMPS dark navy so users actually see what was missing. */
img {
    color: #403f41;
    font-weight: 500;
}

/* ---------------------------------------------------------------------------
   Summary panels  -  shared between DrawDown SummaryTable and Bonds Dashboard.
   Originally inline in Views/DrawDown/SummaryTable.cshtml; extracted so the
   Bonds Dashboard reuses them without duplicating ~50 lines of CSS.
   --------------------------------------------------------------------------- */
.summary-panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    margin-bottom: 30px;
    overflow: hidden;
}

.summary-panel-clickable {
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.summary-panel-clickable:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transform: translateY(-2px);
}

.summary-panel-header {
    background-color: #2d3342;
    color: #fff;
    padding: 16px 20px;
    font-size: 1.3em;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-panel-header .panel-hint {
    font-size: 0.7em;
    font-weight: normal;
    opacity: 0.7;
}

.summary-panel-body {
    padding: 8px 0;
}

/* Light variant of panel header (white bg, dark text, right-aligned uppercase caption).
   Used by Bonds Dashboard. Sits flush against the dark navy column-header row below
   (no border-bottom) so the two read as one continuous band. */
.summary-panel-header-light {
    background-color: #fff;
    color: var(--aamps-navy-registry);
    padding: 16px 20px;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.summary-panel-header-light .panel-caption {
    font-size: 0.65em;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #888;
    text-transform: uppercase;
}

/* Bonds Dashboard KPI card. White card; orange top stripe pinned on the active
   card and shown on hover for the rest. */
.kpi-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border-top: 4px solid transparent;
    padding: 18px 18px;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-top-color 0.2s ease;
    display: block;
    height: 100%;
}
.kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transform: translateY(-2px);
    border-top-color: var(--aamps-orange-settlement);
}
.kpi-card.kpi-card-active {
    border-top-color: var(--aamps-orange-settlement);
}
.kpi-card-title {
    font-size: 1.08em;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #6c7a89;
    text-transform: uppercase;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 2.6em;
}
.kpi-card-number {
    font-size: 2.7em;
    font-weight: 700;
    color: var(--aamps-navy-registry);
    margin-top: 6px;
    line-height: 1.1;
}
.kpi-card-sub {
    font-size: 0.95em;
    color: #6c7a89;
    margin-top: 6px;
    line-height: 1.3;
}

/* Bonds Dashboard - rules moved out of Views/Bonds/Dashboard.cshtml's inline
   <style> block so the CSS lives next to the rest of the dashboard rules. */
.bonds-dashboard table { margin-bottom: 0; }
.bonds-dashboard table td,
.bonds-dashboard table th { vertical-align: middle; }
.bonds-dashboard .bank-matrix tbody tr.bank-row td { background-color: #fff; font-weight: 600; }
.bonds-dashboard .bank-matrix tbody tr.bank-row .bonds-bank-name { cursor: pointer; }
.bonds-dashboard .bank-matrix tbody tr.attorney-row td:first-child { padding-left: 36px; }
.bonds-dashboard .bank-matrix tbody tr.grand-total-row td {
    background-color: #fff;
    color: var(--aamps-navy-registry);
    border-top: 2px solid #ddd;
    font-weight: 700;
}
/* Bold: the "Grand Total" row label (first cell) and the Total-units column
   on bank rows. Attorney rows stay regular weight. */
.bonds-dashboard .bank-matrix tbody tr.grand-total-row td:first-child,
.bonds-dashboard .bank-matrix tbody tr.bank-row td:nth-child(2) { font-weight: 700; }

/* Total rows (Unit status, Vetting Summary): navy + bold, matching the All Deals
   Summary total. Set on the cells because Bootstrap colours table cells directly,
   which beats an inherited colour from the row. */
.bonds-dashboard .summary-panel-body table > tbody > tr.fw-bold > td {
    color: var(--aamps-navy-registry);
    font-weight: 700;
}
.bonds-dashboard .ta-pipeline-table td.ta-stage-blank { color: #c0c0c0; }
.bonds-dashboard .panel-block-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #555;
    text-transform: none;
    letter-spacing: 0;
}
.bonds-dashboard .panel-block-form select { width: auto; }

/* Bonds Dashboard table column-header row. Dark navy band sitting flush with
   the white panel header (no white seam between them). */
.bonds-col-header > th {
    background-color: var(--aamps-navy-registry);
    color: #fff !important;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-bottom: 0;
    border-top: 0;
    text-transform: uppercase;
    font-size: 0.78em;
    vertical-align: middle;
}

/* Bonds Dashboard clickable data row - whole row hovers + clicks, mirrors the
   building-docs-row pattern from DrawDown SummaryTable. Each cell stays read-only
   except the row-level onclick (set on the <tr>). The !important + cell-level
   bg override is needed because the Vetting Summary rows carry inline
   --bs-table-bg (green / orange / etc.) which would otherwise win specificity. */
.bonds-clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.bonds-clickable-row:hover > td {
    background-color: #d6dde3 !important;
    color: #1A3A5C !important;
    /* table-striped paints its stripe via an inset box-shadow driven by these
       vars, which sits on top of background-color - override them so striped
       tables (All Deals Summary) highlight like the plain ones. */
    --bs-table-bg-state: #d6dde3;
    --bs-table-bg-type: #d6dde3;
    --bs-table-accent-bg: #d6dde3;
}

/* Bigger row padding on the Bonds Dashboard tables so they read closer to the
   DrawDown SummaryTable metric-row density. Applies to all tables under the
   .bonds-dashboard root. */
.bonds-dashboard table.table > tbody > tr > td {
    padding: 18px 20px;
    vertical-align: middle;
    font-size: 1.05rem;
}
.bonds-dashboard table.table > thead > tr > th { padding: 18px 20px; }

/* Strip the trailing bottom border on the last tbody row (Bootstrap 5's
   default-shadowed --bs-border-width line) so the table flushes against the
   panel border. */
.bonds-dashboard table.table > tbody > tr:last-child > * { border-bottom: 0; }

/* Sold-deals 3-tile grid (tabless) with donut centered below. Clickable tiles
   highlight in Settlement Amber on hover (or focus). */
.sold-tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid #f0f0f0;
}
.sold-tile {
    text-align: center;
    padding: 26px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    color: var(--aamps-navy-registry);
    text-decoration: none !important;
    display: block;
    border-right: 1px solid #f0f0f0;
}
.sold-tile:last-child { border-right: none; }
.sold-tile:hover,
.sold-tile:focus {
    background-color: var(--aamps-orange-settlement);
    color: #fff;
    text-decoration: none !important;
}
.sold-tile:hover .sold-tile-label,
.sold-tile:hover .sold-tile-perc,
.sold-tile:hover .sold-tile-count {
    color: #fff;
}
.sold-tile-label {
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c7a89;
    margin-bottom: 16px;
}
.sold-tile-count {
    font-size: 3.2em;
    font-weight: 700;
    line-height: 1.0;
    color: var(--aamps-navy-registry);
    margin-bottom: 10px;
}
.sold-tile-perc {
    font-size: 1.1em;
    color: #6c7a89;
    font-weight: 500;
}
.sold-donut-below { display: flex; justify-content: center; padding: 0 0 4px; overflow: visible; }
.sold-donut-below > div { overflow: visible !important; }
.bonds-dashboard .summary-panel.sold-deals-panel { overflow: visible; }
.bonds-dashboard .summary-panel.sold-deals-panel .summary-panel-body { overflow: visible; padding-bottom: 8px; }

/* Bond pipeline expand-all - whole BANK header cell is the click target so the
   chevron and the label both trigger expand-all. */
.bonds-expand-all-cell { cursor: pointer; user-select: none; }
.bonds-expand-all {
    display: inline-block;
    color: #fff;
    margin-right: 6px;
    transition: transform 0.2s ease;
}
.bonds-expand-all.expanded { transform: rotate(180deg); }

/* Two-line column header text in bond pipeline ("Documents" / "drafted"). */
.bonds-col-header.bonds-col-header-stacked > th { line-height: 1.15; padding-top: 8px; padding-bottom: 8px; }

/* Bonds Dashboard top filter row. Pills laid out flex-wrap with small labels
   above each control. Reset link sits at the end. */
.bonds-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e1e5ec;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 30, 50, 0.04), 0 6px 16px rgba(15, 30, 50, 0.04);
}
.bonds-filter-row .filter-cell { display: flex; flex-direction: column; min-width: 130px; }
.bonds-filter-row .filter-cell-actions { justify-content: flex-end; }
.bonds-filter-row .filter-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6c7a89;
    margin-bottom: 4px;
    font-weight: 600;
}

/* All Deals Summary (Phase breakdown) embedded on the dashboard via
   Html.RenderAction reuses Report/_AllDealsSummary.cshtml. The partial carries
   legacy chrome (col-md-6 wrapper, h4 title, table-striped + bordered, inline
   dark-grey thead). Strip all of that so it reads as a dashboard table. */
.all-deals-card .summary-panel-body { padding: 0; }
.all-deals-card .clearfix { display: none; }
.all-deals-card #allDealsSummary {
    padding: 0 !important;
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
}
.all-deals-card #allDealsSummary > h4 { display: none; }
.all-deals-card #allDealsSummary table {
    margin: 0 !important;
    border: 0 !important;
}
/* Drop the striped + bordered look. */
.all-deals-card #allDealsSummary table > thead > tr > *,
.all-deals-card #allDealsSummary table > tbody > tr > *,
.all-deals-card #allDealsSummary table > tfoot > tr > * {
    border-left: 0 !important;
    border-right: 0 !important;
    background-image: none !important;
}
.all-deals-card #allDealsSummary table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: transparent !important;
    --bs-table-accent-bg: transparent !important;
}
.all-deals-card #allDealsSummary thead tr th {
    background-color: var(--aamps-navy-registry) !important;
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.78em;
    letter-spacing: 0.05em;
    border: 0 !important;
    padding: 14px 20px;
}
.all-deals-card #allDealsSummary thead tr th { text-align: center; }
.all-deals-card #allDealsSummary thead tr th:first-child { text-align: left; }
.all-deals-card #allDealsSummary tbody tr td,
.all-deals-card #allDealsSummary tfoot tr td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    text-align: center !important;
}
.all-deals-card #allDealsSummary tbody tr td:first-child,
.all-deals-card #allDealsSummary tfoot tr td:first-child { text-align: left !important; }
.all-deals-card #allDealsSummary tbody tr:last-child > td { border-bottom: 0; }
.all-deals-card #allDealsSummary tfoot tr td {
    border-top: 1px solid #ddd;
    border-bottom: 0 !important;
    color: var(--aamps-navy-registry);
    font-weight: 700;
}

/* Bootstrap collapses table rows via height/transition, which is laggy and janky
   on <tr> elements. Snap the attorney sub-rows instantly. */
.bonds-dashboard .bank-matrix .attorney-row.collapsing,
.bonds-dashboard .bank-matrix .attorney-row.collapse {
    transition: none !important;
}
.bonds-dashboard .bank-matrix .attorney-row.collapse:not(.show) { display: none; }

/* More breathing room between dashboard rows / panels. */
.bonds-dashboard > .row,
.bonds-dashboard > .summary-panel { margin-bottom: 2.5rem !important; }
.bonds-dashboard .summary-panel:last-child { margin-bottom: 0 !important; }

/* A touch more definition on the panel edges so the tables stand out from the
   page canvas. Subtle slate-grey border + slightly stronger shadow without
   overwhelming the layout. */
.bonds-dashboard .summary-panel {
    border: 1px solid #e1e5ec;
    box-shadow: 0 1px 2px rgba(15, 30, 50, 0.04), 0 6px 16px rgba(15, 30, 50, 0.06);
}
.bonds-dashboard .summary-panel-clickable:hover {
    border-color: #c8d0db;
}

/* All Deals Summary isn't a whole-panel link (its phase rows click individually),
   but give it the same hover lift as the clickable panels above so it reads as
   part of the same interactive set. */
.all-deals-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.bonds-dashboard .all-deals-card:hover {
    transform: translateY(-2px);
    border-color: #c8d0db;
    box-shadow: 0 1px 2px rgba(15, 30, 50, 0.04), 0 10px 22px rgba(15, 30, 50, 0.12);
}

/* Orange bank name in bond pipeline; attorney sub-rows stay black per design. */
.bonds-bank-name {
    color: var(--aamps-orange-settlement);
    font-weight: 600;
}
.bonds-attorney-name {
    color: #232323;
    font-weight: 500;
}
.bonds-bank-name .bi {
    font-size: 0.85em;
    margin-right: 4px;
}
.bonds-bank-name.collapsed .bi-chevron-down { display: inline-block; }
.bonds-bank-name.collapsed .bi-chevron-up { display: none; }
.bonds-bank-name:not(.collapsed) .bi-chevron-down { display: none; }
.bonds-bank-name:not(.collapsed) .bi-chevron-up { display: inline-block; }

/* Sold deals merged panel: donut + finance-type rows in a single body. */
.sold-deals-merged {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 20px;
}
.sold-deals-merged .sold-donut { flex: 0 0 240px; min-height: 240px; }
.sold-deals-merged .sold-rows { flex: 1 1 320px; }
.sold-deals-merged .sold-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sold-deals-merged .sold-row:last-child { border-bottom: none; }
.sold-deals-merged .sold-row-label { color: var(--aamps-navy-registry); font-weight: 500; }
.sold-deals-merged .sold-row-perc  { color: #6c7a89; font-size: 0.85em; margin-left: 12px; }
.sold-deals-merged .sold-row-count { color: var(--aamps-orange-settlement); font-weight: 700; font-size: 1.15em; }
