/* ==========================================================================
   AJ Properties — admin brand theme
   Matches the public website brand red (#C0392B). Loaded last so it overrides
   the base admin theme. Works in both light and dark mode.
   ========================================================================== */

:root,
:root[data-bs-theme="light"],
:root[data-bs-theme="dark"] {
    --bs-primary: #C0392B;
    --bs-primary-rgb: 192, 57, 43;
    --bs-link-color: #C0392B;
    --bs-link-color-rgb: 192, 57, 43;
    --bs-link-hover-color: #8f1f16;
    --bs-link-hover-color-rgb: 143, 31, 22;
    --primary: #C0392B;
    --primary-rgb: 192, 57, 43;
}

/* ---- Solid primary buttons ---- */
.btn-primary {
    --bs-btn-bg: #C0392B;
    --bs-btn-border-color: #C0392B;
    --bs-btn-hover-bg: #a93226;
    --bs-btn-hover-border-color: #a93226;
    --bs-btn-active-bg: #8f1f16;
    --bs-btn-active-border-color: #8f1f16;
    --bs-btn-disabled-bg: #C0392B;
    --bs-btn-disabled-border-color: #C0392B;
    --bs-btn-focus-shadow-rgb: 192, 57, 43;
    background-color: #C0392B !important;
    border-color: #C0392B !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible {
    background-color: #a93226 !important;
    border-color: #a93226 !important;
    color: #fff !important;
}

.btn-primary:active,
.btn-primary.active,
.btn-primary:first-child:active,
.btn-check:checked + .btn-primary {
    background-color: #8f1f16 !important;
    border-color: #8f1f16 !important;
    color: #fff !important;
}

.btn-primary:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(192, 57, 43, 0.35) !important;
}

/* ---- Outline primary buttons ---- */
.btn-outline-primary {
    --bs-btn-color: #C0392B;
    --bs-btn-border-color: #C0392B;
    --bs-btn-hover-bg: #C0392B;
    --bs-btn-hover-border-color: #C0392B;
    --bs-btn-active-bg: #8f1f16;
    --bs-btn-active-border-color: #8f1f16;
    --bs-btn-focus-shadow-rgb: 192, 57, 43;
    color: #C0392B !important;
    border-color: #C0392B !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #C0392B !important;
    border-color: #C0392B !important;
    color: #fff !important;
}

/* ---- Primary-tinted helpers ---- */
.bg-primary { background-color: #C0392B !important; }
.text-primary { color: #C0392B !important; }
.border-primary { border-color: #C0392B !important; }
.badge.bg-primary,
.badge.text-bg-primary { background-color: #C0392B !important; color: #fff !important; }
.link-primary { color: #C0392B !important; }
.btn-link { color: #C0392B; }
.btn-link:hover { color: #8f1f16; }

/* ---- Links ---- */
a { color: #C0392B; }
a:hover { color: #8f1f16; }

/* ---- Form focus in brand color ---- */
.form-control:focus,
.form-select:focus {
    border-color: #d98a80;
    box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.2);
}
.form-check-input:checked {
    background-color: #C0392B;
    border-color: #C0392B;
}
.form-check-input:focus {
    border-color: #d98a80;
    box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.2);
}

/* ---- Pagination ---- */
.page-item.active .page-link {
    background-color: #C0392B;
    border-color: #C0392B;
}
.page-link { color: #C0392B; }
.page-link:hover { color: #8f1f16; }

/* ---- Sidebar active item accent (dark sidebar) ---- */
.navbar-nav-menu .nav-link.active {
    background: rgba(192, 57, 43, 0.92) !important;
    color: #fff !important;
}
.navbar-nav-menu .nav-link.active .icons i,
.navbar-nav-menu .nav-link.active .content { color: #fff !important; }

/* ---- Primary alert (flash messages) ---- */
.alert-primary {
    --bs-alert-color: #7a1c14;
    --bs-alert-bg: #fbeae8;
    --bs-alert-border-color: #f1c3bd;
    --bs-alert-link-color: #5f150f;
}

/* ---- Progress / active accents ---- */
.progress-bar { background-color: #C0392B; }
.nav-pills .nav-link.active { background-color: #C0392B; }
