:root {
    --bg-main: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #f9fafb;
    --border-color: #e5e7eb;
    --input-bg: #f3f4f6;
}

[data-theme="dark"] {
    --bg-main: #111827;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --card-bg: #1f2937;
    --border-color: #374151;
    --input-bg: #374151;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .title {
    color: var(--text-main) !important;
}

p {
    color: var(--text-muted);
}

.card, .custom-card, .widget-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

.form-control, .select2-container--default .select2-selection--single {
    background-color: var(--input-bg) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* Theme Switcher Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
    cursor: pointer;
    background-color: var(--input-bg);
    border-radius: 34px;
    border: 1px solid var(--border-color);
}
.theme-switch input {
    display:none;
}
.slider.round {
    border-radius: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    height: 100%;
}
.slider i {
    font-size: 18px;
    z-index: 1;
}
.theme-switch input:checked + .slider {
    background-color: var(--card-bg);
}
.theme-switch .slider::after {
    content: "";
    position: absolute;
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.theme-switch input:checked + .slider::after {
    transform: translateX(24px);
    background-color: #024d29;
}
