﻿/* ============================================================
   Phase 5/6 inline-style extraction — SVG icon utility classes
   (25 Aug 2026). Replaces style="width:Npx;height:Npx;..." on
   inline SVG elements throughout Razor views and JS-generated HTML.
   ─────────────────────────────────────────────────────────── */

/* Icon sizes — square, flex-shrink:0 prevents collapse in flex rows */
.icon-9  { width: 9px;  height: 9px;  flex-shrink: 0; }
.icon-10 { width: 10px; height: 10px; flex-shrink: 0; }
.icon-11 { width: 11px; height: 11px; flex-shrink: 0; }
.icon-12 { width: 12px; height: 12px; flex-shrink: 0; }
.icon-13 { width: 13px; height: 13px; flex-shrink: 0; }
.icon-14 { width: 14px; height: 14px; flex-shrink: 0; }
.icon-15 { width: 15px; height: 15px; flex-shrink: 0; }
.icon-16 { width: 16px; height: 16px; flex-shrink: 0; }
.icon-18 { width: 18px; height: 18px; flex-shrink: 0; }
.icon-20 { width: 20px; height: 20px; flex-shrink: 0; }
.icon-22 { width: 22px; height: 22px; flex-shrink: 0; }
.icon-24 { width: 24px; height: 24px; flex-shrink: 0; }
.icon-28 { width: 28px; height: 28px; flex-shrink: 0; }
.icon-32 { width: 32px; height: 32px; flex-shrink: 0; }
.icon-48 { width: 48px; height: 48px; flex-shrink: 0; }

/* Icon with right margin — for inline button/label icons */
.icon-12-mr3 { width: 12px; height: 12px; margin-right: 3px; }
.icon-12-mr4 { width: 12px; height: 12px; margin-right: 4px; }
.icon-12-mr4-vm { width: 12px; height: 12px; margin-right: 4px; vertical-align: middle; }
.icon-13-mr4 { width: 13px; height: 13px; margin-right: 4px; }
.icon-13-mr5 { width: 13px; height: 13px; margin-right: 5px; }
.icon-13-mr4-vm { width: 13px; height: 13px; margin-right: 4px; vertical-align: middle; }
.icon-13-mr5-vm { width: 13px; height: 13px; margin-right: 5px; vertical-align: middle; }
.icon-13-mr6-vm { width: 13px; height: 13px; margin-right: 6px; vertical-align: middle; }
.icon-14-mr5-vm { width: 14px; height: 14px; margin-right: 5px; vertical-align: middle; }
.icon-14-mr6  { width: 14px; height: 14px; margin-right: 6px; flex-shrink: 0; }
.icon-14-mr8  { width: 14px; height: 14px; margin-right: 8px; flex-shrink: 0; }
.icon-14-muted { width: 14px; height: 14px; flex-shrink: 0; color: var(--bs-muted); }
.icon-15-cp { width: 15px; height: 15px; cursor: pointer; }
.icon-16-mr8 { width: 16px; height: 16px; margin-right: 8px; flex-shrink: 0; }
.icon-16-muted { width: 16px; height: 16px; flex-shrink: 0; color: var(--bs-muted); }
.icon-18-mr6-vm { width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }

/* Utility: small spinning loader icon */
.icon-spin { animation: icon-spin-anim 1s linear infinite; }
@keyframes icon-spin-anim { to { transform: rotate(360deg); } }

/* Utility: nowrap — replaces style="white-space:nowrap;" on buttons/links */
.u-nowrap { white-space: nowrap; }

/* Utility: visually hidden but JS-controlled (replaces style="display:none;" for initial state) */
/* NOTE: elements with display:none driven by Razor expressions (e.g. @(cond ? "" : "none"))    */
/* are NOT candidates — those are runtime server-rendered states, not static inline CSS.         */

/* ============================================================
   BRISTOW & SUTOR — COMPONENTS
   Buttons, Cards, Alerts, Badges, Data Table,
   Modals, Toast, Breadcrumb, Dropdown, Icons
   ============================================================ */

/* ================================================================
   1. BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.52rem;
  padding: 0.74rem 17.6px; border-radius: var(--radius-pill);
  font-family: var(--font-primary); font-size: var(--text-body); font-weight: 700;
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              color var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none; vertical-align: middle; line-height: 1;
}
.btn:focus-visible { outline: 2px solid var(--bs-gold); outline-offset: 3px; }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* Variants */
.btn-primary { background: var(--bs-dark-blue); color: var(--bs-white); }
.btn-primary:hover { background: #003d58; box-shadow: 0 4px 12px rgba(0,45,65,0.3); }

.btn-gold { background: var(--bs-gold); color: var(--bs-white); }
.btn-gold:hover { background: #a67a32; box-shadow: 0 4px 12px rgba(190,140,60,0.35); }

.btn-outline {
  background: transparent; color: var(--bs-dark-blue);
  border-color: var(--bs-dark-blue);
}
.btn-outline:hover { background: var(--bs-dark-blue); color: var(--bs-white); }

.btn-ghost {
  background: transparent; color: var(--bs-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--bs-white); }

.btn-turq { background: var(--bs-turquoise); color: var(--bs-white); }
.btn-turq:hover { background: #1fb5bc; }

.btn-pink { background: var(--bs-pink); color: var(--bs-white); }
.btn-pink:hover { background: #c0366a; }

/* Sizes */
.btn-sm { padding: 0.52rem 12.8px; font-size: var(--text-xs); }
.btn-lg { padding: 1.04rem 24px; font-size: var(--text-control); }

/* Icon buttons */
.btn.btn-icon,
.btn.btn-icon-right { gap: 0.44rem; }
.btn.btn-icon svg, .btn.btn-icon i,
.btn.btn-icon-right svg, .btn.btn-icon-right i { flex-shrink: 0; display: block; }
/* Icon order within flex container:
   - btn-icon: icon first in HTML (uses order:0, text follows naturally)
   - btn-icon-right: text first in HTML, icon needs order:2 to appear after
   Actually simpler: just put icon AFTER text in HTML for right variant.
   No CSS order manipulation needed. */

.btn-icon-only {
  padding: 0; width: 32px; height: 32px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
}
.btn-icon-only.btn-sm { width: 25.6px; height: 25.6px; border-radius: var(--radius-sm); }
.btn-icon-only.btn-lg { width: 38.4px; height: 38.4px; border-radius: var(--radius-lg); }

/* Button row wrappers */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.74rem; margin-bottom: 1.19rem; align-items: center; }
.dark-btn-row {
  background: var(--bs-dark-blue); border-radius: var(--radius-lg);
  padding: 1.78rem 22.4px; margin: 1.19rem 0;
}

/* ================================================================
   2. CARDS
   ================================================================ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1.78rem; margin-bottom: 2.37rem; }

.card {
  background: var(--bs-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-accent { height: 4px; }
.card-accent.blue  { background: var(--bs-dark-blue); }
.card-accent.gold  { background: var(--bs-gold); }
.card-accent.turq  { background: var(--bs-turquoise); }
.card-accent.pink  { background: var(--bs-pink); }

.card-body { padding: 1.78rem 20.8px; }
.card-icon {
  width: 35.2px; height: 35.2px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.19rem;
}
.card-icon svg { width: 17.6px; height: 17.6px; }
.card-icon-blue  { background: var(--bs-dark-blue); }
.card-icon-gold  { background: var(--bs-gold); }
.card-icon-turq  { background: var(--bs-turquoise); }
.card-icon-pink  { background: var(--bs-pink); }

.card-body h3  { font-size: var(--text-section); line-height: var(--line-section); font-weight: 700; color: var(--bs-dark-blue); margin-bottom: 0.74rem; }
.card-body p   { font-size: var(--text-body); color: var(--bs-muted-text); line-height: 1.65; margin-bottom: 1.33rem; }
.card-link {
  font-size: var(--text-body); font-weight: 700; color: var(--bs-gold-text);
  text-decoration: none; border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}
.card-link:hover { border-bottom-color: var(--bs-gold); color: var(--bs-gold); }
.card-link:focus-visible { outline: 2px solid var(--bs-gold); outline-offset: 2px; border-radius: 2px; }

/* ================================================================
   3. ALERT BANNERS
   ================================================================ */
.alerts-block { display: flex; flex-direction: column; gap: 0.89rem; margin-bottom: 2.37rem; }

.alert {
  display: flex; align-items: flex-start; gap: 0.89rem;
  padding: 1.04rem 14.4px; border-radius: var(--radius-md);
  font-size: var(--text-body); line-height: var(--line-body); border-left: 4px solid;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.07rem; }
.alert-info    { background: #f0f8ff; border-color: var(--bs-turquoise); color: #1a4a60; }
.alert-success { background: #f0fdf4; border-color: #22c55e; color: #14532d; }
.alert-warning { background: #fffbeb; border-color: #f59e0b; color: #7c4a00; }
.alert-danger  { background: #fff0f5; border-color: var(--bs-pink); color: #7a1235; }

/* ================================================================
   4. BADGES
   ================================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.22rem 8px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-active  { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-closed  { background: #f1f5f9; color: #64748b; }
.badge-danger  { background: var(--bs-pink-10); color: var(--bs-pink); }
.badge-new     { background: var(--bs-turq-10); color: #0e7490; }
.badge-review  { background: var(--bs-dark-blue-10); color: var(--bs-dark-blue); }

/* ================================================================
   5. DATA TABLE (sortable + paginated)
   ================================================================ */
.dt-wrapper {
  background: var(--bs-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden; margin-bottom: 2.37rem;
}
.dt-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.89rem;
  padding: 1.19rem 16px; border-bottom: 1px solid var(--bs-light-grey); flex-wrap: wrap;
}
.dt-search {
  display: flex; align-items: center; gap: 0.59rem;
  background: var(--bs-off-white); border: 1.5px solid var(--bs-light-grey);
  border-radius: var(--radius-md); padding: 0 9.6px; min-width: 176px;
}
.dt-search svg { width: 12.8px; height: 12.8px; stroke: var(--bs-mid-grey); flex-shrink: 0; }
.dt-search-input {
  border: none; background: none; padding: 0.67rem 0;
  font-family: var(--font-primary); font-size: var(--text-body); color: var(--bs-body-text);
  width: 100%; outline: none;
}
.dt-actions { display: flex; align-items: center; gap: 0.59rem; flex-wrap: wrap; }
.dt-per-page-select {
  border: 1.5px solid var(--bs-light-grey); border-radius: var(--radius-md);
  padding: 0.52rem 9.6px; font-family: var(--font-primary); font-size: var(--text-body);
  color: var(--bs-dark-blue); background: var(--bs-white); cursor: pointer;
}

.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-body); }
.data-table thead { background: var(--bs-dark-blue); }
.data-table thead th {
  padding: 0.96rem 12.8px; color: var(--bs-white); font-size: var(--text-sm);
  font-weight: 700; text-align: left; white-space: nowrap; letter-spacing: 0.04em;
}
.data-table thead th.sortable-col { cursor: pointer; user-select: none; }
.data-table thead th.sortable-col:hover { background: rgba(255,255,255,0.08); }
.sort-icon { color: rgba(255,255,255,0.6); font-size: var(--text-xs); }
.data-table tbody tr { border-bottom: 1px solid var(--bs-light-grey); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bs-off-white); }
.data-table tbody td { padding: 0.89rem 12.8px; color: var(--bs-body-text); vertical-align: middle; }
.dt-actions-cell { white-space: nowrap; display: flex; gap: 0.3rem; }

/* ================================================================
   5b. SHARED FILTER PILLS (quick-filter row, replaces static KPI cards
       on several admin screens — see Admin > Telephone/Letter Templates)
   ================================================================ */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill-sep { width: 1.5px; align-self: stretch; background: var(--bs-light-grey); margin: 2px 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--bs-light-grey); background: var(--bs-white);
  color: var(--bs-muted-text); font-family: var(--font-primary);
  font-size: var(--text-body); font-weight: 600; cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}
.pill-count {
  background: var(--bs-off-white); color: inherit;
  font-size: var(--text-xs); font-weight: 700; border-radius: var(--radius-pill);
  padding: 1.6px 7px; min-width: 19.2px; text-align: center;
}
.pill:hover:not(.active) { background: var(--bs-off-white); }
.pill:focus-visible { outline: 2px solid var(--bs-gold); outline-offset: 2px; }

.pill.p-blue  { border-color: var(--bs-dark-blue);  color: var(--bs-dark-blue); }
.pill.p-green { border-color: #22c55e;              color: #178a41; }
.pill.p-turq  { border-color: var(--bs-turquoise);  color: #0e7490; }
.pill.p-gold  { border-color: var(--bs-gold);       color: #8a651f; }
.pill.p-pink  { border-color: var(--bs-pink);       color: var(--bs-pink); }

.pill.p-blue.active  { background: var(--bs-dark-blue);  color: #fff; }
.pill.p-green.active { background: #22c55e;              color: #fff; }
.pill.p-turq.active  { background: var(--bs-turquoise);  color: #fff; }
.pill.p-gold.active  { background: var(--bs-gold);       color: #fff; }
.pill.p-pink.active  { background: var(--bs-pink);       color: #fff; }
.pill.active .pill-count { background: rgba(255,255,255,0.28); color: #fff; }

.dt-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.89rem 16px; border-top: 1px solid var(--bs-light-grey);
  flex-wrap: wrap; gap: 1.19rem;
}
.dt-footer-left { display: flex; align-items: center; gap: 1.19rem; }
.dt-info { font-size: var(--text-xs); color: var(--bs-muted-text); white-space: nowrap; }
.dt-pagination { display: flex; gap: 0.3rem; align-items: center; }
.dt-page-btn {
  min-width: 25.6px; height: 25.6px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--bs-light-grey);
  background: var(--bs-white); color: var(--bs-dark-blue);
  font-family: var(--font-primary); font-size: var(--text-body); font-weight: 600;
  cursor: pointer; transition: all var(--transition-fast);
  display: inline-flex; align-items: center; justify-content: center;
}
.dt-page-btn:hover { background: var(--bs-off-white); }
.dt-page-btn.active {
  background: var(--bs-dark-blue); color: var(--bs-white); border-color: var(--bs-dark-blue);
}
.dt-page-btn:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--bs-light-grey); background: var(--bs-off-white); }
.dt-page-btn:focus-visible { outline: 2px solid var(--bs-gold); outline-offset: 2px; }
.dt-page-nav { padding: 0 11.2px; font-weight: 700; }

/* Simple table (legacy) */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); margin-bottom: 2.37rem; }
.bs-table { width: 100%; border-collapse: collapse; font-size: var(--text-body); background: var(--bs-white); }
.bs-table thead { background: var(--bs-dark-blue); }
.bs-table thead th { padding: 0.96rem 12.8px; color: var(--bs-white); font-weight: 700; text-align: left; font-size: var(--text-sm); }
.bs-table tbody tr { border-bottom: 1px solid var(--bs-light-grey); }
.bs-table tbody td { padding: 0.89rem 12.8px; }
.bs-table tbody tr:hover { background: var(--bs-off-white); }

/* ================================================================
   6. MODAL SYSTEM
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,22,40,0.65); backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: 1.78rem 12.8px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal-dialog {
  background: var(--bs-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%; max-width: min(432px, calc(100vw - 25.6px));
  max-height: min(90vh, 656px); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.is-open .modal-dialog { transform: translateY(0) scale(1); }
.modal-dialog.wide { max-width: min(688px, calc(100vw - 25.6px)); }
/* Centered message, for short single-line confirmations (e.g.
   BSDialog.alert(..., { compact: true })) rather than the default left-align sized for
   longer or multi-line messages. Width for this variant is set inline via JS (openDialog) -
   the dialog box's own max-width is already an inline style, which would otherwise override
   any max-width set here. */
.modal-dialog.bs-dialog-compact .modal-body { text-align: center; }
.modal-dialog.bs-dialog-compact .modal-footer { justify-content: center; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.78rem 22.4px 12.8px; border-bottom: 1px solid var(--bs-light-grey);
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: var(--text-section); line-height: var(--line-section); font-weight: 700; color: var(--bs-dark-blue);
  display: flex; align-items: center; gap: 0.59rem;
}
.modal-header-warning h3 { color: #92400e; }
.modal-header-error   h3 { color: var(--bs-pink); }
.modal-header-info    h3 { color: #075985; }
.modal-header-alert   h3 { color: #92400e; }
.modal-header-success h3 { color: #166534; }

.modal-close {
  background: none; border: none; font-size: 1.4rem; cursor: pointer;
  color: var(--bs-mid-grey); line-height: 1; padding: 0.3rem 4.8px;
  border-radius: var(--radius-sm); transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}
.modal-close:hover { color: var(--bs-dark-blue); background: var(--bs-off-white); }
.modal-close:focus-visible { outline: 2px solid var(--bs-gold); outline-offset: 2px; }

/* Dark full-bar modal header — matches Cases _AoeModal.cshtml's .aoe-header (dark-blue
   background, white icon/title, rounded top corners). Originally introduced per-page in
   documents.css / work-rundiary.css; centralized here so any screen can opt in. */
.modal-header-dark {
  background: var(--bs-dark-blue); border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header-dark-left { display: flex; align-items: center; gap: 0.74rem; color: #fff; }
.modal-header-dark-left svg { color: rgba(255,255,255,0.85); }
.modal-header-dark .modal-title { color: #fff; }
.modal-header-dark .modal-close { color: rgba(255,255,255,0.75); }
.modal-header-dark .modal-close:hover { color: #fff; background: rgba(255,255,255,0.12); }

.modal-body { padding: 1.78rem 22.4px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal-body p { font-size: var(--text-body); line-height: 1.7; color: var(--bs-body-text); }

/* BSDialog confirm/alert/prompt message — each "\n\n"-separated paragraph is now its own
   child element with an explicit 10px margin (see openDialog() in app-shell.js), so the
   gap between paragraphs is controlled directly instead of inheriting line-height. Sized up
   from 0.92rem — the small size made the dialog's padding read as an even bigger gap. */
#bsDialogMessage { font-size: 1.1rem; line-height: 1.5; color: var(--bs-body-text); }
/* opts.icon (see openDialog() in app-shell.js) - WPF MessageBoxImage.Question look: a blue
   circle "?" pinned to the top-left of the whole message, with the message given matching
   left padding - not a float, which only wraps the one paragraph tall enough to clear it,
   leaving every other paragraph flush left instead of lined up under the first. Both rules
   are ID+class combinations so they beat the plain #bsDialogMessage rule above on
   specificity (no !important needed), and only apply when a call actually asks for an icon,
   so every other dialog is unaffected. */
#bsDialogMessage.bs-dialog-message-with-icon {
    position: relative;
    padding-left: 44.8px;
    min-height: 32px;
}
.bs-dialog-icon-question {
    position: absolute;
    top: 0.1rem; left: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #1565c0;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.15rem;
    flex-shrink: 0;
}
#bsDialogMessage.bs-dialog-message-black { color: #000; }

/* This small confirm/alert/prompt popup inherited the same 1.78rem top/bottom padding as
   every other (larger) modal's .modal-body — scoped down here only, so bigger content
   modals elsewhere keep their normal breathing room. */
#bsDialogModal .modal-body { padding-top: 0.15rem; padding-bottom: 0.15rem; }
.bs-dialog-body-pre { white-space: pre-wrap; }
.bs-dialog-input-wrap { margin-top: 14px; display: none; }

/* The header's own bottom padding (1.78rem top / 12.8px bottom from the shared rule) was
   a second, separate contributor to the gap above the first paragraph — tightened here too. */
#bsDialogModal .modal-header { padding-top: 0.9rem; padding-bottom: 0.7rem; }

/* Centre the dialog title — scoped to this shared confirm/alert/prompt popup only, other
   modals across the app keep their default left-aligned title + right-aligned close button. */
#bsDialogModal .modal-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
#bsDialogModal .modal-header h3 {
    grid-column: 2;
    justify-content: center;
    text-align: center;
    font-size: 1.3rem;
}

/* Gap before No/Yes was mostly the footer's own top padding (1.19rem from the shared
   .modal-footer rule) stacking with .modal-body's own bottom padding — tightened here too. */
#bsDialogModal .modal-footer { padding-top: 0.3rem; }
#bsDialogModal .modal-close {
    grid-column: 3;
    justify-self: end;
}

.modal-footer {
  padding: 1.19rem 22.4px 19.2px; border-top: 1px solid var(--bs-light-grey);
  display: flex; justify-content: flex-end; gap: 0.74rem; flex-shrink: 0;
}

/* ================================================================
   7. TOAST NOTIFICATIONS
   ================================================================ */
.toast-container {
  position: fixed; top: 80px; right: 20px; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 0.74rem; pointer-events: none;
}
.toast {
  background: var(--bs-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1.04rem 14.4px;
  min-width: 224px; max-width: 288px; pointer-events: all;
  border-left: 4px solid var(--bs-turquoise);
  font-family: var(--font-primary); font-size: var(--text-body); color: var(--bs-body-text);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275);
}
.toast.show      { transform: translateX(0); }
.toast-info      { border-left-color: var(--bs-turquoise); }
.toast-success   { border-left-color: #22c55e; }
.toast-warning   { border-left-color: #f59e0b; }
.toast-error     { border-left-color: var(--bs-pink); }

/* ================================================================
   8. BREADCRUMB
   ================================================================ */
.bs-breadcrumb { }
.bs-breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  list-style: none; padding: 0.74rem 0; margin: 0;
}
.bc-item {
  display: flex; align-items: center;
  font-size: var(--text-body); color: var(--bs-muted-text);
}
.bc-item + .bc-item::before {
  content: '/'; margin: 0 6.4px; color: var(--bs-light-grey); font-weight: 400;
}
.bc-item a { color: var(--bs-gold); font-weight: 600; text-decoration: none; }
.bc-item a:hover { text-decoration: underline; }
.bc-item.active { color: var(--bs-dark-blue); font-weight: 700; }

/* Dark background variant */
.bs-breadcrumb.bc-dark { background: var(--bs-dark-blue); padding: 0.74rem 12.8px; border-radius: var(--radius-md); display: inline-flex; }
.bs-breadcrumb.bc-dark .bc-item + .bc-item::before { color: rgba(255,255,255,0.35); }
.bs-breadcrumb.bc-dark .bc-item a { color: var(--bs-gold); }
.bs-breadcrumb.bc-dark .bc-item a:hover { color: #fff; }
.bs-breadcrumb.bc-dark .bc-item.active { color: #fff; }

/* Gold active variant */
.bs-breadcrumb.bc-gold .bc-item.active { color: var(--bs-gold); }
.bs-breadcrumb.bc-gold .bc-item + .bc-item::before { color: var(--bs-gold); opacity: 0.5; }

/* ================================================================
   9. DROPDOWN MENUS
   ================================================================ */
.bs-dropdown { position: relative; display: inline-block; }

.dropdown-toggle { display: inline-flex; align-items: center; gap: 0.44rem; }
.dd-chevron {
  width: 11.2px; height: 11.2px; flex-shrink: 0;
  transition: transform var(--transition-fast);
}
.bs-dropdown.is-open .dd-chevron { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: var(--z-dropdown);
  background: var(--bs-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--bs-light-grey);
  min-width: 152px; list-style: none; margin: 0; padding: 0.44rem 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transition: opacity var(--transition-fast), visibility var(--transition-fast),
              transform var(--transition-fast);
}
.dropdown-menu-right { left: auto; right: 0; }
.bs-dropdown.is-open .dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex; align-items: center;
  padding: 0.67rem 14.4px; font-size: var(--text-body); color: var(--bs-dark-blue);
  font-weight: 500; text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.dropdown-item:hover { background: var(--bs-off-white); color: var(--bs-gold); }
.dropdown-item:focus { background: var(--bs-off-white); outline: none; }
.dropdown-item:focus-visible { background: var(--bs-off-white); color: var(--bs-gold); outline: 2px solid var(--bs-gold); outline-offset: -2px; }

.dd-divider {
  height: 0.8px; background: var(--bs-light-grey); margin: 0.3rem 0;
}

/* Header nav dropdowns — offset matches generic dropdown (6px) */
.header-nav .bs-dropdown { }
.header-nav .dropdown-menu { top: calc(100% + 6px); min-width: 160px; }

/* ================================================================
   10. ICON GRID
   ================================================================ */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.74rem;
}
.icon-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.59rem; padding: 1.04rem 6.4px; border-radius: var(--radius-md);
  background: var(--bs-white); border: 1.5px solid var(--bs-light-grey);
  cursor: pointer; transition: all var(--transition-fast);
  text-align: center;
}
.icon-tile:hover {
  border-color: var(--bs-gold); background: var(--bs-gold-10);
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.icon-tile svg, .icon-tile i { width: 19.2px; height: 19.2px; stroke: var(--bs-dark-blue); stroke-width: 1.5; }
.icon-name {
  font-size: var(--text-xs); color: var(--bs-muted-text); font-weight: 600;
  word-break: break-all; line-height: 1.3; max-width: 72px;
}

/* ================================================================
   11. LOADING SPINNER
   ================================================================ */
.bs-spinner {
  display: inline-block;
  width: 25.6px; height: 25.6px;
  border: 3px solid var(--bs-light-grey);
  border-top-color: var(--bs-dark-blue);
  border-radius: 50%;
  animation: bs-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.bs-spinner.spinner-sm { width: 14.4px; height: 14.4px; border-width: 2px; }
.bs-spinner.spinner-lg { width: 38.4px; height: 38.4px; border-width: 4px; }
.bs-spinner.spinner-gold  { border-top-color: var(--bs-gold); }
.bs-spinner.spinner-turq  { border-top-color: var(--bs-turquoise); }
.bs-spinner.spinner-white { border-color: rgba(255,255,255,0.3); border-top-color: var(--bs-white); }

@keyframes bs-spin {
  to { transform: rotate(360deg); }
}

/* Loading overlay — cover a container while data loads */
.loading-overlay {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  border-radius: inherit;
}

/* Inline button spinner — replaces icon while submitting */
.btn.is-loading { pointer-events: none; position: relative; }
.btn.is-loading .btn-label { opacity: 0; }
.btn.is-loading::after {
  content: '';
  position: absolute; width: 12.8px; height: 12.8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: bs-spin 0.7s linear infinite;
}

/* Full-page loader — blocks the whole page (not just one button) for operations that can take
   a while (e.g. an arrangement save on a case with many associates), so there's no way to click
   anything else while it's in flight. Sits above modals AND toasts (--z-toast is the highest
   existing layer) since it needs to win even if a toast fires right as it's dismissed. */
.bs-fullpage-loader {
  display: none;
  position: fixed; inset: 0; z-index: 3500;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(2px);
}
.bs-fullpage-loader.show { display: flex; }
/* loading.gif's lightest spokes are near-white, which nearly disappears against this overlay's
   own light background - the dark-navy chip behind it (matching --bs-dark-blue elsewhere in this
   theme) keeps the full spinner visible regardless of what's blurred underneath. */
.bs-fullpage-loader-chip {
  display: flex; align-items: center; justify-content: center;
  width: 128px; height: 128px; border-radius: 50%;
  background: var(--bs-dark-blue, #002d41);
  box-shadow: 0 12px 30px rgba(0, 45, 65, 0.35);
}
.bs-fullpage-loader-img { width: 72px; height: 72px; object-fit: contain; }
/* Optional status text below the spinner (BSLoader.show(message)) - empty/omitted by default so
   the pre-existing 3 call sites that never pass a message render exactly as before. */
.bs-fullpage-loader-message {
  color: var(--bs-dark-blue, #002d41);
  font-size: 15px; font-weight: 600; text-align: center; max-width: 320px;
}
.bs-fullpage-loader-message:empty { display: none; }
/* Programmatically focused (BSLoader.show moves focus here for screen-reader announcement) but
   not an interactive control - no visual focus ring needed, the announcement itself is the point. */
.bs-fullpage-loader-message:focus { outline: none; }

/* ================================================================
   12. SKELETON LOADERS
   ================================================================ */
@keyframes bs-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bs-light-grey) 25%, #eef1f4 50%, var(--bs-light-grey) 75%);
  background-size: 1200px 100%;
  animation: bs-shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
  display: block;
}
.skeleton-text  { height: 11.2px; margin-bottom: 0.59rem; border-radius: var(--radius-sm); }
.skeleton-text:last-child { width: 70%; }
.skeleton-title { height: 17.6px; margin-bottom: 0.89rem; border-radius: var(--radius-sm); }
.skeleton-avatar { width: 35.2px; height: 35.2px; border-radius: 50%; flex-shrink: 0; }
.skeleton-badge { width: 51.2px; height: 17.6px; border-radius: var(--radius-pill); }
.skeleton-btn   { height: 30.4px; border-radius: var(--radius-pill); }
.skeleton-card {
  background: var(--bs-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 1.78rem 20.8px; overflow: hidden;
}

/* ================================================================
   13. EMPTY STATE
   ================================================================ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  text-align: center; color: var(--bs-muted-text);
}
.empty-state-icon {
  width: 51.2px; height: 51.2px; border-radius: 50%;
  background: var(--bs-off-white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-sm);
}
.empty-state-icon svg,
.empty-state-icon i { width: 22.4px; height: 22.4px; stroke: var(--bs-mid-grey); stroke-width: 1.5; }
.empty-state h4 { font-size: var(--text-body); line-height: var(--line-body); font-weight: 700; color: var(--bs-dark-blue); margin-bottom: 0.44rem; }
.empty-state p  { font-size: var(--text-body); line-height: 1.6; max-width: 256px; margin-bottom: var(--space-sm); }

/* Empty table state — rendered inside tbody */
.dt-empty-row td {
  padding: 0 !important; border: none !important;
}

/* ================================================================
   14. STAT / KPI CARDS  (used on dashboard)
   ================================================================ */
.stat-card {
  background: var(--bs-white); border-radius: var(--radius-lg);
  padding: 1.63rem 19.2px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 0.44rem;
  border-top: 4px solid var(--bs-light-grey);
  transition: box-shadow var(--transition-normal);
}
.stat-card:hover { box-shadow: var(--shadow-lg); }
.stat-card.sc-blue  { border-top-color: var(--bs-dark-blue); }
.stat-card.sc-gold  { border-top-color: var(--bs-gold); }
.stat-card.sc-turq  { border-top-color: var(--bs-turquoise); }
.stat-card.sc-pink  { border-top-color: var(--bs-pink); }
.stat-card.sc-green { border-top-color: var(--color-success); }

.stat-label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bs-muted-text); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--bs-dark-blue); line-height: 1.1; }
.stat-delta { font-size: var(--text-xs); font-weight: 600; display: flex; align-items: center; gap: 0.3rem; }
.stat-delta.up   { color: var(--color-success); }
.stat-delta.down { color: var(--bs-pink-text); }
.stat-delta.flat { color: var(--bs-muted-text); }

/* ================================================================
   15. COLOUR USAGE GUIDE (style guide only)
   ================================================================ */
.usage-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.48rem; margin-bottom: 2.37rem; }
.usage-rule-card {
  border-radius: var(--radius-lg); padding: 1.48rem 17.6px;
  border-left: 4px solid; background: var(--bs-white); box-shadow: var(--shadow-sm);
}
.usage-rule-card.uc-blue  { border-color: var(--bs-dark-blue); }
.usage-rule-card.uc-gold  { border-color: var(--bs-gold); }
.usage-rule-card.uc-turq  { border-color: var(--bs-turquoise); }
.usage-rule-card.uc-pink  { border-color: var(--bs-pink); }
.usage-rule-card h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.59rem; color: var(--bs-dark-blue); }
.usage-rule-card ul { padding-left: 1.19rem; }
.usage-rule-card li { font-size: 0.82rem; line-height: 1.8; color: var(--bs-body-text); }
.usage-rule-card .do-tag   { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.usage-rule-card .do-tag.yes { color: var(--color-success); }
.usage-rule-card .do-tag.no  { color: var(--bs-pink); }

/* ================================================================
   16. ACCESSIBILITY GUIDE (style guide only)
   ================================================================ */
.a11y-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.48rem; margin-bottom: 2.37rem; }
.a11y-card {
  background: var(--bs-white); border-radius: var(--radius-lg);
  padding: 1.48rem 17.6px; box-shadow: var(--shadow-sm);
}
.a11y-card h4  { font-size: 0.88rem; font-weight: 700; color: var(--bs-dark-blue); margin-bottom: 0.74rem; display: flex; align-items: center; gap: 0.59rem; }
.a11y-card p   { font-size: 0.82rem; line-height: 1.7; color: var(--bs-muted); margin-bottom: 0.59rem; }
.a11y-card code { font-family: 'Courier New', monospace; font-size: 0.78rem; background: var(--bs-off-white); padding: 0.15rem 4.8px; border-radius: 3px; color: var(--bs-dark-blue); }

.contrast-grid { display: flex; flex-wrap: wrap; gap: 0.89rem; margin-bottom: 1.78rem; }
.contrast-chip {
  display: flex; align-items: center; justify-content: center;
  padding: 0.74rem 14.4px; border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 700; min-width: 128px;
  position: relative;
}
.contrast-ratio {
  position: absolute; bottom: 4px; right: 8px;
  font-size: 0.6rem; font-weight: 800; opacity: 0.75;
}

.kbd-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.kbd-table th { text-align: left; padding: 0.59rem 9.6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bs-muted); border-bottom: 2px solid var(--bs-light-grey); }
.kbd-table td { padding: 0.67rem 9.6px; border-bottom: 1px solid var(--bs-off-white); vertical-align: middle; }
.kbd-table tr:last-child td { border-bottom: none; }
kbd {
  display: inline-block; padding: 0.15rem 6.4px; border-radius: 3px;
  font-family: 'Courier New', monospace; font-size: 0.78rem; font-weight: 700;
  background: var(--bs-off-white); border: 1px solid var(--bs-light-grey);
  box-shadow: 0 1px 0 var(--bs-light-grey);
  color: var(--bs-dark-blue); white-space: nowrap;
}

/* ================================================================
   17. PRINT STYLES
   ================================================================ */
@media print {
  .site-header,
  .mobile-nav-overlay,
  .mobile-nav-panel,
  .modal-overlay,
  .toast-container,
  .btn-header-contact,
  .btn-header-pay,
  .header-menu-btn,
  .dt-toolbar,
  .dt-footer,
  .hex-deco,
  .tov-compare { display: none !important; }

  body { background: white; color: black; font-size: 11pt; }
  .section { padding: 16pt 0; max-width: 100%; }
  .card, .ctrl-card, .dt-wrapper { box-shadow: none; border: 1px solid #ccc; }
  .data-table thead { background: #002D41 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #555; }
  a[href^='#']::after { content: ''; }
}

/* ================================================================
   18. REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .modal-dialog   { transform: none !important; }
  .toast          { transform: translateX(0) !important; }
  .dropdown-menu  { transform: none !important; }
  .bs-spinner     { animation: none !important; border-top-color: var(--bs-dark-blue); }
  .skeleton       { animation: none !important; background: var(--bs-light-grey); }
  /* loading.gif's frame animation is baked into the image file, not CSS - the animation-duration
     override above has no effect on it. Hide it and show a static ring instead so the full-page
     loader still communicates "busy" (via the message/aria-live text) without motion. */
  .bs-fullpage-loader-img { display: none; }
  .bs-fullpage-loader-chip { position: relative; }
  .bs-fullpage-loader-chip::after {
    content: '';
    width: 40px; height: 40px;
    border: 4px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
  }
}

/* ── de-alert spacing variants (Phase 5, 25 Aug 2026) ─────── */
.de-alert--compact  { margin-top: 8px; padding: 10px 14px; font-size: var(--text-xs); }
.de-alert--mb14     { margin-bottom: 14px; }
.de-alert--mt12     { margin-top: 12px; }
.de-alert--mb0      { margin-bottom: 0; }

/* ── bs-checkbox inline display (Phase 5) ────────────────── */
.bs-checkbox--inline { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

/* ── btn-xs extra-small button (Phase 5) ─────────────────── */
.btn-xs { font-size: var(--text-xs); padding: 4px 10px; }

/* ── u-flex-1 flex-grow utility (Phase 5) ───────────────── */
.u-flex-1 { flex: 1; }

/* is-disabled-opacity — replaces element.style.opacity = '0.5' JS assignments (Phase 6) */
.is-disabled-opacity { opacity: 0.5; pointer-events: none; }
