/* Keep the portal navigation usable independently of long dossiers. */
.sidebar { color: #f1f5f9; }
.sidebar .nav-link { color: #dbeafe; padding: 9px 14px; margin: 2px 8px; }
.sidebar .text-muted, .sidebar .text-light-emphasis { color: #cbd5e1 !important; }
.sidebar .nav-link:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.sidebar .nav-link.active { background: #1d4ed8; color: #fff; }
@media (min-width: 768px) {
    .sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 0;
        overflow-y: auto; overscroll-behavior: contain; align-self: flex-start; scrollbar-color: #94a3b8 #0f172a; }
    .sidebar > .p-4 { padding: 16px !important; }
}
#aiSecurityToolbar .btn { font-size: .875rem; padding: .35rem .65rem; white-space: nowrap; }
#aiSecurityProviderSelect { width: auto; max-width: 100%; min-width: 12rem; font-size: .875rem; padding-top: .35rem; padding-bottom: .35rem; }
#aiSecurityStats .stat-card { padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#aiSecurityStats .stat-value { font-size: 24px; margin: 0; }
#aiSecurityStats .stat-label { font-size: 13px; color: #475569; }
#aiSecurityStats > div { width: 25%; }
#aiSecurityHelp summary { cursor: pointer; font-size: .875rem; }
#aiSecurityTabs .nav-link { padding: .5rem .7rem; font-size: .875rem; }
#aiSecurityRunPreview { max-height: 120px; overflow-y: auto; color: #475569 !important; }
.ai-scope-targets { margin: .2rem 0; padding-left: 1.5rem; overflow-wrap: anywhere; }
#aiSecurityFindingFilters .form-select { width: auto; }
#aiSecurityFindingSearch { flex: 1 1 240px; width: auto; }
.ai-finding { margin-bottom: .5rem; padding: .6rem .75rem; }
.ai-finding summary { cursor: pointer; }
.ai-finding-summary { display: inline; overflow-wrap: anywhere; }
.ai-finding-badges { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-left: .5rem; vertical-align: middle; }
.ai-finding-dossier { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 24rem; overflow-y: auto; }
.ai-finding-actions { border-top: 1px solid #e2e8f0; padding-top: .5rem; }
@media (max-width: 767.98px) {
    .sidebar { min-height: 0; }
    #aiSecurityStats > div { width: 50%; }
    #aiSecurityToolbar .btn { flex: 1 1 auto; }
}
