/* Text Visibility Fix - Override all text colors properly */

/* Default text colors for all elements */
body, p, span, div, td, th, li, a {
    color: #1a1f36 !important;
}

/* White cards and containers - dark text */
.bg-white, .bg-white *, 
.card, .card *,
[class*="bg-white"], [class*="bg-white"] *,
.glass-card, .glass-card * {
    color: #1a1f36 !important;
}

/* Headers in white cards - darker */
.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Gradient headers - white text */
.bg-gradient-to-r, .bg-gradient-to-r *,
[class*="from-slate-8"], [class*="from-slate-8"] *,
.page-header, .page-header * {
    color: white !important;
}

/* Table headers - white text */
table thead, table thead * {
    color: white !important;
}

/* Table body - dark text */
table tbody, table tbody * {
    color: #1a1f36 !important;
}

/* Buttons - white text */
.btn, .btn *,
button, button *,
[class*="bg-blue"], [class*="bg-blue"] *,
[class*="bg-amber"], [class*="bg-amber"] *,
[class*="bg-green"], [class*="bg-green"] *,
[class*="bg-purple"], [class*="bg-purple"] * {
    color: white !important;
}

/* Links - keep colored */
a {
    color: #667eea !important;
}

a:hover {
    color: #764ba2 !important;
}

/* Badges - white text */
.badge, .badge *,
[class*="badge-"], [class*="badge-"] * {
    color: white !important;
}

/* Stats cards - white text */
.stat-card, .stat-card *,
[class*="stat-"], [class*="stat-"] * {
    color: white !important;
}

/* Form labels - dark text */
label, label * {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Input placeholders */
input::placeholder,
textarea::placeholder,
select::placeholder {
    color: #64748b !important;
}

/* Sidebar - white text */
.sidebar-modern, .sidebar-modern *,
nav, nav * {
    color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar-item.active, .sidebar-item.active * {
    color: white !important;
}

/* Alerts - proper colors */
[class*="bg-green-50"], [class*="bg-green-50"] * {
    color: #166534 !important;
}

[class*="bg-red-50"], [class*="bg-red-50"] * {
    color: #991b1b !important;
}

[class*="bg-yellow-50"], [class*="bg-yellow-50"] * {
    color: #854d0e !important;
}

[class*="bg-blue-50"], [class*="bg-blue-50"] * {
    color: #1e40af !important;
}

/* Text utilities */
.text-white, .text-white * {
    color: white !important;
}

.text-gray-900, .text-gray-800, .text-gray-700 {
    color: #1a1f36 !important;
}

.text-gray-600, .text-gray-500 {
    color: #64748b !important;
}

/* Ensure readability on all backgrounds */
[class*="bg-slate"], [class*="bg-slate"] * {
    color: white !important;
}

[class*="bg-gray-"], [class*="bg-gray-"] * {
    color: #1a1f36 !important;
}

/* Modal text */
.modal-content, .modal-content * {
    color: #1a1f36 !important;
}

.modal-header, .modal-header * {
    color: white !important;
}

/* Dropdown text */
.dropdown-menu, .dropdown-menu * {
    color: #1a1f36 !important;
}

/* Pagination */
.pagination a, .pagination span {
    color: #1a1f36 !important;
}

.pagination a:hover {
    color: white !important;
}