/* =========================================================================
   Force black text in key content areas
   Applies strong black text color across dashboard, academic, student,
   staff/user and other management pages, while preserving existing white
   backgrounds. Elements that sit on dark or colored backgrounds (sidebar,
   gradient stat cards, navbar toggles) are protected from being turned black.
   ========================================================================= */

/* Primary readable text on light surfaces */
body,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
p,
span,
small,
a,
label,
legend,
li,
dt,
dd,
figcaption,
.card,
.card-header,
.card-title,
.card-subtitle,
.card-text,
.table,
.table thead th,
.table tbody td,
.table tfoot td,
.form-group .help-text,
.dropdown-menu .dropdown-item,
.alert,
.alert .alert-link,
.badge,
.badge span,
.list-group-item,
.navbar-light .navbar-nav .dropdown-user .navbar-nav-link span,
.page-header .page-title h4,
.page-header .page-title h4 span,
.page-header .header-elements .btn-link,
.page-header .header-elements .btn-link span,
.page-header .page-header-content,
.page-header .breadcrumb,
.page-header .breadcrumb span,
.page-header .breadcrumb a,
.page-title,
.breadcrumb,
.breadcrumb-item,
.content .text-body,
.modal-header .modal-title,
.modal-body {
    color: #000 !important;
    opacity: 1 !important;
}

/* Inputs keep crisp black text */
.form-control,
.select2-container .select2-selection__choice,
.select2-container .select2-selection__rendered,
.select2-container .select2-selection--single .select2-selection__rendered,
.select2-container .select2-selection--multiple .select2-selection__rendered {
    color: #000 !important;
    background-color: #ffffff !important;
}

/* Keep dark/colored surfaces readable — their inner text must stay light */
.sidebar-dark,
.sidebar-dark .sidebar-user .media-body,
.sidebar-dark .sidebar-user .media-title,
.sidebar-dark .nav-sidebar .nav-link,
.sidebar-dark .nav-sidebar .nav-item .nav-link,
.card.stat-card .media,
.card.has-bg-image .media,
.card.stat-card .media-body,
.card.has-bg-image .media-body,
.card.stat-card .media-title,
.card.has-bg-image .media-title,
.card.stat-card .media-annotation,
.card.has-bg-image .media-annotation {
    color: #ffffff !important;
}

/* Muted helper text on dark/colored stat cards stays readable */
.card.stat-card .opacity-50,
.card.has-bg-image .opacity-50,
.card.stat-card .text-muted,
.card.has-bg-image .text-muted,
.card.bg-blue-400 .text-muted,
.card.bg-danger-400 .text-muted,
.card.bg-success-400 .text-muted,
.card.bg-indigo-400 .text-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}

/* Lighter-muted helper text on plain light surfaces */
.content .text-muted,
.modal-body .text-muted,
.card .text-muted,
.form-group .text-muted {
    color: #4b5563 !important;
}

/* Sidebar dark user section sub-label */
.sidebar-dark .sidebar-user .opacity-50 {
    color: rgba(248, 250, 252, 0.72) !important;
}

/* =========================================================================
   Force black icons in light content areas
   Icomoon/Themify icon glyphs inherit color from their parent; we override
   them to pure black in content areas, stat cards, tables, forms, buttons
   and headers. Dark/colored surfaces (sidebar, gradient stat cards,
   navbar toggles) are protected so their icons stay light and readable.
   ========================================================================= */

/* Generic: any icon glyph on a light surface */
.content i[class^="icon-"],
.content i[class*=" icon-"],
i[class^="icon-"],
i[class*=" icon-"] {
    color: #000 !important;
    opacity: 1 !important;
}

/* Stat card icons: keep light on the gradient/dark card backgrounds */
.card.stat-card i[class^="icon-"],
.card.stat-card i[class*=" icon-"],
.card.has-bg-image i[class^="icon-"],
.card.has-bg-image i[class*=" icon-"],
.card.stat-card .media i,
.card.has-bg-image .media i {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Sidebar: icons sit on the dark sidebar background, keep them light */
.sidebar-dark i[class^="icon-"],
.sidebar-dark i[class*=" icon-"],
.sidebar i[class^="icon-"],
.sidebar i[class*=" icon-"],
.nav-sidebar i[class^="icon-"],
.nav-sidebar i[class*=" icon-"],
.nav-sidebar .nav-link i,
.nav-sidebar .nav-item i {
    color: #94a3b8 !important;
}

.sidebar-dark .sidebar-user i,
.navbar-light .navbar-nav-link i,
.sidebar-mobile-toggler i {
    color: #1f2937 !important;
}

/* Active sidebar link: icon matches the green gradient, use white */
.nav-sidebar .nav-item .nav-link.active i,
.nav-sidebar .nav-item .nav-link.active i[class^="icon-"],
.nav-sidebar .nav-item .nav-link.active i[class*=" icon-"] {
    color: #ffffff !important;
}

/* Hovered sidebar link: icon goes light on hover */
.nav-sidebar .nav-item .nav-link:hover i,
.nav-sidebar .nav-item .nav-link:hover i[class^="icon-"],
.nav-sidebar .nav-item .nav-link:hover i[class*=" icon-"] {
    color: #f8fafc !important;
}

/* Navbar toggles / menu buttons keep dark on light navbar */
.navbar-toggler i,
.sidebar-mobile-main-toggle i,
.sidebar-control i {
    color: #1f2937 !important;
}