:root,
[data-bs-theme=light] {
    --bs-primary: #1e2129;
    --bs-link-color: #1e2129;
    --bs-link-hover-color: #1e2129;
    --bs-focus-ring-color: rgba(30, 33, 41);
    --bs-primary-rgb: 30, 33, 41;
    /* Soft tint for light-primary buttons/badges (was incorrectly a dark shade) */
    --bs-primary-light: #eef0f3;
    --bs-menu-link-color-active: #31353f;
}

[data-bs-theme=dark] {
    --bs-primary-light: #2b303b;
}

/* Compact secondary header (tabs strip) — overrides Metronic 94px default */
body[data-kt-app-header-secondary-enabled="true"] {
    --bs-app-header-secondary-height: 36px;
}

.btn-primary {
    --bs-btn-bg: #1e2129;
    --bs-btn-border-color: #1e2129;
    --bs-btn-hover-bg: #31353f;
    --bs-btn-hover-border-color: #31353f;
    --bs-btn-active-bg: #31353f;
    --bs-btn-active-border-color: #31353f;
    --bs-btn-disabled-bg: #1e2129;
    --bs-btn-disabled-border-color: #1e2129
}

.btn-outline-primary {
    --bs-btn-color: #1e2129;
    --bs-btn-border-color: #1e2129;
    --bs-btn-hover-bg: #1e2129;
    --bs-btn-hover-border-color: #1e2129;
    --bs-btn-active-bg: #1e2129;
    --bs-btn-active-border-color: #1e2129;
    --bs-btn-disabled-color: #1e2129;
    --bs-btn-disabled-border-color: #1e2129;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: #1e2129
}

.progress,
.progress-stacked {
    --bs-progress-bar-bg: #1e2129;
}

[data-bs-theme=light] {
    --bs-primary: #1e2129;
    --bs-text-primary: #1e2129;
    --bs-component-active-bg: #1e2129;
    --bs-component-hover-color: #1e2129;
    --bs-component-checked-bg: #1e2129;
    --bs-menu-link-color-hover: #1e2129;
    --bs-menu-link-color-show: #1e2129;
    --bs-menu-link-color-here: #1e2129;
    --bs-ribbon-label-bg: #1e2129;
    --bs-primary-clarity: rgba(30, 33, 41);
    --bs-primary-active: #31353f;
}

.link-primary {
    color: RGBA(var(--bs-primary-rgb), var(--bs-link-opacity, 1)) !important;
    text-decoration-color: RGBA(var(--bs-primary-rgb), var(--bs-link-underline-opacity, 1)) !important
}

.link-primary:focus,
.link-primary:hover {
    color: RGBA(75, 86, 117, var(--bs-link-opacity, 1)) !important;
    text-decoration-color: RGBA(75, 86, 117, var(--bs-link-underline-opacity, 1)) !important
}

.form-check-input:checked {
    background-color: #1e2129;
    border-color: #1e2129
}

.form-check-input[type=checkbox]:indeterminate {
    background-color: #1e2129;
    border-color: #1e2129;
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")
}

.form-range::-webkit-slider-thumb {
    width: 1rem;
    height: 1rem;
    margin-top: -.25rem;
    appearance: none;
    background-color: #1e2129;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .1rem .25rem rgba(0,0,0,.1);
    transition: background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out
}

.form-range::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    appearance: none;
    background-color: #1e2129;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .1rem .25rem rgba(0,0,0,.1);
    transition: background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out
}

.form-check.form-check-solid .form-check-input[type=checkbox]:indeterminate {
    background-color: #1e2129
}

[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item .menu-link.active .menu-icon,
[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item .menu-link.active .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item .menu-link.active .menu-icon i {
    color: #1e2129
}

[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.here>.menu-link .menu-icon,
[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.here>.menu-link .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.here>.menu-link .menu-icon i {
    color: #1e2129;
}

[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item .menu-link.active .menu-bullet .bullet {
    background-color: #1e2129
}

[data-bs-theme=light] .app-header-menu .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon i,
[data-bs-theme=light] .app-header-menu .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon i {
    color: #1e2129
}

[data-bs-theme=light] .app-header-menu .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-bullet .bullet,
[data-bs-theme=light] .app-header-menu .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-bullet .bullet {
    background-color: #1e2129
}

[data-bs-theme=light] .app-header-menu .menu>.menu-item.show>.menu-link .menu-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item.show>.menu-link .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item.show>.menu-link .menu-icon i {
    color: #1e2129
}

[data-bs-theme=light] .app-header-menu .menu>.menu-item.show>.menu-link .menu-bullet .bullet {
    background-color: #1e2129
}

[data-bs-theme=light] .app-header-menu .menu>.menu-item>.menu-link.active .menu-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item>.menu-link.active .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-menu .menu>.menu-item>.menu-link.active .menu-icon i {
    color: #1e2129
}

[data-bs-theme=light] .app-header-menu .menu>.menu-item>.menu-link.active .menu-bullet .bullet {
    background-color: #1e2129
}

.separator.separator-content.border-primary::after,.separator.separator-content.border-primary::before {
    border-color: #1e2129!important
}

[data-kt-sticky-landing-header=on] .landing-header .menu .menu-link.active {
    color: #1e2129;
    background-color: rgba(239,242,245,.4)
}

@media (max-width: 991.98px) {
    .landing-header {
        height:70px
    }

    .landing-header .landing-menu-wrapper {
        position: relative;
        overflow: auto
    }

    [data-kt-sticky-landing-header=on] .landing-header {
        height: 70px
    }

    .landing-header .menu .menu-link.active {
        color: #1e2129;
        background-color: rgba(239,242,245,.4)
    }

    body[data-kt-sticky-landing-header=on] {
        padding-top: 70px
    }
}

[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon,
[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon i,
[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon,
[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon .svg-icon,
[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon i {
    color: #1e2129
}

[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-bullet .bullet,
[data-bs-theme=light] .app-header-secondary-menu-main .menu>.menu-item:not(.here)>.menu-link:hover:not(.disabled):not(.active):not(.here) .menu-bullet .bullet {
    background-color: #1e2129
}

[data-bs-theme=light] .btn.btn-light-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary-light);
    background-color: var(--bs-primary-light);
}

[data-bs-theme=light] .btn.btn-light-primary .svg-icon,
[data-bs-theme=light] .btn.btn-light-primary i {
    color: var(--bs-primary);
}

.menu-state-color .menu-item .menu-link.active .menu-title {
    color: var(--bs-menu-link-color-active);
}

[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon, [data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon .svg-icon, [data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.hover:not(.here)>.menu-link:not(.disabled):not(.active):not(.here) .menu-icon i, [data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon, [data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon .svg-icon, [data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon i {
    color: var(--bs-primary);
}

[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.show>.menu-link .menu-icon,[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.show>.menu-link .menu-icon .svg-icon,[data-bs-theme=light] .app-header-secondary-menu-sub .menu>.menu-item.show>.menu-link .menu-icon i {
    color: var(--bs-primary);
}

/* -------------------------------------------------------------------------- */
/* Demo 60 structure — white header in light; dark chrome in dark mode        */
/* -------------------------------------------------------------------------- */
[data-bs-theme=light] {
    --bs-app-header-primary-base-bg-color: #ffffff;
    --bs-app-header-primary-base-border-bottom: 1px solid #e6eaf0;
    --bs-app-header-primary-base-box-shadow: 0 1px 0 rgba(26, 29, 35, 0.04);
    --bs-app-header-primary-sticky-bg-color: #ffffff;
    --bs-app-header-primary-minimize-bg-color: #ffffff;
    --bs-app-header-secondary-base-bg-color: #f7f8fa;
    --bs-app-header-secondary-base-border-bottom: 1px solid #e6eaf0;
    --bs-app-header-secondary-sticky-bg-color: #f7f8fa;
    --bs-app-header-secondary-minimize-bg-color: #f7f8fa;
}

[data-bs-theme=dark] {
    --bs-app-header-primary-base-bg-color: #0B0C10;
    --bs-app-header-primary-base-border-bottom: 1px solid #15171C;
    --bs-app-header-primary-sticky-bg-color: #0B0C10;
    --bs-app-header-primary-minimize-bg-color: #0B0C10;
    --bs-app-header-secondary-base-bg-color: #000000;
    --bs-app-header-secondary-base-border-bottom: 1px solid #15171C;
    --bs-app-header-secondary-sticky-bg-color: #000000;
    --bs-app-header-secondary-minimize-bg-color: #000000;
}

[data-kt-app-header-primary-enabled=true] {
    --bs-app-header-primary-height: 60px !important;
}

[data-kt-app-header-primary-enabled=true][data-kt-app-header-sticky=on],
[data-kt-app-header-primary-enabled=true][data-kt-app-header-minimize=on] {
    --bs-app-header-primary-height: 70px !important;
}

/* Demo60: main module nav + tabs/sub row */
[data-kt-app-header-secondary-enabled=true] {
    --bs-app-header-secondary-height: 94px !important;
}

[data-kt-app-header-secondary-enabled=true][data-kt-app-header-sticky=on],
[data-kt-app-header-secondary-enabled=true][data-kt-app-header-minimize=on] {
    --bs-app-header-secondary-height: 70px !important;
}

[data-bs-theme=light] .app-header-primary {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e6eaf0 !important;
}

[data-bs-theme=dark] .app-header-primary {
    background-color: #0B0C10 !important;
    border-bottom: 1px solid #15171C !important;
}

/* Pin notifications/user; let module menu scroll when overcrowded */
@media (min-width: 992px) {
    .app-header-primary .app-container,
    .app-header-primary #kt_app_header_primary_container > .d-flex {
        min-width: 0;
        overflow: hidden;
    }

    #kt_app_header_menu_wrapper {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
    }

    .app-header-primary .app-navbar {
        flex: 0 0 auto !important;
        margin-inline-start: auto;
    }

    .app-header-primary .app-header-menu .menu > .menu-item > .menu-link {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .app-header-primary .app-header-menu .menu > .menu-item > .menu-link .menu-title {
        font-size: 0.875rem;
        white-space: nowrap;
    }
}

[data-bs-theme=light] .app-header-secondary {
    background-color: #f7f8fa !important;
    border-bottom: 1px solid #e6eaf0 !important;
}

[data-bs-theme=dark] .app-header-secondary {
    background-color: #000000 !important;
    border-bottom: 1px solid #15171C !important;
}

.app-header-secondary-menu-main {
    align-items: center !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.app-header-secondary-menu-main .menu > .menu-item > .menu-link {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    min-height: 2.1rem;
}

[data-bs-theme=light] .app-header-secondary-menu-sub {
    border-top: 1px solid #e6eaf0;
}

[data-bs-theme=dark] .app-header-secondary-menu-sub {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Dark text/icons on white primary header (bundle expects light-on-dark) */
[data-bs-theme=light] .app-header-menu .menu > .menu-item > .menu-link .menu-title,
[data-bs-theme=light] .app-header-menu .menu > .menu-item.here > .menu-link .menu-title,
[data-bs-theme=light] .app-header-menu .menu > .menu-item.show > .menu-link .menu-title {
    color: #1a1d23 !important;
}

[data-bs-theme=light] .app-header .btn.btn-custom {
    background-color: #eef1f5;
}

[data-bs-theme=light] .app-header .btn.btn-custom .svg-icon,
[data-bs-theme=light] .app-header .btn.btn-custom i,
[data-bs-theme=light] .app-header .btn.btn-custom.dropdown-toggle:after {
    color: #1a1d23;
}

[data-bs-theme=light] .app-header .btn.btn-custom:hover:not(.btn-active) {
    background-color: #e6eaf0 !important;
}

[data-bs-theme=light] .app-header-secondary-menu-main .menu-separator {
    background: #d9dee7;
}

[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item > .menu-link,
[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item > .menu-link .menu-title,
[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item.here > .menu-link,
[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item.here > .menu-link .menu-title,
[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item.show > .menu-link .menu-title {
    color: #1a1d23 !important;
}

[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item.here > .menu-link,
[data-bs-theme=light] .app-header-secondary-menu-main .menu > .menu-item > .menu-link.active {
    background-color: #eef1f5 !important;
    border-radius: 0.475rem;
}
