/**
 * Dark theme overrides — active when html.campus-theme-dark (roadmap 8Q).
 *
 * @package Campus
 */

html.campus-theme-dark body.campus-frontend {
	color: #e2e8f0;
	background: #0f172a;
}

html.campus-theme-dark .campus-header {
	background: #1e293b;
	border-bottom-color: #334155;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html.campus-theme-dark .campus-header-brand,
html.campus-theme-dark .campus-nav-link {
	color: #f1f5f9;
}

html.campus-theme-dark .campus-nav-link:hover,
html.campus-theme-dark .campus-nav-link.is-active {
	background: #334155;
	color: #fff;
}

html.campus-theme-dark .campus-header-username,
html.campus-theme-dark .campus-header-admin-link,
html.campus-theme-dark .campus-header-logout {
	color: #cbd5e1;
}

html.campus-theme-dark .campus-footer {
	background: #1e293b;
	border-top: 1px solid #334155;
	color: #94a3b8;
}

html.campus-theme-dark .campus-content {
	color: #e2e8f0;
}

/* Hub grid / cards */
html.campus-theme-dark .campus-hub-widget,
html.campus-theme-dark .campus-card {
	background: #1e293b;
	border-color: #334155;
	color: #e2e8f0;
}

html.campus-theme-dark .cp-hub-widget--flush {
	background: transparent;
	border-color: transparent;
}

html.campus-theme-dark .cp-flexible-form-embed__title,
html.campus-theme-dark .cp-flexible-form-cta__title {
	color: #f8fafc;
}

html.campus-theme-dark .cp-flexible-form-embed__footer {
	border-top-color: #334155;
}

html.campus-theme-dark .cp-flexible-form-cta__intro,
html.campus-theme-dark .cp-flexible-form-cta__secondary {
	color: #94a3b8;
}

html.campus-theme-dark .cp-flexible-form-cta--tile {
	background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
	border-color: #334155;
}

html.campus-theme-dark .cp-flexible-form-cta--tile:hover {
	border-color: #3b82f6;
}

html.campus-theme-dark .cp-flexible-form-cta__tile-row {
	border-top-color: #334155;
}

html.campus-theme-dark .cp-flexible-form-cta__tile-arrow {
	background: rgba(37, 99, 235, 0.2);
	border-color: #334155;
	color: #93c5fd;
}

html.campus-theme-dark .cp-flexible-form-cta--outline .cp-flexible-form-cta__btn--outline {
	background: #1e293b;
	color: #93c5fd;
	border-color: #3b82f6;
}

html.campus-theme-dark .cp-flexible-form-cta--outline .cp-flexible-form-cta__btn--outline:hover {
	background: rgba(37, 99, 235, 0.15);
}

html.campus-theme-dark .cp-flexible-form-cta-list__heading {
	color: #f8fafc;
}

html.campus-theme-dark .cp-flexible-form-cta-list__row {
	background: #1e293b;
	border-color: #334155;
}

html.campus-theme-dark .cp-flexible-form-cta-list__row:hover {
	border-color: #3b82f6;
}

html.campus-theme-dark .cp-flexible-form-cta-list__row-title {
	color: #f8fafc;
}

html.campus-theme-dark .cp-flexible-form-cta-list__row-desc {
	color: #94a3b8;
}

html.campus-theme-dark .cp-flexible-form-cta-list__footer {
	color: #94a3b8;
}

html.campus-theme-dark .cp-flexible-form-cta-list__footer:hover {
	color: #93c5fd;
}

html.campus-theme-dark .campus-hub-welcome-greeting,
html.campus-theme-dark .campus-hub-stat-count,
html.campus-theme-dark .cp-widget-title,
html.campus-theme-dark .cp-photos-recent-widget .cp-widget-title {
	color: #f8fafc;
}

html.campus-theme-dark .campus-hub-welcome-company,
html.campus-theme-dark .campus-hub-welcome-date,
html.campus-theme-dark .cp-react-shell__muted {
	color: #94a3b8;
}

/* Latest Documents hub widget */
html.campus-theme-dark .campus-documents-latest__title {
	color: #f8fafc;
}

html.campus-theme-dark .campus-documents-latest__title-icon {
	background: linear-gradient(145deg, rgba(37, 99, 235, 0.22) 0%, rgba(79, 70, 229, 0.16) 100%);
	border-color: rgba(59, 130, 246, 0.4);
}

html.campus-theme-dark .campus-documents-latest__title-icon .campus-documents-latest-title-icon {
	color: #93c5fd;
}

html.campus-theme-dark .campus-documents-latest__library-link {
	color: #93c5fd;
}

html.campus-theme-dark .campus-documents-latest__library-link:hover {
	color: #bfdbfe;
}

html.campus-theme-dark .campus-documents-latest__item:hover {
	background: rgba(15, 23, 42, 0.55);
	box-shadow: inset 0 0 0 1px #334155;
}

html.campus-theme-dark .campus-documents-latest__icon-wrap {
	background: #0f172a;
	border-color: #334155;
}

html.campus-theme-dark .campus-documents-latest__file-icon.campus-documents-compact-icon {
	color: #94a3b8;
}

html.campus-theme-dark .campus-documents-latest__doc-link {
	color: #e2e8f0;
}

html.campus-theme-dark .campus-documents-latest__doc-link:hover {
	color: #93c5fd;
}

html.campus-theme-dark .campus-documents-latest__meta {
	color: #94a3b8;
}

html.campus-theme-dark .cp-react-route-page__hero {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
	border-color: #334155;
}

html.campus-theme-dark .cp-react-route-page__hero-title {
	color: #f8fafc;
}

html.campus-theme-dark .cp-react-route-page__hero-sub {
	color: #94a3b8;
}

html.campus-theme-dark .cp-react-route-page__main {
	background: #1e293b;
	border-color: #334155;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25);
}

html.campus-theme-dark .cp-react-route-page__skeleton-line {
	background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
}

html.campus-theme-dark .cp-hub__header--shell {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
	border-color: #334155;
}

html.campus-theme-dark .cp-react-route-page[data-section="handbook"] .cp-handbook-widget-toc-list > li {
	background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
	border-color: #334155;
	border-left-color: #3b82f6;
}

html.campus-theme-dark .cp-react-route-page[data-section="handbook"] .cp-widget-view-all {
	background: rgba(59, 130, 246, 0.15);
	color: #93c5fd;
}

html.campus-theme-dark .cp-react-route-page[data-section="handbook"] .cp-widget-view-all:hover {
	background: rgba(59, 130, 246, 0.25);
	color: #bfdbfe;
}

html.campus-theme-dark .cp-react-route-page[data-section="documents"] .campus-documents-toolbar,
html.campus-theme-dark .cp-react-route-page[data-section="documents"] .campus-documents-empty {
	background: #0f172a;
	border-color: #334155;
}

html.campus-theme-dark .cp-react-route-page[data-section="directory"] .campus-directory-toolbar {
	background: #0f172a;
	border-color: #334155;
}

/* Directory — hub preview chips + filter strip (React route) */
html.campus-theme-dark .cp-react-route-page[data-section="directory"] .campus-directory-filters-hub,
html.campus-theme-dark .cp-react-route-page[data-section="directory"] .cp-directory-hub__folder-links {
	color: #cbd5e1;
}

html.campus-theme-dark .cp-react-route-page[data-section="directory"] .cp-directory-hub__folder-links a.campus-badge:not([style]),
html.campus-theme-dark .cp-react-route-page[data-section="directory"] .cp-directory-hub__folder-links button.campus-badge:not([style]),
html.campus-theme-dark .cp-directory-hub .cp-directory-hub__folder-links button.campus-badge:not([style]) {
	background: rgba(59, 130, 246, 0.18) !important;
	border: 1px solid rgba(59, 130, 246, 0.45);
	color: #bfdbfe !important;
}

html.campus-theme-dark .cp-react-route-page[data-section="directory"] .cp-directory-hub__folder-links a.campus-badge:not([style]):hover,
html.campus-theme-dark .cp-react-route-page[data-section="directory"] .cp-directory-hub__folder-links button.campus-badge:not([style]):hover,
html.campus-theme-dark .cp-directory-hub .cp-directory-hub__folder-links button.campus-badge:not([style]):hover {
	background: rgba(59, 130, 246, 0.28) !important;
	border-color: rgba(96, 165, 250, 0.55);
	color: #e0f2fe !important;
}

/* Announcements — feed cards + list (React route; mirrors documents/directory card treatment) */
html.campus-theme-dark .cp-react-route-page[data-section="announcements"] {
	--cp-announce-border: #334155;
	--cp-announce-border-strong: #475569;
	--cp-announce-border-focus: #60a5fa;
	--cp-announce-text: #e2e8f0;
	--cp-announce-text-muted: #94a3b8;
	--cp-announce-surface: #0f172a;
	--cp-announce-focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.2);
	--cp-announce-link: #f1f5f9;
	--cp-announce-link-hover: #93c5fd;
	--cp-announce-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements--hub-preview {
	color: #e2e8f0;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements-list {
	border-color: #334155;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcement-card {
	background: #0f172a;
	border-color: #334155;
	color: #e2e8f0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcement-card:hover {
	border-color: #475569;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements-header {
	border-bottom-color: #334155;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements-view-all {
	background: rgba(59, 130, 246, 0.15);
	color: #93c5fd;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements-view-all:hover {
	background: rgba(59, 130, 246, 0.25);
	color: #bfdbfe;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .cp-announcements-toolbar-react {
	background: #0f172a;
	border-color: #334155;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements-search-input {
	background: #1e293b;
	border-color: #475569;
	color: #e2e8f0;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .campus-announcements-filters-hub,
html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .cp-announcements-hub__folder-links {
	color: #cbd5e1;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .cp-announcements-hub__folder-links a.campus-badge:not([style]) {
	background: rgba(59, 130, 246, 0.18) !important;
	border: 1px solid rgba(59, 130, 246, 0.45);
	color: #bfdbfe !important;
}

html.campus-theme-dark .cp-react-route-page[data-section="announcements"] .cp-announcements-hub__folder-links a.campus-badge:not([style]):hover {
	background: rgba(59, 130, 246, 0.28) !important;
	border-color: rgba(96, 165, 250, 0.55);
	color: #e0f2fe !important;
}

/* Wave 2 — LMS / learning routes */
html.campus-theme-dark .cp-react-route-page[data-section="learning"] .cp-lms-widget-card,
html.campus-theme-dark .cp-react-route-page[data-section="learning-my-training"] .cp-lms-widget-item,
html.campus-theme-dark .cp-react-route-page[data-section="learning-training-progress"] .cp-lms-progress-stats {
	background: #0f172a;
	border-color: #334155;
	color: #e2e8f0;
}

html.campus-theme-dark .cp-react-route-page[data-section="learning"] .cp-lms-widget-card:hover {
	border-color: #475569;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Forms route */
html.campus-theme-dark .cp-react-route-page[data-section="forms"] .cp-forms-widget-item {
	background: #0f172a;
	border: 1px solid #334155;
	color: #e2e8f0;
}

html.campus-theme-dark .cp-react-route-page[data-section="forms"] .cp-forms-widget-item:hover {
	border-color: #475569;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

html.campus-theme-dark .cp-react-route-page[data-section="forms"] .cp-forms-badge {
	background: rgba(148, 163, 184, 0.2);
	color: #cbd5e1;
}

/* Compliance route */
html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-route-dashboard__block {
	background: rgba(15, 23, 42, 0.55);
	border: 1px solid #334155;
}

html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-hub-score {
	color: #f8fafc;
}

html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-hub-score__value {
	color: #93c5fd;
}

html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-hub-factors li {
	border-color: #334155;
	color: #cbd5e1;
}

html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-hub-list__item {
	border-color: #334155;
	background: rgba(15, 23, 42, 0.6);
}

html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-hub-pill {
	background: rgba(59, 130, 246, 0.15);
	color: #bfdbfe;
	border-color: rgba(59, 130, 246, 0.35);
}

html.campus-theme-dark .cp-react-route-page[data-section="compliance"] .cp-compliance-hub-pill--muted {
	background: rgba(148, 163, 184, 0.12);
	color: #94a3b8;
}

/* Glossary & templates list hovers */
html.campus-theme-dark .cp-react-route-page[data-section="glossary"] .cp-glossary-recent-item a:hover,
html.campus-theme-dark .cp-react-route-page[data-section="templates"] .cp-templates-recent-item a:hover {
	background: #334155;
}

/* Template Library (PHP + React) */
html.campus-theme-dark .cp-template-lib {
	--cp-tpl-text: #f1f5f9;
	--cp-tpl-muted: #94a3b8;
	--cp-tpl-muted2: #64748b;
	--cp-tpl-border: #334155;
	--cp-tpl-border2: #1e293b;
	--cp-tpl-surface: #0f172a;
	--cp-tpl-thead: #1e293b;
	--cp-tpl-link: #93c5fd;
	--cp-tpl-badge-bg: rgba(59, 130, 246, 0.15);
	--cp-tpl-badge-text: #bfdbfe;
}

html.campus-theme-dark .cp-templates-by-dept-heading {
	color: #e2e8f0;
}

html.campus-theme-dark .cp-templates-search-row input[type='search'],
html.campus-theme-dark .cp-templates-search-row select {
	background: #1e293b;
	border-color: #475569;
	color: #f1f5f9;
}

/* Photos grid */
html.campus-theme-dark .cp-react-route-page[data-section="photos"] .cp-photos-recent-item a:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html.campus-theme-dark .cp-react-route-page__footer-meta {
	border-top-color: #334155;
	color: #94a3b8;
}

html.campus-theme-dark .cp-handbook-toc-chapter-acc {
	background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
	border-color: #334155;
	border-left-color: #3b82f6;
}

html.campus-theme-dark .cp-handbook-toc-chapter-acc__summary {
	color: #f1f5f9;
}

html.campus-theme-dark .cp-handbook-toc-chapter-acc__body {
	border-top-color: #334155;
}

html.campus-theme-dark .campus-hub-stat,
html.campus-theme-dark .campus-stat-card {
	background: #0f172a;
	border-color: #334155;
}

html.campus-theme-dark .campus-btn-primary {
	background: #3b82f6;
	color: #fff;
}

html.campus-theme-dark .campus-btn-ghost {
	color: #e2e8f0;
	border-color: #475569;
}

html.campus-theme-dark .campus-pagination a,
html.campus-theme-dark .campus-pagination span {
	border-color: #475569;
	color: #e2e8f0;
}

/* Notification bell */
html.campus-theme-dark .cp-bell-dropdown {
	background: #1e293b;
	border-color: #334155;
}

html.campus-theme-dark .cp-bell-dropdown-header h4 {
	color: #f1f5f9;
}

/* Dark mode toggle */
html.campus-theme-dark .campus-dark-mode-toggle {
	color: #e2e8f0;
}

.campus-dark-mode-wrap {
	display: flex;
	align-items: center;
	margin-left: auto;
	margin-right: 8px;
}

.campus-dark-mode-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: #0f172a;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.campus-dark-mode-toggle:hover,
.campus-dark-mode-toggle:focus-visible {
	background: rgba(15, 23, 42, 0.06);
	outline: none;
}

html.campus-theme-dark .campus-dark-mode-toggle:hover,
html.campus-theme-dark .campus-dark-mode-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.08);
}

.campus-dark-mode-toggle .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

@media (max-width: 782px) {
	.campus-dark-mode-wrap {
		margin-right: 4px;
	}
}

/* Custom login page template (`campus-login-page`) — PHP-only, no React */
html.campus-theme-dark body.campus-login-page {
	color: #e2e8f0;
	background: #0f172a;
}

html.campus-theme-dark .campus-login-page-wrap {
	background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
}

html.campus-theme-dark .campus-login-wrap form {
	background: #1e293b;
	border: 1px solid #334155;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
	color: #e2e8f0;
}

html.campus-theme-dark .campus-login-wrap form label {
	color: #cbd5e1;
}

html.campus-theme-dark .campus-login-wrap form input[type="text"],
html.campus-theme-dark .campus-login-wrap form input[type="password"] {
	background: #0f172a;
	border-color: #475569;
	color: #f8fafc;
}

html.campus-theme-dark .campus-login-wrap form input:focus {
	border-color: #60a5fa;
	outline: none;
	box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}

html.campus-theme-dark .campus-login-wrap .button-primary,
html.campus-theme-dark .campus-login-wrap form .button-primary {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

html.campus-theme-dark .campus-login-wrap .button-primary:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

html.campus-theme-dark .campus-login-error,
html.campus-theme-dark .campus-login-wrap .login-error {
	background: rgba(220, 38, 38, 0.15);
	border-color: rgba(248, 113, 113, 0.4);
	color: #fecaca;
}

/* Hub — events widgets */
html.campus-theme-dark .cp-events-hub {
	border-color: #334155;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
	background: #1e293b;
}

html.campus-theme-dark .cp-events-hub__header {
	border-bottom-color: #334155;
	background: linear-gradient(180deg, #1e293b 0%, #1a2332 100%);
}

html.campus-theme-dark .cp-events-hub__header-icon {
	color: #93c5fd;
	background: rgba(37, 99, 235, 0.2);
	border-color: #334155;
}

html.campus-theme-dark .cp-events-hub__heading {
	color: #f8fafc;
}

html.campus-theme-dark .cp-events-hub__kicker {
	color: #94a3b8;
}

html.campus-theme-dark .cp-events-hub__item {
	border-bottom-color: #334155;
}

html.campus-theme-dark .cp-events-hub__item-link:hover {
	background: rgba(255, 255, 255, 0.04);
}

html.campus-theme-dark .cp-events-hub__badge {
	background: linear-gradient(165deg, rgba(37, 99, 235, 0.25) 0%, rgba(30, 58, 138, 0.35) 100%);
	border-color: #475569;
	box-shadow: none;
}

html.campus-theme-dark .cp-events-hub__badge-day {
	color: #e0e7ff;
}

html.campus-theme-dark .cp-events-hub__badge-month {
	color: #93c5fd;
}

html.campus-theme-dark .cp-events-hub__item-title {
	color: #f1f5f9;
}

html.campus-theme-dark .cp-events-hub__item-meta {
	color: #94a3b8;
}

html.campus-theme-dark .cp-events-hub__empty {
	color: #94a3b8;
}

html.campus-theme-dark .cp-events-hub__footer {
	border-top-color: #334155;
	background: #0f172a;
}

html.campus-theme-dark .cp-events-hub__cta {
	color: #bfdbfe;
	background: #1e293b;
	border-color: #475569;
}

html.campus-theme-dark .cp-events-hub__cta:hover {
	background: rgba(37, 99, 235, 0.25);
	border-color: #3b82f6;
	color: #e0f2fe;
}

html.campus-theme-dark .cp-events-cal-hub__day {
	border-bottom-color: #334155;
}

html.campus-theme-dark .cp-events-cal-hub__weekday {
	color: #64748b;
}

html.campus-theme-dark .cp-events-cal-hub__event-title {
	color: #f1f5f9;
}

html.campus-theme-dark .cp-events-cal-hub__event-time {
	color: #94a3b8;
}

html.campus-theme-dark .cp-events-hub__kicker--feed {
	color: #5eead4;
}

html.campus-theme-dark .cp-events-hub__list--feed {
	border-color: #334155;
}

html.campus-theme-dark .cp-events-hub__list--upcoming {
	border-left-color: rgba(96, 165, 250, 0.45);
}

html.campus-theme-dark .cp-events-feed-row {
	border-bottom-color: #334155;
}

html.campus-theme-dark .cp-events-feed-row__link:hover {
	background: rgba(13, 148, 136, 0.12);
}

html.campus-theme-dark .cp-events-feed-row__date {
	color: #5eead4;
	border-left-color: #2dd4bf;
}

html.campus-theme-dark .cp-events-feed-row__title {
	color: #f1f5f9;
}

html.campus-theme-dark .cp-events-feed-row__time {
	color: #94a3b8;
}

html.campus-theme-dark .cp-events-month-grid__cells {
	background: rgba(0, 0, 0, 0.25);
}

html.campus-theme-dark .cp-events-month-grid__cell {
	background: #1e293b;
	border-color: transparent;
}

html.campus-theme-dark .cp-events-month-grid__cell--outside {
	background: #0f172a;
}

html.campus-theme-dark .cp-events-month-grid__cell--today {
	border-color: rgba(129, 140, 248, 0.7);
	box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.25);
}

html.campus-theme-dark .cp-events-month-grid__cell--has-events {
	background: linear-gradient(180deg, #1e293b 0%, rgba(79, 70, 229, 0.15) 100%);
}

html.campus-theme-dark .cp-events-month-grid__num {
	color: #cbd5e1;
}

html.campus-theme-dark .cp-events-month-grid__nav-btn {
	color: #a5b4fc;
	background: #0f172a;
	border-color: #475569;
}

html.campus-theme-dark .cp-events-month-grid__nav-btn:hover:not(:disabled) {
	background: rgba(79, 70, 229, 0.2);
	border-color: #818cf8;
}

html.campus-theme-dark .cp-events-month-grid__month {
	color: #f8fafc;
}

html.campus-theme-dark .cp-events-month-grid__event-link {
	color: #c7d2fe;
}

html.campus-theme-dark .cp-events-month-grid__dot {
	background: #a5b4fc;
}
