/* GUARDIAN POSSE LIGHT THEME - Clean Professional Day Mode */
/* Avoids white text on white backgrounds and bright buttons with white text */

[data-guardian-theme="light"] {
    --arkansas-bg-primary: #f5f0eb;
    --arkansas-bg-secondary: #ede6dd;
    --arkansas-bg-card: #ffffff;
    --arkansas-bg-elevated: #f9f6f2;
    --arkansas-deep-earth: #f5f0eb;
    --arkansas-text-light: #2d1f15;
    --arkansas-text-cream: #1a1410;
    --arkansas-text-tan: #5d4037;
    --arkansas-rich-brown: #d4c5b0;
    --arkansas-leather: #c8b89f;
}

[data-guardian-theme="light"] body {
    background-color: #f5f0eb !important;
    background-image: none !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .card {
    background: #ffffff !important;
    border: 1px solid #d4c5b0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .card:hover {
    border-color: #c9a641 !important;
    box-shadow: 0 4px 16px rgba(201, 166, 65, 0.15);
}

[data-guardian-theme="light"] .card-header {
    background: linear-gradient(180deg, #1a4d7a 0%, #123758 100%) !important;
    border-bottom: 2px solid #c9a641 !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .card-body {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .card-footer {
    background-color: #f5f0eb !important;
    border-top: 1px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* Buttons - Dark text on all colored buttons, no white text on bright backgrounds */
[data-guardian-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #1a4d7a 0%, #2d6ba3 100%) !important;
    border: 2px solid #1a4d7a !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #123758 0%, #1a4d7a 100%) !important;
    border-color: #123758 !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-success {
    background: linear-gradient(135deg, #2d4a2b 0%, #3c5a3a 100%) !important;
    border: 2px solid #2d4a2b !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-success:hover {
    background: linear-gradient(135deg, #3c5a3a 0%, #4a6d48 100%) !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-warning {
    background: linear-gradient(135deg, #b8860b 0%, #d4a017 100%) !important;
    border: 2px solid #b8860b !important;
    color: #1a1410 !important;
}

[data-guardian-theme="light"] .btn-warning:hover {
    background: linear-gradient(135deg, #9a7209 0%, #b8860b 100%) !important;
    color: #1a1410 !important;
}

[data-guardian-theme="light"] .btn-danger {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%) !important;
    border: 2px solid #8B4513 !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-info {
    background: linear-gradient(135deg, #b8860b 0%, #d4a017 100%) !important;
    border: 2px solid #b8860b !important;
    color: #1a1410 !important;
}

[data-guardian-theme="light"] .btn-light {
    background: #f5f0eb !important;
    border: 2px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .btn-dark {
    background: #2d1f15 !important;
    border: 2px solid #2d1f15 !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-outline-primary {
    border: 2px solid #1a4d7a !important;
    color: #1a4d7a !important;
    background: transparent !important;
}

[data-guardian-theme="light"] .btn-outline-primary:hover {
    background: #1a4d7a !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-outline-success {
    border: 2px solid #2d4a2b !important;
    color: #2d4a2b !important;
    background: transparent !important;
}

[data-guardian-theme="light"] .btn-outline-success:hover {
    background: #2d4a2b !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .btn-outline-warning {
    border: 2px solid #b8860b !important;
    color: #8B6914 !important;
    background: transparent !important;
}

[data-guardian-theme="light"] .btn-outline-warning:hover {
    background: #b8860b !important;
    color: #1a1410 !important;
}

[data-guardian-theme="light"] .btn-outline-danger {
    border: 2px solid #8B4513 !important;
    color: #8B4513 !important;
    background: transparent !important;
}

[data-guardian-theme="light"] .btn-outline-danger:hover {
    background: #8B4513 !important;
    color: #f5f0eb !important;
}

/* Headings */
[data-guardian-theme="light"] h1,
[data-guardian-theme="light"] h2,
[data-guardian-theme="light"] h3,
[data-guardian-theme="light"] h4,
[data-guardian-theme="light"] h5,
[data-guardian-theme="light"] h6 {
    color: #1a1410 !important;
}

/* Text utilities */
[data-guardian-theme="light"] .text-muted {
    color: #6d5c4d !important;
}

[data-guardian-theme="light"] .text-light {
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .text-white {
    color: #2d1f15 !important;
}

/* Links */
[data-guardian-theme="light"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item) {
    color: #1a4d7a !important;
}

[data-guardian-theme="light"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):hover {
    color: #2d6ba3 !important;
}

/* Forms */
[data-guardian-theme="light"] .form-control,
[data-guardian-theme="light"] .form-select {
    background-color: #ffffff !important;
    border: 2px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .form-control:focus,
[data-guardian-theme="light"] .form-select:focus {
    background-color: #ffffff !important;
    border-color: #1a4d7a !important;
    color: #2d1f15 !important;
    box-shadow: 0 0 0 0.25rem rgba(26, 77, 122, 0.2);
}

[data-guardian-theme="light"] .form-control::placeholder {
    color: #8B7355 !important;
}

[data-guardian-theme="light"] .form-label {
    color: #2d1f15 !important;
}

/* Tables */
[data-guardian-theme="light"] .table {
    color: #2d1f15 !important;
    border-color: #d4c5b0 !important;
}

[data-guardian-theme="light"] .table thead {
    background: linear-gradient(180deg, #1a4d7a 0%, #123758 100%) !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .table thead th {
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .table tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e8dcc8 !important;
}

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

/* Alerts */
[data-guardian-theme="light"] .alert-info {
    background: #e8f4f8 !important;
    border-color: #1a4d7a !important;
    color: #123758 !important;
}

[data-guardian-theme="light"] .alert-success {
    background: #e8f5e9 !important;
    border-color: #2d4a2b !important;
    color: #2d4a2b !important;
}

[data-guardian-theme="light"] .alert-warning {
    background: #fff8e1 !important;
    border-color: #b8860b !important;
    color: #7a5a08 !important;
}

[data-guardian-theme="light"] .alert-danger {
    background: #fbe9e7 !important;
    border-color: #8B4513 !important;
    color: #6d3410 !important;
}

/* Badges */
[data-guardian-theme="light"] .badge.bg-primary {
    background: #1a4d7a !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .badge.bg-success {
    background: #2d4a2b !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .badge.bg-warning {
    background: #b8860b !important;
    color: #1a1410 !important;
}

[data-guardian-theme="light"] .badge.bg-danger {
    background: #8B4513 !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .badge.bg-info {
    background: #1a4d7a !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .badge.bg-dark {
    background: #2d1f15 !important;
    color: #f5f0eb !important;
}

/* Modals */
[data-guardian-theme="light"] .modal-content {
    background: #ffffff !important;
    border: 2px solid #d4c5b0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-guardian-theme="light"] .modal-header {
    background: linear-gradient(180deg, #1a4d7a 0%, #123758 100%) !important;
    border-bottom: 2px solid #c9a641 !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .modal-header .modal-title {
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .modal-body {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .modal-footer {
    background-color: #f5f0eb !important;
    border-top: 1px solid #d4c5b0 !important;
}

/* Dropdowns - Keep dark for nav consistency */
[data-guardian-theme="light"] .dropdown-menu:not(.navbar .dropdown-menu) {
    background: #ffffff !important;
    border: 2px solid #d4c5b0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

[data-guardian-theme="light"] .dropdown-item:not(.navbar .dropdown-item) {
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .dropdown-item:not(.navbar .dropdown-item):hover {
    background-color: #f5f0eb !important;
    color: #1a4d7a !important;
}

/* Background utilities */
[data-guardian-theme="light"] .bg-dark:not(.navbar):not(nav) {
    background-color: #f5f0eb !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .bg-light {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .bg-white {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .bg-secondary {
    background-color: #ede6dd !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .text-bg-dark:not(.navbar *) {
    background-color: #f5f0eb !important;
    color: #2d1f15 !important;
}

/* List groups */
[data-guardian-theme="light"] .list-group-item {
    background-color: #ffffff !important;
    border-color: #e8dcc8 !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .list-group-item:hover {
    background-color: #f5f0eb !important;
}

/* Nav tabs and pills */
[data-guardian-theme="light"] .nav-tabs .nav-link,
[data-guardian-theme="light"] .nav-pills .nav-link {
    background-color: #f5f0eb !important;
    color: #2d1f15 !important;
    border-color: #d4c5b0 !important;
}

[data-guardian-theme="light"] .nav-tabs .nav-link.active,
[data-guardian-theme="light"] .nav-pills .nav-link.active {
    background-color: #1a4d7a !important;
    border-color: #1a4d7a !important;
    color: #f5f0eb !important;
}

/* Accordion */
[data-guardian-theme="light"] .accordion-item {
    background-color: #ffffff !important;
    border-color: #d4c5b0 !important;
}

[data-guardian-theme="light"] .accordion-button {
    background-color: #f5f0eb !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .accordion-button:not(.collapsed) {
    background-color: #1a4d7a !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .accordion-body {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

/* Pagination */
[data-guardian-theme="light"] .page-link {
    background-color: #ffffff !important;
    border-color: #d4c5b0 !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .page-link:hover {
    background-color: #f5f0eb !important;
    color: #1a4d7a !important;
}

[data-guardian-theme="light"] .page-item.active .page-link {
    background-color: #1a4d7a !important;
    border-color: #1a4d7a !important;
    color: #f5f0eb !important;
}

/* Footer - keep dark */
[data-guardian-theme="light"] footer.bg-dark {
    background-color: #1a1410 !important;
    color: #e8dcc8 !important;
}

[data-guardian-theme="light"] footer .text-muted {
    color: #8B7355 !important;
}

/* Toast */
[data-guardian-theme="light"] .toast {
    background-color: #ffffff !important;
    border: 2px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .toast-header {
    background-color: #f5f0eb !important;
    border-bottom: 1px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* Code blocks */
[data-guardian-theme="light"] pre,
[data-guardian-theme="light"] code {
    background-color: #f5f0eb !important;
    color: #2d4a2b !important;
    border: 1px solid #d4c5b0 !important;
}

/* Progress bars */
[data-guardian-theme="light"] .progress {
    background-color: #ede6dd !important;
    border: 1px solid #d4c5b0;
}

/* Popover */
[data-guardian-theme="light"] .popover {
    background-color: #ffffff !important;
    border: 2px solid #d4c5b0 !important;
}

[data-guardian-theme="light"] .popover-header {
    background-color: #f5f0eb !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .popover-body {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

/* Offcanvas */
[data-guardian-theme="light"] .offcanvas {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .offcanvas-header {
    background-color: #f5f0eb !important;
    border-bottom: 2px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* Breadcrumb */
[data-guardian-theme="light"] .breadcrumb {
    background-color: #f5f0eb !important;
}

[data-guardian-theme="light"] .breadcrumb-item {
    color: #5d4037 !important;
}

[data-guardian-theme="light"] .breadcrumb-item.active {
    color: #1a1410 !important;
}

/* Cyber background particles - hide in light mode */
[data-guardian-theme="light"] .cyber-background-particles,
[data-guardian-theme="light"] .cyber-golden-spiral,
[data-guardian-theme="light"] .cyber-fibonacci-grid {
    display: none !important;
}

/* Fix inline style overrides - common patterns */
[data-guardian-theme="light"] [style*="color: white"],
[data-guardian-theme="light"] [style*="color:#fff"],
[data-guardian-theme="light"] [style*="color: #fff"] {
    color: #2d1f15 !important;
}

/* Keep navbar text white in light mode */
[data-guardian-theme="light"] .navbar [style*="color: white"],
[data-guardian-theme="light"] .navbar [style*="color:#fff"],
[data-guardian-theme="light"] .navbar [style*="color: #fff"],
[data-guardian-theme="light"] nav [style*="color: white"],
[data-guardian-theme="light"] nav [style*="color:#fff"] {
    color: inherit !important;
}

/* Scrollbar */
[data-guardian-theme="light"] ::-webkit-scrollbar {
    width: 10px;
}

[data-guardian-theme="light"] ::-webkit-scrollbar-track {
    background: #f5f0eb;
}

[data-guardian-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c8b89f;
    border-radius: 5px;
}

[data-guardian-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #8B7355;
}

/* Theme switcher button */
.theme-switcher-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #c9a641;
    background: rgba(0, 0, 0, 0.3);
    color: #c9a641;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    padding: 0;
}

.theme-switcher-btn:hover {
    background: rgba(201, 166, 65, 0.2);
    border-color: #ffa726;
    color: #ffa726;
    transform: scale(1.1);
}

[data-guardian-theme="light"] .theme-switcher-btn {
    background: rgba(255, 255, 255, 0.8);
    border-color: #1a4d7a;
    color: #1a4d7a;
}

[data-guardian-theme="light"] .theme-switcher-btn:hover {
    background: rgba(26, 77, 122, 0.1);
    color: #2d6ba3;
}

/* Mobile responsiveness for theme switcher */
@media (max-width: 991px) {
    .theme-switcher-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0 !important;
    }
}

/* Ensure theme switcher is visible outside collapsed navbar */
.navbar .d-flex > .theme-switcher-btn {
    flex-shrink: 0;
}

/* Fix specific Guardian House style elements in light mode */
[data-guardian-theme="light"] .guardian-teal {
    color: #0a7a6a !important;
}

[data-guardian-theme="light"] .guardian-gold {
    color: #8B6914 !important;
}

[data-guardian-theme="light"] .guardian-purple {
    color: #6d3fc0 !important;
}

/* Ensure text contrast on inline-styled backgrounds */
[data-guardian-theme="light"] [style*="background"][style*="gradient"] {
    text-shadow: none !important;
}

/* Fix watermark in light mode */
[data-guardian-theme="light"] .outlaw-bg-mascot::before {
    color: #d4c5b0;
    opacity: 0.06;
}

/* ===== COMPREHENSIVE INLINE STYLE OVERRIDES FOR LIGHT MODE ===== */

/* Override dark background containers to light */
[data-guardian-theme="light"] [style*="background: rgba(0"],
[data-guardian-theme="light"] [style*="background:rgba(0"],
[data-guardian-theme="light"] [style*="background-color: rgba(0"],
[data-guardian-theme="light"] [style*="background: #0"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background:#0"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background: #1"]:not(.navbar *):not(nav *):not(footer *):not(.btn):not(.badge),
[data-guardian-theme="light"] [style*="background:#1"]:not(.navbar *):not(nav *):not(footer *):not(.btn):not(.badge),
[data-guardian-theme="light"] [style*="background: #2"]:not(.navbar *):not(nav *):not(footer *):not(.btn):not(.badge),
[data-guardian-theme="light"] [style*="background:#2"]:not(.navbar *):not(nav *):not(footer *):not(.btn):not(.badge) {
    background: #ffffff !important;
    border-color: #d4c5b0 !important;
}

[data-guardian-theme="light"] [style*="background-color: #0"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background-color:#0"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background-color: #1"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background-color:#1"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background-color: #2"]:not(.navbar *):not(nav *):not(footer *):not(.btn),
[data-guardian-theme="light"] [style*="background-color:#2"]:not(.navbar *):not(nav *):not(footer *):not(.btn) {
    background-color: #ffffff !important;
    border-color: #d4c5b0 !important;
}

/* Exclude navbar, footer, buttons from background override */
[data-guardian-theme="light"] .navbar [style*="background"],
[data-guardian-theme="light"] nav [style*="background"],
[data-guardian-theme="light"] footer [style*="background"],
[data-guardian-theme="light"] .card-header [style*="background"] {
    background: unset !important;
}

/* ===== TEXT COLOR OVERRIDES - White/Light text to dark ===== */
[data-guardian-theme="light"] [style*="color: #e2e8f0"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#e2e8f0"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #cbd5e1"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#cbd5e1"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #f1f5f9"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#f1f5f9"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #f8fafc"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#f8fafc"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #E8DCC8"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#E8DCC8"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #e8dcc8"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #f5f5dc"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#f5f5dc"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #D4C5B0"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#D4C5B0"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #d4c5b0"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #ffe0d6"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #e0f7ff"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #e8f5e9"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *) {
    color: #2d1f15 !important;
}

/* Override Guardian-style accent text to darker variants */
[data-guardian-theme="light"] [style*="color: #00ffc8"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#00ffc8"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #00e5ff"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#00e5ff"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #00d4ff"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#00d4ff"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *) {
    color: #0a7a6a !important;
}

[data-guardian-theme="light"] [style*="color: #c9a641"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#c9a641"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #C9A641"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#C9A641"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #ffa726"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#ffa726"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #ffb74d"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#ffb74d"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #DAA520"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *) {
    color: #8B6914 !important;
}

[data-guardian-theme="light"] [style*="color: #8b5cf6"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#8b5cf6"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #9d4edd"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *) {
    color: #6d3fc0 !important;
}

[data-guardian-theme="light"] [style*="color: #ff0055"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:#ff0055"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #ff6b35"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: #ff5e8a"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *) {
    color: #c4003f !important;
}

/* Override semi-transparent dark backgrounds used in cards/panels */
[data-guardian-theme="light"] [style*="background: linear-gradient"]:not(.navbar *):not(nav *):not(.btn):not(footer *):not(.badge):not(.card-header *):not(.progress-bar) {
    background: linear-gradient(135deg, #ffffff 0%, #f5f0eb 100%) !important;
    border-color: #d4c5b0 !important;
}

/* Fix opacity text on dark backgrounds */
[data-guardian-theme="light"] [style*="color: rgba(255,255,255"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color:rgba(255,255,255"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *),
[data-guardian-theme="light"] [style*="color: rgba(255, 255, 255"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *) {
    color: rgba(0, 0, 0, 0.6) !important;
}

/* Keep card headers and nav components from being overridden */
[data-guardian-theme="light"] .card-header [style*="color"] {
    color: #f5f0eb !important;
}

/* Ensure paragraph and span text in main content is readable */
[data-guardian-theme="light"] main p,
[data-guardian-theme="light"] main span:not(.badge):not(.btn *):not(.navbar *),
[data-guardian-theme="light"] main div:not(.btn):not(.badge):not(.navbar *):not(.card-header *):not(.alert *) {
    color: inherit;
}

/* Fix text-shadow issues in light mode */
[data-guardian-theme="light"] [style*="text-shadow"]:not(.navbar *):not(nav *):not(.card-header *) {
    text-shadow: none !important;
}

/* Override hero/banner sections - keep dark with white text */
[data-guardian-theme="light"] .hero-section,
[data-guardian-theme="light"] [class*="hero"],
[data-guardian-theme="light"] [class*="banner"] {
    background: linear-gradient(135deg, #1a4d7a 0%, #123758 100%) !important;
    color: #f5f0eb !important;
}

[data-guardian-theme="light"] .hero-section *,
[data-guardian-theme="light"] [class*="hero"] h1,
[data-guardian-theme="light"] [class*="hero"] h2,
[data-guardian-theme="light"] [class*="hero"] h3,
[data-guardian-theme="light"] [class*="hero"] p,
[data-guardian-theme="light"] [class*="hero"] span,
[data-guardian-theme="light"] [class*="banner"] h1,
[data-guardian-theme="light"] [class*="banner"] h2,
[data-guardian-theme="light"] [class*="banner"] p {
    color: #f5f0eb !important;
    -webkit-text-fill-color: #f5f0eb !important;
}

/* Fix stat cards and metric displays */
[data-guardian-theme="light"] [class*="stat-card"],
[data-guardian-theme="light"] [class*="metric"],
[data-guardian-theme="light"] [class*="kpi"] {
    background: #ffffff !important;
    border: 1px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* ===== SIDEBAR AND PANEL OVERRIDES ===== */
[data-guardian-theme="light"] .sidebar,
[data-guardian-theme="light"] [class*="sidebar"],
[data-guardian-theme="light"] .side-panel,
[data-guardian-theme="light"] .left-panel,
[data-guardian-theme="light"] .right-panel {
    background: #f5f0eb !important;
    border-color: #d4c5b0 !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .sidebar a,
[data-guardian-theme="light"] [class*="sidebar"] a,
[data-guardian-theme="light"] .sidebar .nav-link {
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .sidebar a:hover,
[data-guardian-theme="light"] [class*="sidebar"] a:hover,
[data-guardian-theme="light"] .sidebar .nav-link:hover {
    color: #1a4d7a !important;
    background: rgba(26, 77, 122, 0.1) !important;
}

/* ===== WIDGET AND DASHBOARD PANELS ===== */
[data-guardian-theme="light"] [class*="widget"],
[data-guardian-theme="light"] [class*="panel"]:not(.navbar *):not(nav *) {
    background: #ffffff !important;
    border-color: #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* ===== TAB CONTENT AREAS ===== */
[data-guardian-theme="light"] .tab-content,
[data-guardian-theme="light"] .tab-pane {
    background: #ffffff !important;
    color: #2d1f15 !important;
}

/* ===== SECTION ELEMENTS ===== */
[data-guardian-theme="light"] section:not(.hero-section) {
    color: #2d1f15;
}

/* ===== INLINE COLOR CLASSES USED ACROSS PAGES ===== */
[data-guardian-theme="light"] .text-enterprise {
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .text-cyber,
[data-guardian-theme="light"] .text-neon {
    color: #0a7a6a !important;
}

[data-guardian-theme="light"] .elegant-text,
[data-guardian-theme="light"] .text-elegant {
    color: #2d1f15 !important;
}

/* ===== GRADIENT TEXT FIX (common in headings) ===== */
/* Convert gradient text to solid dark text in light mode for readability */
/* Only targets main page content - preserves gradient text in navbar, footer, heroes */
[data-guardian-theme="light"] #main-content [style*="background-clip: text"],
[data-guardian-theme="light"] #main-content [style*="-webkit-background-clip: text"] {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #1a1410 !important;
    color: #1a1410 !important;
}

/* Keep gradient text readable inside card-headers even within main content */
[data-guardian-theme="light"] #main-content .card-header [style*="background-clip: text"],
[data-guardian-theme="light"] #main-content .card-header [style*="-webkit-background-clip: text"] {
    background: revert !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* ===== FIX SPECIFIC COMPONENT PATTERNS ===== */

/* Chat containers */
[data-guardian-theme="light"] .chat-container,
[data-guardian-theme="light"] .chat-messages,
[data-guardian-theme="light"] .chat-input-area,
[data-guardian-theme="light"] [class*="chat-box"] {
    background: #ffffff !important;
    color: #2d1f15 !important;
    border-color: #d4c5b0 !important;
}

[data-guardian-theme="light"] .chat-message,
[data-guardian-theme="light"] .message-bubble {
    color: #2d1f15 !important;
}

/* Agent cards and ecosystem panels */
[data-guardian-theme="light"] [class*="agent-card"],
[data-guardian-theme="light"] [class*="ecosystem"] {
    background: #ffffff !important;
    border-color: #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* Command palette */
[data-guardian-theme="light"] .command-palette,
[data-guardian-theme="light"] #commandPalette .modal-content {
    background: #ffffff !important;
    color: #2d1f15 !important;
}

/* Status indicators - keep their colors but ensure contrast */
[data-guardian-theme="light"] .status-active,
[data-guardian-theme="light"] .status-online {
    color: #2d4a2b !important;
}

[data-guardian-theme="light"] .status-inactive,
[data-guardian-theme="light"] .status-offline {
    color: #8B4513 !important;
}

/* Info boxes and callouts */
[data-guardian-theme="light"] [class*="callout"],
[data-guardian-theme="light"] [class*="info-box"],
[data-guardian-theme="light"] [class*="notice"] {
    background: #f5f0eb !important;
    border-color: #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* Separator/divider lines */
[data-guardian-theme="light"] hr {
    border-color: #d4c5b0 !important;
    opacity: 0.5;
}

/* Fix tooltip text */
[data-guardian-theme="light"] .tooltip-inner {
    background-color: #2d1f15 !important;
    color: #f5f0eb !important;
}

/* Fix close buttons in modals */
[data-guardian-theme="light"] .btn-close {
    filter: none !important;
}

/* ===== SPECIAL PAGE PATTERNS ===== */

/* Dashboard stats with large numbers */
[data-guardian-theme="light"] [class*="stat"] h2,
[data-guardian-theme="light"] [class*="stat"] h3,
[data-guardian-theme="light"] [class*="stat"] .display-4,
[data-guardian-theme="light"] [class*="stat"] .display-5,
[data-guardian-theme="light"] [class*="stat"] .display-6 {
    color: #1a4d7a !important;
    -webkit-text-fill-color: #1a4d7a !important;
}

/* Feature cards on landing/marketing pages */
[data-guardian-theme="light"] .feature-card,
[data-guardian-theme="light"] .pricing-card,
[data-guardian-theme="light"] .plan-card,
[data-guardian-theme="light"] .service-card {
    background: #ffffff !important;
    border: 1px solid #d4c5b0 !important;
    color: #2d1f15 !important;
}

/* Icon containers */
[data-guardian-theme="light"] .icon-circle,
[data-guardian-theme="light"] .icon-box,
[data-guardian-theme="light"] [class*="icon-wrapper"] {
    background: #f5f0eb !important;
    color: #1a4d7a !important;
}

/* Timeline and step indicators */
[data-guardian-theme="light"] [class*="timeline"],
[data-guardian-theme="light"] [class*="step-"] {
    color: #2d1f15 !important;
}

/* Small/muted text overrides */
[data-guardian-theme="light"] small,
[data-guardian-theme="light"] .small,
[data-guardian-theme="light"] .text-secondary {
    color: #5d4037 !important;
}

/* Lead text */
[data-guardian-theme="light"] .lead {
    color: #3a2e22 !important;
}

/* Ensure inputs inside dark-styled containers are still readable */
[data-guardian-theme="light"] [style*="background"] .form-control,
[data-guardian-theme="light"] [style*="background"] .form-select,
[data-guardian-theme="light"] [style*="background"] input,
[data-guardian-theme="light"] [style*="background"] textarea,
[data-guardian-theme="light"] [style*="background"] select {
    background-color: #ffffff !important;
    color: #2d1f15 !important;
    border-color: #d4c5b0 !important;
}

/* ===== DARK BG CLASS OVERRIDES ===== */
[data-guardian-theme="light"] .bg-gradient-dark:not(.navbar):not(nav):not(footer) {
    background: linear-gradient(135deg, #f5f0eb, #ffffff) !important;
    color: #2d1f15 !important;
}

[data-guardian-theme="light"] .cyber-card-bg,
[data-guardian-theme="light"] .cyber-glass-bg,
[data-guardian-theme="light"] .elegant-surface,
[data-guardian-theme="light"] .elegant-elevated {
    background: #ffffff !important;
    color: #2d1f15 !important;
    border-color: #d4c5b0 !important;
}

/* Fix webkit text fill for non-hero gradient text */
[data-guardian-theme="light"] [style*="-webkit-text-fill-color: transparent"]:not(.navbar *):not(nav *):not(.card-header *):not(footer *):not([class*="hero"] *):not([class*="banner"] *) {
    -webkit-text-fill-color: #1a1410 !important;
}

/* ===== ENSURE ALL BODY TEXT IS READABLE ===== */
[data-guardian-theme="light"] .container:not(.navbar .container) p,
[data-guardian-theme="light"] .container:not(.navbar .container) li,
[data-guardian-theme="light"] .container:not(.navbar .container) td,
[data-guardian-theme="light"] .container:not(.navbar .container) th:not(thead th),
[data-guardian-theme="light"] .container:not(.navbar .container) dd,
[data-guardian-theme="light"] .container:not(.navbar .container) dt,
[data-guardian-theme="light"] .container-fluid:not(.navbar .container-fluid) p,
[data-guardian-theme="light"] .container-fluid:not(.navbar .container-fluid) li {
    color: inherit;
}

/* ================================================================== */
/* ===== NAVBAR PROTECTION - MUST BE LAST FOR CASCADE PRIORITY ====== */
/* ================================================================== */
/* Uses #quantumNavbar ID for maximum specificity to override all     */
/* light-theme rules that leak into the navbar via broken :not()      */
/* ================================================================== */

[data-guardian-theme="light"] #quantumNavbar {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(15, 15, 20, 0.95) 100%) !important;
    border-bottom: 4px solid transparent !important;
}

[data-guardian-theme="light"] #quantumNavbar .navbar-brand {
    color: #E8DCC8 !important;
    -webkit-text-fill-color: #E8DCC8 !important;
}

[data-guardian-theme="light"] #quantumNavbar .navbar-brand:hover {
    color: #ffa726 !important;
    -webkit-text-fill-color: #ffa726 !important;
}

[data-guardian-theme="light"] #quantumNavbar .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: none;
}

[data-guardian-theme="light"] #quantumNavbar .nav-link:hover,
[data-guardian-theme="light"] #quantumNavbar .nav-link:focus {
    color: #00ffc8 !important;
    -webkit-text-fill-color: #00ffc8 !important;
    text-shadow: 0 0 12px rgba(0, 255, 200, 0.5) !important;
}

[data-guardian-theme="light"] #quantumNavbar .nav-link.active,
[data-guardian-theme="light"] #quantumNavbar .nav-link.show {
    color: #00ffc8 !important;
    -webkit-text-fill-color: #00ffc8 !important;
}

/* Navbar gradient text labels - convert to solid light text for readability */
/* The 'background' shorthand in leaking rules resets background-clip, */
/* breaking gradient text. Solid text is the reliable fix.             */
[data-guardian-theme="light"] #quantumNavbar [style*="background-clip: text"],
[data-guardian-theme="light"] #quantumNavbar [style*="-webkit-background-clip: text"] {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #E8DCC8 !important;
    color: #E8DCC8 !important;
    font-weight: 600 !important;
}

[data-guardian-theme="light"] #quantumNavbar .nav-link:hover [style*="background-clip: text"],
[data-guardian-theme="light"] #quantumNavbar .nav-link:hover [style*="-webkit-background-clip: text"],
[data-guardian-theme="light"] #quantumNavbar .nav-link:focus [style*="background-clip: text"],
[data-guardian-theme="light"] #quantumNavbar .nav-link:focus [style*="-webkit-background-clip: text"] {
    -webkit-text-fill-color: #00ffc8 !important;
    color: #00ffc8 !important;
}

/* Override leaked gradient backgrounds on non-text-clip elements */
[data-guardian-theme="light"] #quantumNavbar [style*="background: linear-gradient"]:not([style*="background-clip: text"]) {
    background: transparent !important;
}

/* Dropdown menus inside navbar - keep dark */
[data-guardian-theme="light"] #quantumNavbar .dropdown-menu {
    background: #0c0c12 !important;
    background-color: #0c0c12 !important;
    border: 2px solid #6d4c41 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}

[data-guardian-theme="light"] #quantumNavbar .dropdown-menu.show {
    background: #0c0c12 !important;
    background-color: #0c0c12 !important;
}

/* Dropdown items - light text on dark background */
[data-guardian-theme="light"] #quantumNavbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
}

[data-guardian-theme="light"] #quantumNavbar .dropdown-item:hover,
[data-guardian-theme="light"] #quantumNavbar .dropdown-item:focus {
    background-color: rgba(0, 255, 200, 0.1) !important;
    color: #00ffc8 !important;
    -webkit-text-fill-color: #00ffc8 !important;
    border-left-color: #00ffc8 !important;
}

[data-guardian-theme="light"] #quantumNavbar .dropdown-item strong {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

/* Dropdown item gradient text (featured items) */
[data-guardian-theme="light"] #quantumNavbar .dropdown-item [style*="background-clip: text"],
[data-guardian-theme="light"] #quantumNavbar .dropdown-item [style*="-webkit-background-clip: text"] {
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
}

/* Dropdown item backgrounds with gradients (featured items) */
[data-guardian-theme="light"] #quantumNavbar .dropdown-item[style*="background: linear-gradient"] {
    background: var(--keep) !important;
}

/* Dropdown headers */
[data-guardian-theme="light"] #quantumNavbar .dropdown-header {
    -webkit-text-fill-color: currentColor !important;
}

/* Dropdown dividers */
[data-guardian-theme="light"] #quantumNavbar .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Badges inside navbar */
[data-guardian-theme="light"] #quantumNavbar .badge {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Preserve inline colors on spans/icons */
[data-guardian-theme="light"] #quantumNavbar span[style*="color:"],
[data-guardian-theme="light"] #quantumNavbar span[style*="color: "],
[data-guardian-theme="light"] #quantumNavbar i[style*="color:"],
[data-guardian-theme="light"] #quantumNavbar i[style*="color: "] {
    -webkit-text-fill-color: currentColor !important;
}

/* Navbar toggler (mobile) */
[data-guardian-theme="light"] #quantumNavbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

[data-guardian-theme="light"] #quantumNavbar .navbar-toggler-icon {
    filter: brightness(2) !important;
}

/* Navbar buttons (dropdown toggles) */
[data-guardian-theme="light"] #quantumNavbar button.nav-link {
    background: transparent !important;
    background-color: transparent !important;
}

/* Text muted inside navbar */
[data-guardian-theme="light"] #quantumNavbar .text-muted {
    color: #a89888 !important;
    -webkit-text-fill-color: #a89888 !important;
}

/* Profile section */
[data-guardian-theme="light"] #quantumNavbar .navbar-nav:last-child .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
}
