/* ============================================================
   APS — Academic Performance System
   Brand palette override: crimson #d8002e + white.
   Loaded AFTER the theme (styles.css) so it wins. Semantic
   status colors (success / warning / danger) are left intact.
   ============================================================ */

/* Re-point Bootstrap's primary tokens. This alone recolors everything
   that uses var(--bs-primary) / --bs-primary-rgb: sidebar active item,
   .text-primary, .bg-primary, focus rings, links, badges, etc. */
:root,
[data-color-theme],
[data-bs-theme] {
    --bs-primary: #d8002e !important;
    --bs-primary-rgb: 216, 0, 46 !important;
    --bs-primary-text-emphasis: #a4001f !important;
    --bs-primary-bg-subtle: rgba(216, 0, 46, 0.10) !important;
    --bs-primary-border-subtle: rgba(216, 0, 46, 0.25) !important;

    --bs-link-color: #d8002e !important;
    --bs-link-color-rgb: 216, 0, 46 !important;
    --bs-link-hover-color: #a4001f !important;
    --bs-link-hover-color-rgb: 164, 0, 31 !important;
}

/* Buttons hardcode their palette in the compiled theme — override explicitly. */
.btn-primary {
    --bs-btn-bg: #d8002e;
    --bs-btn-border-color: #d8002e;
    --bs-btn-hover-bg: #b1001f;
    --bs-btn-hover-border-color: #b1001f;
    --bs-btn-active-bg: #a4001f;
    --bs-btn-active-border-color: #a4001f;
    --bs-btn-disabled-bg: #d8002e;
    --bs-btn-disabled-border-color: #d8002e;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: #fff;
}

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

/* Form controls: brand the checked/focus accent. */
.form-check-input:checked {
    background-color: #d8002e;
    border-color: #d8002e;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(216, 0, 46, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(216, 0, 46, 0.20);
}

/* Badges / chips that hardcoded the old hue. */
.badge.bg-primary,
.text-bg-primary {
    background-color: #d8002e !important;
    color: #fff !important;
}

/* SweetAlert confirm buttons follow the brand too. */
.swal2-styled.swal2-confirm {
    background-color: #d8002e !important;
}

    .swal2-styled.swal2-confirm:focus {
        box-shadow: 0 0 0 3px rgba(216, 0, 46, 0.35) !important;
    }
