/* Dark-mode safety net: keeps every text readable when the user switches to night mode. */
body.dark-theme{background:#0e1620!important;color:#e6edf3!important}
body.dark-theme .card,body.dark-theme .modal-content,body.dark-theme .list-group-item,body.dark-theme .dropdown-menu,body.dark-theme .accordion-item,body.dark-theme .bg-white,body.dark-theme .bg-light,body.dark-theme .jumbotron,body.dark-theme .popover,body.dark-theme .toast{background-color:#16212f!important;color:#e6edf3!important;border-color:#2a3a52!important}
body.dark-theme .card-header,body.dark-theme .modal-header,body.dark-theme .card-footer,body.dark-theme .modal-footer{background:#1b293b!important;color:#e6edf3!important;border-color:#2a3a52!important}
body.dark-theme h1,body.dark-theme h2,body.dark-theme h3,body.dark-theme h4,body.dark-theme h5,body.dark-theme h6,body.dark-theme label,body.dark-theme .form-label,body.dark-theme .modal-title,body.dark-theme .card-title,body.dark-theme legend,body.dark-theme .navbar-brand{color:#f1f5f9!important}
body.dark-theme p,body.dark-theme li,body.dark-theme td,body.dark-theme th,body.dark-theme dt,body.dark-theme dd,body.dark-theme .form-text,body.dark-theme .form-check-label{color:#dbe4ee}
body.dark-theme .text-dark,body.dark-theme .text-body,body.dark-theme .text-black{color:#e6edf3!important}
body.dark-theme .text-muted,body.dark-theme .text-secondary,body.dark-theme small,body.dark-theme .small{color:#a9b8c9!important}
body.dark-theme .form-control,body.dark-theme .form-select,body.dark-theme input,body.dark-theme select,body.dark-theme textarea{background-color:#0f1a27!important;color:#f1f5f9!important;border-color:#33465f!important}
body.dark-theme .form-control::placeholder,body.dark-theme input::placeholder,body.dark-theme textarea::placeholder{color:#8396ab!important}
body.dark-theme .form-control:disabled,body.dark-theme .form-control[readonly]{background-color:#182535!important;color:#b9c7d8!important}
body.dark-theme option{background:#0f1a27;color:#f1f5f9}
body.dark-theme .input-group-text{background:#1b293b!important;color:#e6edf3!important;border-color:#33465f!important}
body.dark-theme .table,body.dark-theme table{--bs-table-bg:transparent;--bs-table-color:#e6edf3;color:#e6edf3!important;border-color:#2a3a52!important}
body.dark-theme .table thead th{background:#1b293b!important;color:#f1f5f9!important;border-bottom-color:var(--brand)!important}
body.dark-theme .table td,body.dark-theme .table th{border-color:#2a3a52!important}
body.dark-theme .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:rgba(255,255,255,.04);color:#e6edf3!important}
body.dark-theme .table-hover>tbody>tr:hover>*{background:rgba(255,255,255,.07)!important;color:#fff!important}
body.dark-theme .nav-tabs{border-color:#2a3a52}body.dark-theme .nav-tabs .nav-link,body.dark-theme .nav-tabs-custom .nav-link{color:#c3d0de!important}
body.dark-theme .nav-tabs .nav-link.active,body.dark-theme .nav-tabs-custom .nav-link.active{background:#16212f!important;color:#fff!important;border-color:#2a3a52 #2a3a52 var(--brand)!important}
body.dark-theme .btn-outline-secondary,body.dark-theme .btn-outline-dark,body.dark-theme .btn-light{color:#e6edf3!important;border-color:#4a5d77!important;background:rgba(255,255,255,.06)!important}
body.dark-theme .btn-close{filter:invert(1)}
body.dark-theme hr{border-color:#2a3a52}
body.dark-theme .alert-warning{background:#3b3216!important;color:#fde68a!important;border-color:#6b5a1d!important}
body.dark-theme .alert-danger{background:#3a1b1e!important;color:#fecaca!important;border-color:#6b2a30!important}
body.dark-theme .alert-success{background:#12301f!important;color:#bbf7d0!important;border-color:#1e5a37!important}
body.dark-theme .alert-info{background:#10303a!important;color:#bae6fd!important;border-color:#1c566a!important}
/* inline dark text colours written in the page markup */
body.dark-theme [style*="color:#333"],body.dark-theme [style*="color: #333"],body.dark-theme [style*="color:#2c3e50"],body.dark-theme [style*="color: #2c3e50"],body.dark-theme [style*="color:#1a2634"],body.dark-theme [style*="color: #1a2634"],body.dark-theme [style*="color:#212529"],body.dark-theme [style*="color: #212529"],body.dark-theme [style*="color:#444"],body.dark-theme [style*="color: #444"],body.dark-theme [style*="color:#555"],body.dark-theme [style*="color: #555"],body.dark-theme [style*="color:#000"],body.dark-theme [style*="color: #000"],body.dark-theme [style*="color:black"],body.dark-theme [style*="color: black"]{color:#e6edf3!important}
body.dark-theme [style*="color:#666"],body.dark-theme [style*="color: #666"],body.dark-theme [style*="color:#6c757d"],body.dark-theme [style*="color: #6c757d"],body.dark-theme [style*="color:#777"],body.dark-theme [style*="color: #777"],body.dark-theme [style*="color:#888"],body.dark-theme [style*="color: #888"]{color:#a9b8c9!important}
body.dark-theme [style*="background:#fff"],body.dark-theme [style*="background: #fff"],body.dark-theme [style*="background:white"],body.dark-theme [style*="background: white"],body.dark-theme [style*="background-color:#fff"],body.dark-theme [style*="background-color: #fff"],body.dark-theme [style*="background:#f8f9fa"],body.dark-theme [style*="background: #f8f9fa"],body.dark-theme [style*="background:#f5f7fa"],body.dark-theme [style*="background: #f5f7fa"],body.dark-theme [style*="background:#f0f4f8"],body.dark-theme [style*="background: #f0f4f8"]{background:#16212f!important;color:#e6edf3!important}
body.dark-theme .cb-bar{box-shadow:0 2px 12px rgba(0,0,0,.5)}
