:root {
    --bs-font-sans-serif: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

    /* Bootstrap 5.3 theme color overrides */
    --bs-primary: #3c2673;
    --bs-primary-rgb: 60, 38, 115;
    --bs-primary-bg-subtle: #e8e3f4;
    --bs-primary-border-subtle: #c7b9e5;
    --bs-primary-text-emphasis: #241745;
}

[data-bs-theme="dark"] {
    /* Bootstrap 5.3 dark theme overrides */
    --bs-primary-bg-subtle: #1c1135;
    --bs-primary-border-subtle: #3c2673;
    --bs-primary-text-emphasis: #9d85db;
}

input[type=date] {
    width: inherit;
}

/* Primary Button overrides */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #3c2673;
    --bs-btn-border-color: #3c2673;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #311f5e;
    --bs-btn-hover-border-color: #2e1d58;
    --bs-btn-focus-shadow-rgb: 90, 71, 137;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2e1d58;
    --bs-btn-active-border-color: #2a1b52;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #3c2673;
    --bs-btn-disabled-border-color: #3c2673;
}

/* Primary Outline Button overrides */
.btn-outline-primary {
    --bs-btn-color: #3c2673;
    --bs-btn-border-color: #3c2673;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #3c2673;
    --bs-btn-hover-border-color: #3c2673;
    --bs-btn-focus-shadow-rgb: 60, 38, 115;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3c2673;
    --bs-btn-active-border-color: #3c2673;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #3c2673;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #3c2673;
}

[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #9d85db;
    --bs-btn-border-color: #9d85db;
    --bs-btn-hover-border-color: #9d85db;
    --bs-btn-active-border-color: #9d85db;
    --bs-btn-focus-shadow-rgb: 157, 133, 219;
    --bs-btn-disabled-color: #9d85db;
    --bs-btn-disabled-border-color: #9d85db;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--bs-primary);
}

.nav-pills .nav-link:not(.active) {
    color: var(--bs-body-color);
}

.nav-pills .nav-link:not(.active):hover {
    color: var(--bs-primary-text-emphasis);
}

.nav-pills .nav-link.active {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

@media (max-width: 767.98px) {
    header .nav-pills {
        width: 100%;
        flex-direction: column;
        align-items: stretch !important;
        margin-top: 0.5rem;
    }

    header .nav-pills .nav-item {
        width: 100%;
    }

    header .nav-pills .nav-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Bricolage Grotesque", serif;
    font-weight: 600;
    font-style: normal;
}

.logo {
    font-family: "Bricolage Grotesque", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    color: var(--bs-primary);
}

[data-bs-theme="dark"] .logo {
    color: #fff;
}

.site-logo {
    width: auto;
    height: 2.25rem;
    object-fit: contain;
    flex-shrink: 0;
}

.login-logo {
    width: auto;
    height: 3.25rem;
    object-fit: contain;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .site-logo,
[data-bs-theme="dark"] .login-logo {
    filter: brightness(0) invert(1);
}

.form-label {
    font-weight: 500 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .card-header.bg-success {
    background-color: #146c43 !important;
}

#theme-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    background-color: var(--bs-body-bg);
    box-shadow: var(--bs-box-shadow-sm);
}

#theme-toggle:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: #fff;
}

#theme-toggle [data-theme-icon] {
    width: 1rem;
}

/* Smooth fade & collapse transition for the reply button */
.reply-btn-transition {
    transition: opacity 0.35s ease, max-height 0.35s ease, padding 0.35s ease, margin 0.35s ease, visibility 0.35s ease;
    opacity: 1;
    max-height: 50px;
    overflow: hidden;
    visibility: visible;
    display: inline-block;
}

.reply-btn-transition.hidden-reply-btn {
    opacity: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    visibility: hidden !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
}

.no-margin p {
    margin: 0;
}

.fs-7 {
    font-size: 0.9rem;
}