/* ── Beyond Assured design tokens (Phase 1 redesign) ──
   Centralized color + typography variables shared by the new app bar, analyze page,
   and any future redesigned pages. Older pages still use Bootstrap defaults below. */
:root {
    --ba-navy:   #1E3A5F;
    --ba-navy2:  #152C4A;
    --ba-navy3:  #102E4E;
    --ba-gold:   #D35424;
    --ba-gold2:  #E8693A;
    --ba-slate:  #444441;
    --ba-slate2: #2C2C2A;
    --ba-dgray:  #5E5C59;
    --ba-mgray:  #C8C5C0;
    --ba-lgray:  #F2F0ED;
    --ba-xlgray: #F8F7F5;
    --ba-white:  #FFFFFF;
    --ba-red:    #8B2020;
    --ba-lred:   #FBF0F0;
    --ba-green:  #2D5E1E;
    --ba-lgreen: #F0F7EC;
    --ba-amber:  #8B5E00;
    --ba-lamber: #FDF4E0;
    --ba-teal:   #0D5E61;
    --ba-lteal:  #E8F6F7;
    --ba-border: #E0DDD8;
    --ba-purple: #4A2D7F;
    --ba-lpurple:#F0EBF9;

    --ba-font-serif: 'EB Garamond', Georgia, serif;
    --ba-font-sans:  'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --ba-font-mono:  'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ──────────────────────────────────────────────────────────────────────────
   App bar — Phase 1 redesign
   Lives in global CSS (not scoped to NavMenu.razor.css) because the scoped
   `b-xyz` attribute doesn't propagate to elements rendered by child components
   like <NavLink>, so a scoped `.ba-nav-item` rule wouldn't match the <a>
   NavLink emits. The `ba-` prefix keeps this from colliding with anything else.
   ────────────────────────────────────────────────────────────────────────── */

.ba-app-bar {
    background: var(--ba-navy3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    height: 76px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    font-family: var(--ba-font-sans);
}

.ba-app-logo {
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.ba-app-logo img {
    width: 220px;
    height: auto;
}

.ba-app-nav {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    gap: 2px;
    flex: 1;
}

.ba-nav-item,
.ba-app-nav a.ba-nav-item {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.15s;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.ba-nav-item:hover,
.ba-app-nav a.ba-nav-item:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.ba-nav-item--active,
.ba-app-nav a.ba-nav-item--active {
    color: var(--ba-white);
    border-bottom-color: var(--ba-gold);
}

.ba-app-right {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
}

.ba-token-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(211, 84, 36, 0.12);
    border: 1px solid rgba(211, 84, 36, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--ba-gold2);
    font-family: var(--ba-font-mono);
    line-height: 1.4;
}

/* Actionable variant — the pill itself is a <button> that redirects to the Admin
   Portal's token-acquisition page. Reset default <button> chrome and add a hover
   state that hints at the click affordance. */
button.ba-token-pill--actionable {
    cursor: pointer;
    font-family: var(--ba-font-mono);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

button.ba-token-pill--actionable:hover {
    background: rgba(211, 84, 36, 0.2);
    border-color: var(--ba-gold);
    color: var(--ba-gold);
}

button.ba-token-pill--actionable:focus-visible {
    outline: 2px solid var(--ba-gold);
    outline-offset: 2px;
}

button.ba-token-pill--actionable:active {
    transform: scale(0.97);
}

.ba-token-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ba-gold);
    flex-shrink: 0;
}

.ba-token-count {
    font-weight: 500;
}

.ba-token-label {
    opacity: 0.85;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

a.link-unstyled, .link-unstyled {
    color: inherit;
    text-decoration: none;
}

    a.link-unstyled:hover, .link-unstyled:hover,
    a.link-unstyled:focus, .link-unstyled:focus,
    a.link-unstyled:active, .link-unstyled:active,
    a.link-unstyled:visited, .link-unstyled:visited {
        color: inherit;
        text-decoration: none;
    }

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
 
 
/* Custom Toast Notification Styles */
.custom-notification .k-notification {
    min-width: 600px !important;
    max-width: 800px !important;
    padding: 24px 32px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px !important;
    border: none !important;
    border-left: 8px solid !important;
    margin-top: 20px !important;
    animation: slideInDown 0.4s ease-out;
    z-index: 10000 !important;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-notification .k-notification-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-left-color: #28a745 !important;
}

.custom-notification .k-notification-success::before {
    content: "✓ ";
    font-size: 24px;
    font-weight: bold;
    margin-right: 8px;
}

.custom-notification .k-notification-error {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-left-color: #dc3545 !important;
}

.custom-notification .k-notification-error::before {
    content: "✖ ";
    font-size: 24px;
    font-weight: bold;
    margin-right: 8px;
}

.custom-notification .k-notification-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border-left-color: #ffc107 !important;
}

.custom-notification .k-notification-warning::before {
    content: "⚠ ";
    font-size: 24px;
    font-weight: bold;
    margin-right: 8px;
}

.custom-notification .k-notification-info {
    background-color: #d1ecf1 !important;
    color: #0c5460 !important;
    border-left-color: #17a2b8 !important;
}

.custom-notification .k-notification-info::before {
    content: "ℹ ";
    font-size: 24px;
    font-weight: bold;
    margin-right: 8px;
}

.custom-notification .k-notification-content {
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

.z-index-1 {
    z-index: 1;
    position: relative;
}

.recent-card .card-header,
.recent-card .section-title,
.recent-card .header,
.recent-card h4,
.recent-card h5 {
    font-weight: 700;
    color: #102e4e !important;
}

.k-grid .k-header .k-link {
    color: #102e4e !important;
    font-weight: 700;
}

/* ──────────────────────────────────────────────────────────────────────────
   Full-screen page mode — applied by pages that want to claim the whole
   viewport (app bar above, no page-level scroll, no footer). Toggled by
   pages via JS interop: `document.body.classList.add("ba-fullscreen-page")`
   on init and `.remove(...)` on dispose. Currently used by SideBySide.
   ────────────────────────────────────────────────────────────────────────── */

body.ba-fullscreen-page {
    overflow: hidden;
}

body.ba-fullscreen-page .page-wrapper {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.ba-fullscreen-page .main-content {
    min-height: 0;
    overflow: hidden;
}

body.ba-fullscreen-page .main-content > .content {
    min-height: 0;
    /* Strip the default horizontal padding so the side-by-side split fills the viewport. */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* PDF.js canvas viewer (DocumentViewerPanel)
   Applied globally because the elements are injected by pdfViewer.js — Blazor's
   scoped CSS doesn't reach dynamically-created DOM. */
.pdf-panel {
    overflow: auto;
    background: #525659;
    height: 100%;
}

.pdf-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.pdf-loading,
.pdf-error {
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

.pdf-error {
    color: #ffb4b4;
}

.pdf-page {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
    max-width: 100%;
}

.pdf-page canvas {
    display: block;
}

.annotation-layer {
    pointer-events: auto;
    transform-origin: top left;
}

.pdf-link-overlay {
    background: transparent;
    border: none;
    text-decoration: none;
    transition: background 0.15s;
    border-radius: 2px;
}

.pdf-link-overlay:hover {
    background: rgba(59, 130, 246, 0.15);
    outline: 2px solid rgba(59, 130, 246, 0.5);
}

.citation-flash {
    background: rgba(59, 130, 246, 0.4);
    border: 2px solid rgba(59, 130, 246, 0.8);
    border-radius: 3px;
    animation: bba-citation-flash 2s ease-out forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes bba-citation-flash {
    0% { opacity: 1; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Hide the native file <input> rendered by <InputFile>. Lives in global CSS
   because Blazor's scoped attribute doesn't reach into child components.
   The Analyze page keeps this input permanently mounted (so the file-bridge
   handle inside IBrowserFile stays alive) and uses <label for=...> to make
   the visible drop zone clickable. */
.ba-az-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   Tool row (rendered by ToolRow.razor — child component, so scoped CSS in the
   parent UploadBrief.razor.css can't reach these). Selectable checkbox row
   showing an operation's name, cost, and a selection state — or a disabled
   "Coming soon" badge in place of the check.
   ────────────────────────────────────────────────────────────────────────── */

.ba-az-tool-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ba-border);
    border-radius: 6px;
    margin-bottom: 6px;
    background: var(--ba-white);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ba-az-tool-row:hover:not(.ba-az-tool-row--disabled) {
    border-color: var(--ba-navy);
    background: #F5F9FF;
}

.ba-az-tool-row--selected {
    border-color: var(--ba-navy);
    background: #EEF4FB;
}

.ba-az-tool-row--disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ba-az-tool-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--ba-lteal);
    color: var(--ba-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ba-font-mono);
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.ba-az-tool-info {
    flex: 1;
    min-width: 0;
}

.ba-az-tool-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ba-slate2);
    line-height: 1.3;
}

.ba-az-tool-cost {
    font-size: 11px;
    color: var(--ba-dgray);
    margin-top: 2px;
    font-family: var(--ba-font-mono);
}

.ba-az-tool-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ba-mgray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.ba-az-tool-row--selected .ba-az-tool-check {
    background: var(--ba-navy);
    border-color: var(--ba-navy);
}

.ba-az-tool-checkmark {
    width: 10px;
    height: 6px;
    border-bottom: 2px solid var(--ba-white);
    border-left: 2px solid var(--ba-white);
    transform: rotate(-45deg) translateY(-1px);
}

.ba-az-tool-soon {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--ba-lgray);
    color: var(--ba-dgray);
    font-weight: 500;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   Modal (rendered by ConfirmAnalysisModal.razor — global for the same reason
   as the tool row above). Reusable enough that other future modals can hook
   into the same `ba-modal-*` / `ba-btn-*` system.
   ────────────────────────────────────────────────────────────────────────── */

.ba-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, 0.55);
    z-index: 1050;
    animation: ba-modal-fade-in 0.12s ease-out;
}

.ba-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    background: var(--ba-white);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    z-index: 1051;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--ba-font-sans);
    animation: ba-modal-pop-in 0.15s ease-out;
}

@keyframes ba-modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ba-modal-pop-in {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.ba-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ba-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ba-modal-title {
    font-family: var(--ba-font-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--ba-navy);
    margin: 0;
}

.ba-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: var(--ba-dgray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.ba-modal-close:hover:not(:disabled) {
    background: var(--ba-lgray);
    color: var(--ba-slate2);
}

.ba-modal-close:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.ba-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.ba-modal-intro {
    font-size: 13px;
    color: var(--ba-dgray);
    margin: 0 0 16px;
    line-height: 1.5;
}

.ba-modal-tool-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    border: 1px solid var(--ba-border);
    border-radius: 6px;
    overflow: hidden;
}

.ba-modal-tool-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ba-border);
    font-size: 13px;
}

.ba-modal-tool-list li:last-child {
    border-bottom: none;
}

.ba-modal-tool-name {
    color: var(--ba-slate2);
    font-weight: 500;
}

.ba-modal-tool-cost {
    font-family: var(--ba-font-mono);
    font-size: 12px;
    color: var(--ba-dgray);
}

.ba-modal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--ba-xlgray);
    border-radius: 6px;
}

.ba-modal-total-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ba-dgray);
}

.ba-modal-total-value {
    font-family: var(--ba-font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--ba-navy);
}

.ba-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--ba-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ba-btn {
    font-family: var(--ba-font-sans);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ba-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ba-btn--primary {
    background: var(--ba-navy);
    color: var(--ba-white);
    border-color: var(--ba-navy);
}

.ba-btn--primary:hover:not(:disabled) {
    background: var(--ba-navy2);
    border-color: var(--ba-navy2);
}

.ba-btn--ghost {
    background: var(--ba-white);
    color: var(--ba-slate2);
    border-color: var(--ba-border);
}

.ba-btn--ghost:hover:not(:disabled) {
    background: var(--ba-lgray);
}

.ba-btn--warn {
    background: var(--ba-white);
    color: var(--ba-amber);
    border-color: var(--ba-amber);
}

.ba-btn--warn:hover:not(:disabled) {
    background: var(--ba-lamber);
}

/* Wider modal variant — used by ResolveCitationModal where matches need more horizontal room. */
.ba-modal--wide {
    width: min(640px, calc(100vw - 32px));
}

/* ──────────────────────────────────────────────────────────────────────────
   ResolveCitationModal (rendered by ResolveCitationModal.razor — global so its
   inner elements aren't trapped by parent scoped CSS attributes).
   ────────────────────────────────────────────────────────────────────────── */

.ba-rc-info {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--ba-xlgray);
    border-radius: 6px;
}

.ba-rc-info-row {
    display: contents;
}

.ba-rc-info-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ba-dgray);
    align-self: center;
}

.ba-rc-info-value {
    font-size: 13px;
    color: var(--ba-slate2);
}

.ba-rc-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ba-dgray);
    margin-bottom: 8px;
}

.ba-rc-empty {
    padding: 16px;
    text-align: center;
    color: var(--ba-dgray);
    font-size: 13px;
    background: var(--ba-xlgray);
    border-radius: 6px;
}

.ba-rc-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ba-rc-match {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ba-border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ba-rc-match:hover {
    border-color: var(--ba-navy);
    background: #F5F9FF;
}

.ba-rc-match--selected {
    border-color: var(--ba-navy);
    background: #EEF4FB;
}

.ba-rc-match-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--ba-mgray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.ba-rc-match--selected .ba-rc-match-radio {
    border-color: var(--ba-navy);
}

.ba-rc-match-radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ba-navy);
}

.ba-rc-match-info {
    flex: 1;
    min-width: 0;
}

.ba-rc-match-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ba-slate2);
    line-height: 1.3;
}

.ba-rc-match-details {
    margin-top: 4px;
    font-size: 11px;
    color: var(--ba-dgray);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ba-rc-view-case {
    font-size: 11px;
    padding: 6px 10px;
    flex-shrink: 0;
}

/* "Ignore" is the destructive-ish action in the resolver modal — push it to the
   far left of the footer so it's visually separated from Cancel/Confirm. */
.ba-rc-ignore {
    margin-right: auto;
}