/* Manual dark toggle (apply .theme-dark to <html> or <body>) */
:root.theme-dark, html.theme-dark, body.theme-dark {
    color-scheme: dark;
    --cp-bg: #0d1117;
    --cp-bg-elev: #0f141c;
    --cp-surface: #111827;
    --cp-text: #e6edf3;
    --cp-text-muted: #9aa7b3;
    --cp-border: #233042;
    --cp-primary: #4ea1ff;
    --cp-primary-600: #2f88ec;
    --cp-primary-700: #1e6dcc;
    --cp-danger: #f16b7b;
    --cp-warning: #f6c35b;
    --cp-success: #3ddc84;
    --cp-info: #40c4ff;
    --cp-shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --cp-shadow: 0 8px 24px rgba(0,0,0,.45);
    --cp-shadow-lg: 0 14px 44px rgba(0,0,0,.55);
}

/* (Optional) component tweaks in dark */
.theme-dark .table > thead > tr > th {
    background: linear-gradient(180deg, rgba(25,31,43,1), rgba(25,31,43,.7));
}

.theme-dark .table-striped > tbody > tr:nth-child(odd) > td {
    background: rgba(255,255,255,.03);
}

.theme-dark .table-hover > tbody > tr:hover > td {
    background: rgba(78,161,255,.12);
}

.theme-dark .input-group .input-group-addon,
.theme-dark .input-group .input-group-text {
    background: #1b2431;
    border-color: var(--cp-border);
}
