/* =========================================================
   TipMotion Admin — Brand Color Override
   Primary  : #24245B  (deep navy)
   Darker   : #0D584A  (hover / active shade)
   ========================================================= */

/* ── Sidebar: Active item background & text ──────────────── */
.bg-menu-theme.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle),
.bg-menu-theme .menu-inner > .menu-item.active > .menu-link {
    background: linear-gradient(90deg, #24245B 0%, #0D584A 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(13, 88, 74, 0.45) !important;
}
[dir=rtl] .bg-menu-theme.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
    background: linear-gradient(90deg, #0D584A 0%, #24245B 100%) !important;
}

/* Active item icons & text */
.bg-menu-theme .menu-inner > .menu-item.active > .menu-link i,
.bg-menu-theme .menu-inner > .menu-item.active > .menu-link svg,
.bg-menu-theme .menu-inner > .menu-item.active > .menu-link div {
    color: #ffffff !important;
}

/* ── Sidebar: Hover state text & icon ────────────────────── */
.bg-menu-theme .menu-inner > .menu-item:not(.active) > .menu-link:hover {
    color: #24245B !important;
}
.bg-menu-theme .menu-inner > .menu-item:not(.active) > .menu-link:hover i,
.bg-menu-theme .menu-inner > .menu-item:not(.active) > .menu-link:hover svg {
    color: #24245B !important;
}

/* ── Sidebar: Open dropdown toggle (parent of active sub-item) */
.bg-menu-theme .menu-inner .menu-item.open > .menu-link.menu-toggle,
.layout-menu-hover.layout-menu-collapsed .bg-menu-theme .menu-inner .menu-item.open > .menu-link.menu-toggle,
.bg-menu-theme .menu-inner .menu-item.active > .menu-link.menu-toggle,
.layout-menu-hover.layout-menu-collapsed .bg-menu-theme .menu-inner .menu-item.active > .menu-link.menu-toggle {
    color: #24245B !important;
}
.bg-menu-theme .menu-inner .menu-item.open > .menu-link.menu-toggle i,
.bg-menu-theme .menu-inner .menu-item.active > .menu-link.menu-toggle i {
    color: #24245B !important;
}

/* ── Sidebar: Horizontal menu active toggle ──────────────── */
.bg-menu-theme.menu-horizontal .menu-inner > .menu-item.active > .menu-link.menu-toggle,
[dir=rtl] .bg-menu-theme.menu-horizontal .menu-inner > .menu-item.active > .menu-link.menu-toggle {
    background: linear-gradient(90deg, #24245B 0%, #0D584A 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(13, 88, 74, 0.45) !important;
}

/* ── Sidebar: Sub-menu active dot & text ─────────────────── */
.bg-menu-theme .menu-inner .menu-sub .menu-item.active > .menu-link::before {
    background-color: #24245B !important;
    color: #24245B !important;
}
.bg-menu-theme .menu-inner .menu-sub .menu-item.active > .menu-link {
    color: #24245B !important;
}

/* ── Sidebar active border indicator — removed ───────────── */
.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-inner > .menu-item.active::before {
    display: none !important;
    background-color: transparent !important;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(90deg, #24245B 0%, #0D584A 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 0.125rem 0.375rem rgba(36, 36, 91, 0.3) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(90deg, #1a1a45 0%, #0a4038 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 0.25rem 0.75rem rgba(36, 36, 91, 0.45) !important;
}
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background: linear-gradient(90deg, #0a4038 0%, #1a1a45 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}
.btn-primary:disabled,
.btn-primary.disabled {
    background: linear-gradient(90deg, #24245B 0%, #0D584A 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    opacity: 0.65 !important;
}

/* Outline */
.btn-outline-primary {
    color: #24245B !important;
    border-color: #24245B !important;
    background: transparent !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-check:focus + .btn-outline-primary {
    color: #fff !important;
    background-color: #24245B !important;
    border-color: #24245B !important;
    box-shadow: none !important;
}
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show {
    color: #fff !important;
    background-color: #0D584A !important;
    border-color: #0D584A !important;
}
.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
    color: #24245B !important;
    border-color: #24245B !important;
    background-color: transparent !important;
}
.btn-outline-primary .badge {
    background: #24245B !important;
    border-color: #24245B !important;
    color: #fff !important;
}

/* Label / Ghost */
.btn-label-primary {
    color: #24245B !important;
    background-color: rgba(35, 35, 91, 0.1) !important;
    border-color: transparent !important;
}
.btn-label-primary:hover,
.btn-label-primary:focus {
    background-color: rgba(35, 35, 91, 0.18) !important;
    color: #24245B !important;
}

/* ── Typography & Links ──────────────────────────────────── */
.text-primary { color: #24245B !important; }
a { color: #24245B; }
a:hover { color: #0D584A; }

/* ── Backgrounds / Badges ────────────────────────────────── */
.bg-primary { background-color: #24245B !important; }
.bg-label-primary {
    background-color: rgba(35, 35, 91, 0.1) !important;
    color: #24245B !important;
}
.badge.bg-primary { background-color: #24245B !important; }
.badge.bg-label-primary {
    background-color: rgba(35, 35, 91, 0.12) !important;
    color: #24245B !important;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: #24245B !important;
    box-shadow: 0 0 0 0.15rem rgba(36, 36, 91, 0.15) !important;
}

/* input hover */
.form-control:hover:not(:disabled):not([readonly]),
.form-select:hover:not(:disabled):not([readonly]) {
    border-color: #24245B !important;
}

/* input-group focus — the wrapper border + inner elements */
.input-group:focus-within {
    border-color: #24245B !important;
    box-shadow: 0 0 0 0.15rem rgba(36, 36, 91, 0.15) !important;
}
.input-group:focus-within .form-control,
.input-group:focus-within .input-group-text,
.input-group:focus-within .form-select {
    border-color: #24245B !important;
    box-shadow: none !important;
}

.form-check-input:checked {
    background-color: #24245B !important;
    border-color: #24245B !important;
}
.form-check-input:focus {
    border-color: #24245B !important;
    box-shadow: 0 0 0 0.15rem rgba(36, 36, 91, 0.15) !important;
}

/* ── Nav Tabs & Pills ────────────────────────────────────── */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #24245B !important;
    color: #fff !important;
}
.nav-pills .nav-link:hover:not(.active) {
    color: #24245B !important;
    background-color: rgba(35, 35, 91, 0.07) !important;
}
.nav-tabs .nav-link.active {
    border-color: #24245B #24245B #fff !important;
    color: #24245B !important;
}
.nav-tabs .nav-link:hover:not(.active) { color: #24245B !important; }

/* ── Pagination ──────────────────────────────────────────── */
.page-link { color: #24245B !important; }
.page-link:hover { color: #0D584A !important; }
.page-item.active .page-link {
    background-color: #24245B !important;
    border-color: #24245B !important;
    color: #fff !important;
}
.page-link:focus {
    box-shadow: 0 0 0 0.15rem rgba(35, 35, 91, 0.25) !important;
}

/* ── Progress & Spinner ──────────────────────────────────── */
.progress-bar { background-color: #24245B !important; }
.spinner-border.text-primary { color: #24245B !important; }

/* ── Table ───────────────────────────────────────────────── */
.table-primary { background-color: rgba(35, 35, 91, 0.1) !important; }

/* ── Dropdown ────────────────────────────────────────────── */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #24245B !important;
    color: #fff !important;
}
.dropdown-item:hover { color: #24245B !important; }

/* ── Alerts & Borders ────────────────────────────────────── */
.alert-primary {
    background-color: rgba(35, 35, 91, 0.1) !important;
    border-color: rgba(35, 35, 91, 0.2) !important;
    color: #24245B !important;
}
.border-primary { border-color: #24245B !important; }

/* ── Select2 ─────────────────────────────────────────────── */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #24245B !important;
    color: #fff !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #24245B !important;
    border-color: #0D584A !important;
    color: #fff !important;
}

/* ── Scrollbar — main content area only (vertical + horizontal) ── */
/* Exclude sidebar which uses perfect-scrollbar plugin */
:not(.layout-menu):not(.menu-inner)::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
:not(.layout-menu):not(.menu-inner)::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}
:not(.layout-menu):not(.menu-inner)::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #24245B 0%, #0D584A 100%);
    border-radius: 10px;
    border: 1px solid #f1f3f5;
}
:not(.layout-menu):not(.menu-inner)::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1a1a45 0%, #0a4038 100%);
}
:not(.layout-menu):not(.menu-inner)::-webkit-scrollbar-corner {
    background: transparent;
}

/* Sidebar — keep the native perfect-scrollbar untouched */
.layout-menu .ps__thumb-y,
.layout-menu .ps__rail-y.ps--clicking > .ps__thumb-y {
    background: rgba(36, 36, 91, 0.25) !important;
}
.layout-menu .ps__rail-y:hover > .ps__thumb-y {
    background: rgba(36, 36, 91, 0.4) !important;
}

/* ── Flatpickr ───────────────────────────────────────────── */
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #24245B !important;
    border-color: #24245B !important;
}
.flatpickr-day:hover { background: rgba(36, 36, 91, 0.1) !important; }
