:root{
    --bs-bg:#ffffff;
    --bs-text:#262b32;
    --bs-card:#f6f7f9;
    --bs-border:#e0e0e0;
}

html[data-theme="dark"]{
    --bs-bg:#121212;
    --bs-text:#f5f5f5;
    --bs-card:#1e1e1e;
    --bs-border:#2c2c2c;
}

html[data-theme="light"]{
    --bs-bg:#ffffff;
    --bs-text:#262b32;
    --bs-card:#f6f7f9;
    --bs-border:#e0e0e0;
}

@media (prefers-color-scheme: dark){
    html[data-theme="auto"]{
        --bs-bg:#121212;
        --bs-text:#f5f5f5;
        --bs-card:#1e1e1e;
        --bs-border:#2c2c2c;
    }
}

body{
    background-color:var(--bs-bg);
    color:var(--bs-text);
}

h1,h2,h3,h4,h5,h6{ color:var(--bs-text); }

.card,.table,.navbar,.dropdown-menu,.modal-content{
    background-color:var(--bs-card);
    color:var(--bs-text);
    border-color:var(--bs-border);
}

body,
.card,
.table,
.navbar,
.dropdown-menu,
.modal-content,
h1,h2,h3,h4,h5,h6,
.navbar .nav-link{
    transition:background-color .3s ease,color .3s ease,border-color .3s ease;
}

.navbar .nav-link{
    color:var(--bs-text);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus{
    color:var(--bs-text);
    opacity:.85;
}

.dropdown-menu .dropdown-item{ color:var(--bs-text); }

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus{
    background-color:var(--bs-border);
    color:var(--bs-text);
}

html[data-theme="dark"] .navbar{
    background-color:#1a1a1a !important;
    border-color:var(--bs-border) !important;
}

html[data-theme="dark"] .navbar .nav-link.active{
    color:#ffffff !important;
    font-weight:600;
}

html[data-theme="dark"] .dropdown-menu{
    background-color:var(--bs-card) !important;
    border-color:var(--bs-border) !important;
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-body,
html[data-theme="dark"] .bg-body-tertiary,
html[data-theme="dark"] .bg-body-secondary{
    background-color:var(--bs-card) !important;
    color:var(--bs-text) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] .text-body-secondary{
    color:var(--bs-text) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] .text-body-tertiary{
    color:rgba(245,245,245,.65) !important;
}

html[data-theme="dark"] a,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .dropdown-item{
    color:var(--bs-text) !important;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .dropdown-item:hover{
    color:var(--bs-text) !important;
    opacity:.85;
}

/*html[data-theme="dark"] .border,*/
/*html[data-theme="dark"] .border-light,*/
/*html[data-theme="dark"] .border-top,*/
/*html[data-theme="dark"] .border-bottom,*/
/*html[data-theme="dark"] .border-start,*/
/*html[data-theme="dark"] .border-end,*/
/*html[data-theme="dark"] .border-soft-ash{*/
/*    border-color:var(--bs-border) !important;*/
/*}*/

html[data-theme="dark"] .border:not(.border-primary):not(.border-success):not(.border-danger):not(.border-warning):not(.border-info):not(.border-secondary):not(.border-light):not(.border-dark):not(.border-white):not(.border-blue):not(.border-away):not(.border-home):not(.border-aqua):not(.border-sky),
html[data-theme="dark"] .border-top:not(.border-primary):not(.border-success):not(.border-danger):not(.border-warning):not(.border-info):not(.border-secondary):not(.border-light):not(.border-dark):not(.border-white):not(.border-blue):not(.border-away):not(.border-home):not(.border-aqua):not(.border-sky),
html[data-theme="dark"] .border-bottom:not(.border-primary):not(.border-success):not(.border-danger):not(.border-warning):not(.border-info):not(.border-secondary):not(.border-light):not(.border-dark):not(.border-white):not(.border-blue):not(.border-away):not(.border-home):not(.border-aqua):not(.border-sky),
html[data-theme="dark"] .border-start:not(.border-primary):not(.border-success):not(.border-danger):not(.border-warning):not(.border-info):not(.border-secondary):not(.border-light):not(.border-dark):not(.border-white):not(.border-blue):not(.border-away):not(.border-home):not(.border-aqua):not(.border-sky),
html[data-theme="dark"] .border-end:not(.border-primary):not(.border-success):not(.border-danger):not(.border-warning):not(.border-info):not(.border-secondary):not(.border-light):not(.border-dark):not(.border-white):not(.border-blue):not(.border-away):not(.border-home):not(.border-aqua):not(.border-sky) {
    border-color: var(--bs-border) !important;
}

html[data-theme="dark"] .border-blue { border-color: #3F78E0 !important; }
html[data-theme="dark"] .border-away { border-color: #91CC75 !important; }

html[data-theme="dark"] .card{
    border:1px solid rgba(255,255,255,.12) !important;
    background-color:var(--bs-card) !important;
}

html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer{
    border-color:var(--bs-border) !important;
    background-color:var(--bs-card) !important;
    color:var(--bs-text) !important;
}

html[data-theme="dark"] .table{
    --bs-table-color:var(--bs-text);
    --bs-table-bg:var(--bs-card);
    --bs-table-border-color:var(--bs-border);
    --bs-table-striped-bg:rgba(255,255,255,.03);
    --bs-table-hover-bg:rgba(255,255,255,.05);
    color:var(--bs-text) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select{
    background-color:#151515 !important;
    color:var(--bs-text) !important;
    border-color:var(--bs-border) !important;
}

html[data-theme="dark"] .form-control::placeholder{
    color:rgba(245,245,245,.5) !important;
}

html[data-theme="dark"] .nav-tabs{
    padding-bottom:8px;
    border-bottom:1px solid var(--bs-border) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link{
    color:var(--bs-text) !important;
    background:transparent !important;
    border-color:var(--bs-border) !important;
    margin-bottom:-1px;
}

html[data-theme="dark"] .nav-tabs .nav-link:hover{
    background:rgba(255,255,255,.04) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link.active{
    border-color:var(--bs-border) var(--bs-border) transparent !important;
    background:rgba(255,255,255,.08) !important;
    color:var(--bs-text) !important;
}

html[data-theme="dark"] .nav-pills .nav-link.active{
    background:rgba(209,32,60,.22) !important;
    border-color:rgba(209,32,60,.35) !important;
    color:#fff !important;
}

html[data-theme="dark"] .verdict-meter-inner{
    background:#151515;
}

::-webkit-scrollbar{
    width:10px;
    height:10px;
}

::-webkit-scrollbar-track{
    background:var(--bs-card);
}

::-webkit-scrollbar-thumb{
    background-color:var(--bs-border);
    border-radius:10px;
    border:2px solid var(--bs-card);
}

::-webkit-scrollbar-thumb:hover{
    background-color:rgba(255,255,255,.25);
}

html[data-theme="dark"] ::-webkit-scrollbar-track{
    background:#121212;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb{
    background-color:#2c2c2c;
    border:2px solid #121212;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{
    background-color:#3a3a3a;
}

*{
    scrollbar-width:thin;
    scrollbar-color:var(--bs-border) var(--bs-card);
}

html[data-theme="dark"] *{
    scrollbar-color:#2c2c2c #121212;
}

html[data-theme="dark"] .accordion-button,
html[data-theme="dark"] .accordion-item .collapsed,
html[data-theme="dark"] .accordion-item button{
    color:var(--bs-text) !important;
    background-color:var(--bs-card) !important;
}

html[data-theme="dark"] .accordion-button:not(.collapsed){
    background-color:var(--bs-card) !important;
    color:var(--bs-text) !important;
    box-shadow:none !important;
}

html[data-theme="dark"] .accordion-button::after{
    filter:invert(1) brightness(1.8);
}
/* List group surfaces and items */
html[data-theme="dark"] .list-group,
html[data-theme="dark"] .list-group-item {
    background-color: var(--bs-card) !important;
    color: var(--bs-text) !important;
    border-color: var(--bs-border) !important;
}

html[data-theme="dark"] .list-group-item-action:hover,
html[data-theme="dark"] .list-group-item-action:focus {
    background-color: rgba(255,255,255,0.05) !important;
    color: var(--bs-text) !important;
}

/* If you use active list-group items */
html[data-theme="dark"] .list-group-item.active {
    background-color: rgba(209,32,60,0.22) !important;
    border-color: rgba(209,32,60,0.35) !important;
    color: #fff !important;
}

/* Make small + text-muted readable in dark mode */
html[data-theme="dark"] small.text-muted,
html[data-theme="dark"] .small.text-muted,
html[data-theme="dark"] small .text-muted,
html[data-theme="dark"] .small .text-muted {
    color: rgba(245,245,245,0.65) !important;
}
html[data-theme="dark"] .list-group-item {
    border-color: rgba(255,255,255,0.18) !important;
}

/* Add a clearer divider line between stacked items */
html[data-theme="dark"] .list-group-flush .list-group-item {
    border-bottom: 1px solid rgba(255,255,255,0.12) !important;
}

/* Slight highlight on hover so rows feel interactive */
html[data-theme="dark"] .list-group-item-action:hover {
    background-color: rgba(255,255,255,0.06) !important;
}

