html[data-custom-theme] {
    color-scheme: dark;
}
html[data-custom-theme] body,
html[data-custom-theme] .layout-main-section-wrapper,
html[data-custom-theme] .page-container {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}
html[data-custom-theme] .form-control,
html[data-custom-theme] select.form-control,
html[data-custom-theme] .awesomplete > input {
    background-color: var(--control-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}
html[data-custom-theme] #freeze,
html[data-custom-theme] .splash,
html[data-custom-theme] .page-blank,
html[data-custom-theme] .page-container.layout-main {
    background-color: var(--bg-color) !important;
}

html[data-custom-theme] .freeze-message,
html[data-custom-theme] .spinner-border {
    color: var(--primary) !important;
}
html[data-custom-theme] input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-color) !important;
    border-radius: 3px;
    background-color: var(--control-bg) !important;
    outline: none;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    vertical-align: middle;
    margin: 0;
}
html[data-custom-theme] input[type="checkbox"]:checked,
html[data-custom-theme] .input-checkbox:checked,
html[data-custom-theme] .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
    filter: none !important;
}
html[data-custom-theme] .frappe-control[data-fieldtype="Check"] .disp-area {
    opacity: 1 !important;
    filter: none !important;
}

html[data-custom-theme] .disp-area input[type="checkbox"].disabled-selected {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 8px 8px !important;
    
    opacity: 1 !important;
    filter: none !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important; 
}

html[data-custom-theme] .btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    transition: all 0.15s ease-in-out !important;
}

html[data-custom-theme] .btn-primary:hover,
html[data-custom-theme] .btn-primary:focus {
    background-color: var(--primary) !important;
    border-color: var(--heading-color, var(--primary)) !important;
    color: #ffffff !important;
    filter: brightness(1.18) saturate(1.1) !important;
    box-shadow: 0 0 10px var(--primary), inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
}

html[data-custom-theme] .btn-primary:active,
html[data-custom-theme] .btn-primary.active {
    filter: brightness(0.85) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}
html[data-custom-theme] .layout-side-section,
html[data-custom-theme] .desk-sidebar,
html[data-custom-theme] .standard-sidebar-section,
html[data-custom-theme] .sidebar-items {
    background-color: var(--navbar-bg) !important;
    border-right: 1px solid var(--border-color) !important;
}

html[data-custom-theme] .desk-sidebar .sidebar-item-container .sidebar-item-label,
html[data-custom-theme] .standard-sidebar-item {
    color: var(--text-color, #ffffff) !important;
}

html[data-custom-theme] .desk-sidebar .sidebar-item-container.selected,
html[data-custom-theme] .desk-sidebar .sidebar-item-container.selected .sidebar-item-label,
html[data-custom-theme] .standard-sidebar-item.selected {
    background-color: var(--control-bg, #1b2e54) !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    border-radius: var(--ct-radius-sm, 4px) !important;
}

html[data-custom-theme] .desk-sidebar .sidebar-item-container:hover,
html[data-custom-theme] .standard-sidebar-item:hover {
    background-color: var(--control-bg, rgba(255, 255, 255, 0.05)) !important;
    color: var(--primary) !important;
    border-radius: var(--ct-radius-sm, 4px) !important;
}

html[data-custom-theme] .widget.links-widget-box .link-item .indicator-pill,
html[data-custom-theme] .widget.links-widget-box .link-item .indicator-pill.yellow,
.ct-preview-sandbox .widget.links-widget-box .link-item .indicator-pill,
.ct-preview-sandbox .widget.links-widget-box .link-item .indicator-pill.yellow {
    background-color: var(--control-bg-on-gray, var(--control-bg)) !important;
    background: var(--control-bg-on-gray, var(--control-bg)) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--ct-radius-sm, 4px) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
}

html[data-custom-theme] .widget.links-widget-box .link-item .indicator-pill::before,
html[data-custom-theme] .widget.links-widget-box .link-item .indicator-pill::after,
.ct-preview-sandbox .widget.links-widget-box .link-item .indicator-pill::before,
.ct-preview-sandbox .widget.links-widget-box .link-item .indicator-pill::after {
    background-color: var(--primary) !important;
    background: var(--primary) !important;
}

html[data-custom-theme] .widget.links-widget-box .link-item:hover,
.ct-preview-sandbox .widget.links-widget-box .link-item:hover {
    background-color: var(--control-bg-on-gray, var(--control-bg)) !important;
    border-radius: var(--ct-radius-sm, 4px) !important;
}

html[data-custom-theme] .widget.links-widget-box .link-item:hover > .indicator-pill,
.ct-preview-sandbox .widget.links-widget-box .link-item:hover > .indicator-pill {
    background-color: var(--primary) !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

html[data-custom-theme] .widget.links-widget-box .link-item:hover > .indicator-pill::before,
html[data-custom-theme] .widget.links-widget-box .link-item:hover > .indicator-pill::after,
.ct-preview-sandbox .widget.links-widget-box .link-item:hover > .indicator-pill::before,
.ct-preview-sandbox .widget.links-widget-box .link-item:hover > .indicator-pill::after {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

