/* ==========================================================
   EIU Brand Theme Override for Metronic 9 Boilerplate
   Colors sourced from EIU22 CSS bundle
   eiu-blue:        #004c97
   eiu-ui-blue:     #103570
   eiu-accent-blue: #6ad1e3
   eiu-text-gray:   #696c6e
   ========================================================== */

html,
body {
    font-family: 'museo-sans', ui-sans-serif, system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.kt-card-title,
.kt-menu-heading {
    font-family: 'futura-pt-bold', ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0.01em;
}

:root {
    --primary: #103570;
    --primary-foreground: #ffffff;
    --secondary-foreground: #696c6e;
    --ring: #103570;
}

.dark {
    --primary: #4a7cc7;
    --primary-foreground: #ffffff;
    --secondary-foreground: #a7a9ac;
    --ring: #4a7cc7;
}

#sidebar_header {
    background-color: #003368;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dark #sidebar_header {
    background-color: #001f3e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar_toggle {
    color: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    background-color: transparent !important;
}

#sidebar_toggle:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

/* ==========================================================
   Select2 — theme-aware overrides using Metronic CSS vars
   Works automatically in both light and dark modes.
   ========================================================== */

/* Selection box (the visible input area) */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    background-color: var(--background);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    color: var(--foreground);
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 25%, transparent);
}

/* Placeholder text */
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: var(--muted-foreground);
}

/* Selected tag chips */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--accent);
    border: 1px solid var(--border);
    color: var(--foreground);
    border-radius: calc(var(--radius) * 0.75);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    color: var(--foreground);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--muted-foreground);
    border-right: 1px solid var(--border);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}

/* Dropdown panel */
.select2-dropdown {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
}

/* Search input inside dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--background);
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) * 0.75);
    color: var(--foreground);
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary);
}

/* Dropdown options */
.select2-results__option {
    color: var(--foreground);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.select2-container--default .select2-results__option--selected {
    background-color: var(--accent);
    color: var(--foreground);
}

/* "No results" message */
.select2-container--default .select2-results__option--disabled {
    color: var(--muted-foreground);
}

/* ============================================================
   Header - Dark background (matches EIU nav bar)
   ============================================================ */

#header {
    background-color: #103570 !important;
    border-bottom-width: 1px !important;
    border-bottom-color: rgba(0, 0, 0, 0.25) !important;
}

.dark #header {
    background-color: #0c1d3e !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

/* Header: hamburger icon */
#header .btn-ghost i.fa-solid {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Header: dark mode moon icon */
#header .fa-moon {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Header: user button toggle (not the dropdown) */
#header .kt-menu-toggle .text-foreground {
    color: rgba(255, 255, 255, 0.9) !important;
}

#header .kt-menu-toggle .text-muted-foreground {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Header: user avatar initial badge */
#header .kt-menu-toggle .bg-primary {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================================
   Sidebar - Dark background
   ============================================================ */

#sidebar {
    background-color: #1a3560;
    border-color: rgba(255, 255, 255, 0.08);
}

.dark #sidebar {
    background-color: #0c1d3e;
    border-color: rgba(255, 255, 255, 0.06);
}

/* Sidebar search */
#sidebar_search {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

#sidebar_search::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

#sidebar_search:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15) !important;
}

#sidebar .fa-magnifying-glass {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Sidebar menu: section headings */
#sidebar_menu .kt-menu-heading {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Sidebar menu: item titles */
#sidebar_menu .kt-menu-title {
    color: rgba(255, 255, 255, 0.78) !important;
}

/* Sidebar menu: icons and arrows */
#sidebar_menu .kt-menu-icon i {
    color: rgba(255, 255, 255, 0.55) !important;
}

#sidebar_menu .kt-menu-arrow {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* Sidebar menu: hover */
#sidebar_menu .kt-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: transparent !important;
}

#sidebar_menu .kt-menu-link:hover .kt-menu-title {
    color: #ffffff !important;
}

#sidebar_menu .kt-menu-link:hover .kt-menu-icon i {
    color: rgba(255, 255, 255, 0.85) !important;
}

#sidebar_menu .kt-menu-link:hover .kt-menu-arrow {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Sidebar menu: active top-level item */
#sidebar_menu .kt-menu-item.active>.kt-menu-link {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

#sidebar_menu .kt-menu-item.active>.kt-menu-link .kt-menu-title {
    color: #ffffff !important;
    font-weight: 600;
}

#sidebar_menu .kt-menu-item.active>.kt-menu-link .kt-menu-icon i {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Sidebar accordion vertical line */
#sidebar_menu .kt-menu-accordion::before {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Sidebar sub-item bullet dots */
#sidebar_menu .kt-menu-bullet::before {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

#sidebar_menu .kt-menu-item.active .kt-menu-bullet::before {
    background-color: #6ad1e3 !important;
}

/* Sidebar sub-item active title */
#sidebar_menu .kt-menu-item.active .kt-menu-title {
    color: #ffffff !important;
    font-weight: 600;
}

/* ============================================================
   Horizontal Striped Forms  (.form-striped)
   Left label, even-width rows, alternating backgrounds,
   helper text below inputs.
   ============================================================ */
.form-striped>* {
    padding: 0.75rem 1.25rem;
}

.form-striped>*:nth-child(odd) {
    background-color: hsl(210 20% 96%);
}

.dark .form-striped>*:nth-child(odd) {
    background-color: hsl(220 20% 14%);
}

.form-striped>*:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.form-striped>*:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Fixed-width labels inside striped form rows */
@media (min-width: 768px) {

    .form-striped>*>label:first-child,
    .form-striped>*>span:first-child {
        width: 12rem;
        min-width: 12rem;
        flex-shrink: 0;
        text-align: end;
        padding-top: 0.5rem;
    }
}