/* Bootstrap 5 Extra-Small Button */
.btn-xs {
    --bs-btn-padding-y: 0.15rem !important;
    --bs-btn-padding-x: 0.35rem !important;
    --bs-btn-font-size: 0.75rem !important;
    line-height: 1 !important;
    border-radius: 0.2rem !important;
}
.icon-btn-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 2px !important;
    font-size: 0.75rem;
    line-height: 1;
    min-height: 25px !important;
}
.logout-link {
    color: darkred !important;
    font-weight: bold !important;
}

/* ==========================================================================
   LIGHT MODE OVERRIDES - Concept 5 Moon Phases Header
   Keep header dark and footer brown while content area is light
   ========================================================================== */

/* Force header to use sunset gradient in light mode */
[data-bs-theme="light"] #headerContainer {
    /* OPTION 1: Earthy brown to purple sunset */
    background: linear-gradient(180deg, #8B6F47 0%, #7A5C6B 30%, #5D4872 60%, #3E3456 100%) !important;

    /* OPTION 2: Vibrant orange, rose, and purple sunset */
    /*background: linear-gradient(180deg, #CC7722 0%, #B8596B 30%, #8B4789 60%, #4A3357 100%) !important;*/

    /* OPTION 3: Fiery orange-red to deep purple twilight - ACTIVE */
    /*background: linear-gradient(180deg, #D4793A 0%, #A5557A 25%, #7A4B8B 50%, #4F3A6B 75%, #2D1F3D 100%) !important;*/

    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Close gap between navigation and header - COMPREHENSIVE FIX */
/* Remove all whitespace from top of page */
html {
    margin: 0 !important;
    padding: 0 !important;
}

[data-bs-theme="light"] html,
[data-bs-theme="light"] body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

nav.bg-dark {
    margin-top: 0 !important;
    outline: 2px solid blue !important;
}

/* Remove any gaps from containers */
[data-bs-theme="light"] #mainNavbar {
    padding-top: 4px !important;
    margin-top: -8px !important;
    background-color: #543d2b !important;
}
/* Remove any gaps from containers */
[data-bs-theme="light"] .container-fluid {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

[data-bs-theme="light"] .contentContainer {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

[data-bs-theme="light"] .navbar,
[data-bs-theme="light"] nav,
[data-bs-theme="light"] .navbar-dark,
[data-bs-theme="light"] .bg-dark {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

[data-bs-theme="light"] .navbar + #headerContainer,
[data-bs-theme="light"] nav + #headerContainer {
    margin-top: 0 !important;
}

/* Also apply to dark mode */
[data-bs-theme="dark"] body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] nav {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

[data-bs-theme="light"] #headerContainer .site-name,
[data-bs-theme="light"] #headerContainer .site-tagline {
    color: #FFFFFF !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5),
                 0 0 20px rgba(186, 85, 211, 0.4) !important;
}

[data-bs-theme="light"] #headerContainer .site-phone {
    color: #FFD700 !important;
}

[data-bs-theme="light"] #headerContainer .site-phone a {
    color: #FFD700 !important;
}

[data-bs-theme="light"] .moon-phase {
    background: radial-gradient(circle at 30% 30%, #f8f8ff, #d8d8e8) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), inset 0 0 10px rgba(100, 100, 120, 0.3) !important;
}

[data-bs-theme="light"] .moon-phase.full-moon {
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.9), 0 0 100px rgba(200, 200, 255, 0.4) !important;
}

[data-bs-theme="light"] #headerContainer .wolf-image {
    filter: brightness(1.2)
            drop-shadow(0 4px 25px rgba(255, 255, 255, 0.6))
            drop-shadow(0 8px 50px rgba(186, 85, 211, 0.5))
            drop-shadow(0 12px 75px rgba(138, 43, 226, 0.4)) !important;
}

/* Add stars in light mode for consistency */
[data-bs-theme="light"] #headerContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 15%, white, transparent),
        radial-gradient(2px 2px at 85% 25%, white, transparent),
        radial-gradient(1.5px 1.5px at 15% 20%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 10% 15%, rgba(255, 255, 255, 0.7), transparent);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

/* Keep footer brown in light mode - FULL WIDTH */
[data-bs-theme="light"] footer,
[data-bs-theme="light"] .footer {
    background-color: #543d2b !important;
    color: #ffffff !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2rem 0 !important;
    position: relative;
}

/* Footer container must not constrain width */
[data-bs-theme="light"] footer .container-fluid,
[data-bs-theme="light"] .footer .container-fluid {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Footer row should span full width */
[data-bs-theme="light"] footer .row,
[data-bs-theme="light"] .footer .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Footer columns get padding */
[data-bs-theme="light"] footer .col-12,
[data-bs-theme="light"] .footer .col-12 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* Footer text color - ALL text white for readability on brown */
[data-bs-theme="light"] footer,
[data-bs-theme="light"] footer p,
[data-bs-theme="light"] footer .footer-text,
[data-bs-theme="light"] footer span,
[data-bs-theme="light"] footer div,
[data-bs-theme="light"] footer em,
[data-bs-theme="light"] footer i,
[data-bs-theme="light"] footer strong,
[data-bs-theme="light"] footer b {
    color: #ffffff !important;
}

[data-bs-theme="light"] footer a,
[data-bs-theme="light"] .footer a {
    color: #daa520 !important;
}

[data-bs-theme="light"] footer a:hover,
[data-bs-theme="light"] .footer a:hover {
    color: #ffffff !important;
}

/* Light mode content area - blend sidebars with body, cards stand out as white */
[data-bs-theme="light"] body {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .container-fluid.contentContainer {
    background-color: #f8f9fa !important;
}

/* Sidebar backgrounds - blend with body (light gray) for seamless look */
[data-bs-theme="light"] .sidebar,
[data-bs-theme="light"] .left-column,
[data-bs-theme="light"] .right-column {
    background-color: #f8f9fa !important;
}

/* Content area and columns - same as body for seamless look */
[data-bs-theme="light"] #content,
[data-bs-theme="light"] .content-wrapper {
    background-color: #f8f9fa !important;
}

/* Card styling for light mode - white boxes with shadow for depth */
[data-bs-theme="light"] .card {
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="light"] .card-body {
    color: #212529 !important;
}

/* Card headers - ensure visibility and proper contrast */
[data-bs-theme="light"] .card-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    color: #212529 !important;
}

/* Card header links - dark for visibility */
[data-bs-theme="light"] .card-header a {
    color: #212529 !important;
    font-weight: 600;
}

[data-bs-theme="light"] .card-header a:hover {
    color: #654321 !important; /* Dark brown on hover */
    text-decoration: none !important;
}

/* Colored card headers - keep their backgrounds but ensure text is visible */
[data-bs-theme="light"] .card-header.bg-primary {
    background-color: #c9bca5 !important; /* Match Home link highlight color */
    color: #654321 !important; /* Dark brown text for contrast */
}

[data-bs-theme="light"] .card-header.bg-primary a,
[data-bs-theme="light"] .card-header.bg-primary a:link,
[data-bs-theme="light"] .card-header.bg-primary a:visited {
    color: #654321 !important; /* Dark brown text */
    text-decoration: none !important;
}

[data-bs-theme="light"] .card-header.bg-primary a:hover {
    color: #8b4513 !important; /* Saddle brown on hover */
    text-decoration: underline !important;
}

[data-bs-theme="light"] .card-header.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .card-header.bg-success a,
[data-bs-theme="light"] .card-header.bg-success a:link,
[data-bs-theme="light"] .card-header.bg-success a:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}

[data-bs-theme="light"] .card-header.bg-success a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

[data-bs-theme="light"] .card-header.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .card-header.bg-danger a {
    color: #ffffff !important;
}

[data-bs-theme="light"] .card-header.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .card-header.bg-warning a {
    color: #212529 !important;
}

/* Ensure dark text in content area */
[data-bs-theme="light"] .contentArea,
[data-bs-theme="light"] .content,
[data-bs-theme="light"] main,
[data-bs-theme="light"] article {
    /*background-color: #ffffff !important;*/
    color: #212529 !important;
}

[data-bs-theme="light"] p,
[data-bs-theme="light"] li,
[data-bs-theme="light"] span,
[data-bs-theme="light"] div {
    color: inherit !important;
}

/* Headers in light mode */
[data-bs-theme="light"] h1,
[data-bs-theme="light"] h2,
[data-bs-theme="light"] h3,
[data-bs-theme="light"] h4,
[data-bs-theme="light"] h5,
[data-bs-theme="light"] h6 {
    color: #212529 !important;
}

/* Links in light mode - context-aware colors */
/* Default links in content area - blue */
[data-bs-theme="light"] a {
    color: #0d6efd;
}

[data-bs-theme="light"] a:hover {
    color: #0a58ca;
}

/* Header links - gold/white for dark background */
[data-bs-theme="light"] #headerContainer a {
    color: #FFD700 !important;
}

[data-bs-theme="light"] #headerContainer a:hover {
    color: #FFFFFF !important;
}

/* Navigation links - match brown navbar background - NO dark gray backgrounds! */
[data-bs-theme="light"] .navbar a,
[data-bs-theme="light"] .navbar .nav-link,
[data-bs-theme="light"] .navbar-nav .nav-link,
[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link,
[data-bs-theme="light"] #mainNavbar .nav-link,
[data-bs-theme="light"] .nav-item .nav-link,
[data-bs-theme="light"] .navbar .nav-item,
[data-bs-theme="light"] .navbar .navbar-nav .nav-item {
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: transparent !important; /* Transparent to show navbar brown through */
}

/* Hover states - keep transparent or subtle brown tint, NO dark gray */
[data-bs-theme="light"] .navbar a:hover,
[data-bs-theme="light"] .navbar .nav-link:hover,
[data-bs-theme="light"] .navbar-nav .nav-link:hover,
[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link:hover,
[data-bs-theme="light"] #mainNavbar .nav-link:hover,
[data-bs-theme="light"] .nav-item .nav-link:hover,
[data-bs-theme="light"] .navbar .nav-item:hover,
[data-bs-theme="light"] .navbar-nav .nav-item:hover {
    color: #FFD700 !important;
    background-color: transparent !important; /* Keep transparent on hover */
}

/* Focus states - keep transparent */
[data-bs-theme="light"] .navbar .nav-link:focus,
[data-bs-theme="light"] .navbar a:focus,
[data-bs-theme="light"] .navbar-nav .nav-link:focus,
[data-bs-theme="light"] #mainNavbar .nav-link:focus {
    background-color: transparent !important;
}

/* Active nav link states - subtle highlight without dark background */
[data-bs-theme="light"] .navbar-nav .nav-link.active,
[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link.active,
[data-bs-theme="light"] #mainNavbar .nav-link.active {
    background-color: transparent !important;
    color: #FFD700 !important;
    font-weight: 600;
    border-bottom: 2px solid #FFD700; /* Underline instead of background */
}

/* Override any Bootstrap default backgrounds */
[data-bs-theme="light"] .navbar-light .navbar-nav .nav-link:hover,
[data-bs-theme="light"] .navbar-light .navbar-nav .nav-link:focus {
    background-color: transparent !important;
}

[data-bs-theme="light"] .navbar-light .navbar-nav .nav-link.active {
    background-color: transparent !important;
}

/* Override navigation-universal.css mobile hover states */
@media (max-width: 991.98px) {
    [data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link:hover,
    [data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link:focus {
        background-color: transparent !important;
    }

    [data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link.active {
        background-color: transparent !important;
        border-bottom: 2px solid #FFD700;
    }
}

/* Icons in navigation - no backgrounds */
[data-bs-theme="light"] .navbar i,
[data-bs-theme="light"] .navbar .fa,
[data-bs-theme="light"] .navbar .fas,
[data-bs-theme="light"] .navbar .far,
[data-bs-theme="light"] .navbar .fab,
[data-bs-theme="light"] .navbar-nav i,
[data-bs-theme="light"] #mainNavbar i {
    background-color: transparent !important;
    color: inherit !important;
}

/* Icon hover states */
[data-bs-theme="light"] .navbar a:hover i,
[data-bs-theme="light"] .navbar .nav-link:hover i,
[data-bs-theme="light"] .navbar-nav .nav-link:hover i {
    background-color: transparent !important;
    color: #FFD700 !important;
}

/* Sidebar links and menu items - dark brown for better theme consistency */
[data-bs-theme="light"] .sidebar a,
[data-bs-theme="light"] .left-column a,
[data-bs-theme="light"] .right-column a,
[data-bs-theme="light"] .list-group-item a,
[data-bs-theme="light"] .list-group-item {
    color: #654321 !important; /* Dark brown */
    text-decoration: none !important;
}

[data-bs-theme="light"] .sidebar a:hover,
[data-bs-theme="light"] .left-column a:hover,
[data-bs-theme="light"] .right-column a:hover,
[data-bs-theme="light"] .list-group-item a:hover,
[data-bs-theme="light"] .list-group-item:hover {
    color: #8b4513 !important; /* Saddle brown on hover */
    text-decoration: underline !important;
}

/* Sidebar menu icons - also brown */
[data-bs-theme="light"] .sidebar i,
[data-bs-theme="light"] .left-column i,
[data-bs-theme="light"] .right-column i,
[data-bs-theme="light"] .list-group-item i {
    color: #654321 !important;
}

/* Recent Articles card - full width links with no gaps, edge-to-edge */
[data-bs-theme="light"] .card-body.p-0 {
    padding: 0 !important;
}

[data-bs-theme="light"] .card-body .list-group-flush {
    margin: 0 !important;
}

[data-bs-theme="light"] .card-body .list-group-flush .list-group-item {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
}

/* Make article links have brown background edge-to-edge */
[data-bs-theme="light"] .card-body .list-group-flush .list-group-item:hover {
    background-color: #c9bca5 !important;
}

[data-bs-theme="light"] .card-body .list-group-flush .list-group-item.active {
    background-color: #c9bca5 !important;
}

/* Add spacing between menu sections in left column */
[data-bs-theme="light"] .left-column nav#sidebar_external,
[data-bs-theme="light"] nav#sidebar_external {
    margin-top: 4rem !important;
}

[data-bs-theme="light"] .left-column nav#sidebar_main {
    margin-bottom: 4rem !important;
}

/* Additional spacing for menu titles */
[data-bs-theme="light"] .left-column h4.menu-title {
    margin-top: 1rem !important;
}

/* Right sidebar special offers - brown links - MORE SPECIFIC */
[data-bs-theme="light"] .right-column .card.border-success a,
[data-bs-theme="light"] .right-column .card-body .offer a,
[data-bs-theme="light"] .right-column .offer a,
[data-bs-theme="light"] .right-column .offer h5 a,
[data-bs-theme="light"] .right-column .offer h4 a,
[data-bs-theme="light"] .right-column .card.border-success .card-body a {
    color: #654321 !important; /* Dark brown */
    text-decoration: none !important;
}

[data-bs-theme="light"] .right-column .card.border-success a:hover,
[data-bs-theme="light"] .right-column .card-body .offer a:hover,
[data-bs-theme="light"] .right-column .offer a:hover,
[data-bs-theme="light"] .right-column .offer h5 a:hover,
[data-bs-theme="light"] .right-column .offer h4 a:hover,
[data-bs-theme="light"] .right-column .card.border-success .card-body a:hover {
    color: #8b4513 !important; /* Saddle brown on hover */
    text-decoration: underline !important;
}

/* Footer links - gold for brown background */
[data-bs-theme="light"] footer a,
[data-bs-theme="light"] .footer a {
    color: #daa520 !important;
}

[data-bs-theme="light"] footer a:hover,
[data-bs-theme="light"] .footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Card links - inherit or blue (but not Special Offers card) */
[data-bs-theme="light"] .card:not(.border-success) a {
    color: #0d6efd !important;
}

[data-bs-theme="light"] .card:not(.border-success) a:hover {
    color: #0a58ca !important;
}

/* ==========================================================================
   BUTTON STYLING - Light Mode
   Fix dark brown buttons and ensure proper contrast
   ========================================================================== */

/* Primary buttons - Bootstrap blue - higher specificity to override link colors */
[data-bs-theme="light"] .btn.btn-primary,
[data-bs-theme="light"] a.btn.btn-primary,
[data-bs-theme="light"] button.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-primary:hover,
[data-bs-theme="light"] a.btn.btn-primary:hover,
[data-bs-theme="light"] button.btn-primary:hover {
    background-color: #0a58ca !important;
    border-color: #0a58ca !important;
    color: #ffffff !important;
}

/* Success buttons - green */
[data-bs-theme="light"] .btn.btn-success,
[data-bs-theme="light"] a.btn.btn-success,
[data-bs-theme="light"] button.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-success:hover,
[data-bs-theme="light"] a.btn.btn-success:hover,
[data-bs-theme="light"] button.btn-success:hover {
    background-color: #146c43 !important;
    border-color: #146c43 !important;
    color: #ffffff !important;
}

/* Danger buttons - red with white text */
[data-bs-theme="light"] .btn.btn-danger,
[data-bs-theme="light"] a.btn.btn-danger,
[data-bs-theme="light"] button.btn-danger,
[data-bs-theme="light"] .btn-danger,
[data-bs-theme="light"] .btn-danger * {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-danger:hover,
[data-bs-theme="light"] a.btn.btn-danger:hover,
[data-bs-theme="light"] button.btn-danger:hover,
[data-bs-theme="light"] .btn-danger:hover {
    background-color: #b02a37 !important;
    border-color: #b02a37 !important;
    color: #ffffff !important;
}

/* Warning buttons - yellow */
[data-bs-theme="light"] .btn.btn-warning,
[data-bs-theme="light"] a.btn.btn-warning,
[data-bs-theme="light"] button.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000000 !important;
}

[data-bs-theme="light"] .btn.btn-warning:hover,
[data-bs-theme="light"] a.btn.btn-warning:hover,
[data-bs-theme="light"] button.btn-warning:hover {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
    color: #000000 !important;
}

/* Secondary buttons - gray */
[data-bs-theme="light"] .btn.btn-secondary,
[data-bs-theme="light"] a.btn.btn-secondary,
[data-bs-theme="light"] button.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-secondary:hover,
[data-bs-theme="light"] a.btn.btn-secondary:hover,
[data-bs-theme="light"] button.btn-secondary:hover {
    background-color: #5c636a !important;
    border-color: #5c636a !important;
    color: #ffffff !important;
}

/* Outline buttons - proper borders and hover states */
[data-bs-theme="light"] .btn.btn-outline-primary,
[data-bs-theme="light"] a.btn.btn-outline-primary,
[data-bs-theme="light"] button.btn-outline-primary {
    border-color: #654321 !important;
    color: #654321 !important; /* Dark brown text */
    background-color: transparent !important;
}

[data-bs-theme="light"] .btn.btn-outline-primary:hover,
[data-bs-theme="light"] a.btn.btn-outline-primary:hover,
[data-bs-theme="light"] button.btn-outline-primary:hover {
    background-color: #654321 !important;
    border-color: #654321 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-outline-secondary,
[data-bs-theme="light"] a.btn.btn-outline-secondary,
[data-bs-theme="light"] button.btn-outline-secondary {
    border-color: #6c757d !important;
    color: #6c757d !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .btn.btn-outline-secondary:hover,
[data-bs-theme="light"] a.btn.btn-outline-secondary:hover,
[data-bs-theme="light"] button.btn-outline-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-outline-success,
[data-bs-theme="light"] a.btn.btn-outline-success,
[data-bs-theme="light"] button.btn-outline-success {
    border-color: #198754 !important;
    color: #198754 !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .btn.btn-outline-success:hover,
[data-bs-theme="light"] a.btn.btn-outline-success:hover,
[data-bs-theme="light"] button.btn-outline-success:hover {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-outline-danger,
[data-bs-theme="light"] a.btn.btn-outline-danger,
[data-bs-theme="light"] button.btn-outline-danger {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .btn.btn-outline-danger:hover,
[data-bs-theme="light"] a.btn.btn-outline-danger:hover,
[data-bs-theme="light"] button.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn.btn-outline-warning,
[data-bs-theme="light"] a.btn.btn-outline-warning,
[data-bs-theme="light"] button.btn-outline-warning {
    border-color: #ffc107 !important;
    color: #000000 !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .btn.btn-outline-warning:hover,
[data-bs-theme="light"] a.btn.btn-outline-warning:hover,
[data-bs-theme="light"] button.btn-outline-warning:hover {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000000 !important;
}

/* Fix dark brown buttons that appear in some areas */
[data-bs-theme="light"] .btn[style*="background-color: #5a4030"],
[data-bs-theme="light"] .btn[style*="background-color:#5a4030"],
[data-bs-theme="light"] .btn[style*="background: #5a4030"],
[data-bs-theme="light"] .btn[style*="background:#5a4030"] {
    background-color: #654321 !important; /* Readable dark brown */
    border-color: #654321 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn[style*="background-color: #5a4030"]:hover,
[data-bs-theme="light"] .btn[style*="background: #5a4030"]:hover {
    background-color: #8b4513 !important;
    border-color: #8b4513 !important;
    color: #ffffff !important;
}

/* Breadcrumbs in light mode */
[data-bs-theme="light"] .breadcrumb {
    background-color: #e9ecef !important;
}

[data-bs-theme="light"] .breadcrumb-item,
[data-bs-theme="light"] .breadcrumb-item a {
    color: #495057 !important;
}

/* Fix nearly invisible light gray text (#f3f4f6) */
[data-bs-theme="light"] [style*="color: #f3f4f6"],
[data-bs-theme="light"] [style*="color:#f3f4f6"],
[data-bs-theme="light"] .text-gray-100,
[data-bs-theme="light"] .text-muted-light {
    color: #6c757d !important; /* Medium gray - visible on white */
}

/* Ensure strong/bold text is always dark and visible */
[data-bs-theme="light"] strong,
[data-bs-theme="light"] b,
[data-bs-theme="light"] .font-weight-bold,
[data-bs-theme="light"] .fw-bold {
    color: #212529 !important;
}

/* Dark mode footer - also full width and brown */
[data-bs-theme="dark"] footer,
[data-bs-theme="dark"] .footer {
    background-color: #543d2b !important;
    color: #ffffff !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2rem 0 !important;
    position: relative;
}

[data-bs-theme="dark"] footer .container-fluid,
[data-bs-theme="dark"] .footer .container-fluid {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

[data-bs-theme="dark"] footer .row,
[data-bs-theme="dark"] .footer .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

[data-bs-theme="dark"] footer .col-12,
[data-bs-theme="dark"] .footer .col-12 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

[data-bs-theme="dark"] footer p,
[data-bs-theme="dark"] footer .footer-text {
    color: #ffffff !important;
}

[data-bs-theme="dark"] footer a {
    color: #daa520 !important;
}

[data-bs-theme="dark"] footer a:hover {
    color: #ffffff !important;
}

/* ==========================================================================
   TABLES - Light Mode
   Ensure tables have proper styling
   ========================================================================== */

[data-bs-theme="light"] table {
    background-color: #ffffff !important;
    color: #212529 !important;
}

[data-bs-theme="light"] table thead,
[data-bs-theme="light"] .table thead {
    background-color: #f0f0f0 !important; /* Slightly darker gray for better definition */
    color: #212529 !important;
}

[data-bs-theme="light"] table thead th,
[data-bs-theme="light"] .table thead th,
[data-bs-theme="light"] table th,
[data-bs-theme="light"] .table th {
    border-bottom: 2px solid #dee2e6 !important;
    background-color: #f0f0f0 !important; /* Light gray, not brown */
    color: #212529 !important; /* Dark text for readability */
    font-weight: 600 !important;
}

[data-bs-theme="light"] table tbody tr {
    border-bottom: 1px solid #dee2e6 !important;
}

[data-bs-theme="light"] table tbody tr:hover {
    background-color: #f8f9fa !important;
}

[data-bs-theme="light"] table tbody td {
    color: #212529 !important;
}

/* Badges in light mode */
[data-bs-theme="light"] .badge {
    font-weight: 600 !important;
}

[data-bs-theme="light"] .badge.bg-primary {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

[data-bs-theme="light"] .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

/* Background color classes - ensure proper text contrast */
[data-bs-theme="light"] .bg-primary,
[data-bs-theme="light"] .bg-primary *:not(a):not(.btn),
[data-bs-theme="light"] h4.bg-primary,
[data-bs-theme="light"] .card-header.bg-primary,
[data-bs-theme="light"] .card-header.bg-primary * {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

[data-bs-theme="light"]  .bg-primary-brown {
    background-color: #bdb3a3 !important; /* Darker tan - warm and professional */
    border-color: #bdb3a3 !important;
    color: #2a2520 !important; /* Dark brown text for contrast */
    font-weight: 600 !important;
    border-bottom: 1px solid #ad9d8d !important; /* Even darker border */
    box-shadow: none !important; /* Remove blue shadow */
    --bs-link-color: #2a2520 !important;
    --bs-link-hover-color: #2a2520 !important;
    --bs-link-color-rgb: 42, 37, 32 !important;
}
[data-bs-theme="light"]  .text-brown {
    color: #2a2520 !important; /* Dark brown text for contrast */

}


[data-bs-theme="light"] .bg-success,
[data-bs-theme="light"] .bg-success *:not(a):not(.btn),
[data-bs-theme="light"] span.bg-success,
[data-bs-theme="light"] div.bg-success,
[data-bs-theme="light"] p.bg-success,
[data-bs-theme="light"] .badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .bg-danger,
[data-bs-theme="light"] .bg-danger *:not(a):not(.btn) {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .bg-warning,
[data-bs-theme="light"] .bg-warning *:not(a):not(.btn) {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

[data-bs-theme="light"] .bg-secondary,
[data-bs-theme="light"] .bg-secondary *:not(a):not(.btn) {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .bg-info,
[data-bs-theme="light"] .bg-info *:not(a):not(.btn) {
    background-color: #0dcaf0 !important;
    color: #000000 !important;
}

[data-bs-theme="light"] .bg-dark,
[data-bs-theme="light"] .bg-dark *:not(a):not(.btn) {

    color: #ffffff !important;
}

[data-bs-theme="light"] .bg-light,
[data-bs-theme="light"] .bg-light *:not(a):not(.btn) {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* ==========================================================================
   FLASH ALERTS - Add Top Margin
   ========================================================================== */

[data-bs-theme="light"] .alert,
[data-bs-theme="light"] .alert-success,
[data-bs-theme="light"] .alert-danger,
[data-bs-theme="light"] .alert-warning,
[data-bs-theme="light"] .alert-info {
    margin-top: 1rem !important;
}

/* ==========================================================================
   BROWN BACKGROUND for Article Cards and Similar Elements
   Override bg-primary with warm brown color matching the sidebar
   ========================================================================== */

[data-bs-theme="light"] .card-header.bg-primary.text-white,
[data-bs-theme="light"] .bg-primary.text-white {
    /*background-color: #bdb3a3 !important; !* Warm brown matching sidebar *!*/
    border-color: #bdb3a3 !important;
    color: #2a2520 !important; /* Dark brown text for better contrast */
}

[data-bs-theme="light"] .card-header.bg-primary.text-white a,
[data-bs-theme="light"] .bg-primary.text-white a {
    color: #2a2520 !important; /* Ensure links also have dark brown text */
}

[data-bs-theme="light"] .card-header.bg-primary.text-white a:hover,
[data-bs-theme="light"] .bg-primary.text-white a:hover {
    color: #1a1510 !important; /* Darker brown on hover */
}


