:root {
    --survee-primary: #063e9d;
    --survee-primary-rgb: 6, 62, 157;
    --survee-primary-dark: #042b6e;
    --survee-primary-subtle: #dfe8f7;
    --survee-primary-border: #b7c9ea;

    --survee-accent: #d03e9d;
    --survee-accent-rgb: 208, 62, 157;
    --survee-accent-subtle: #fae3f2;

    --pe-primary: var(--survee-primary);
    --pe-primary-rgb: var(--survee-primary-rgb);
    --pe-primary-text-emphasis: var(--survee-primary-dark);
    --pe-primary-bg-subtle: var(--survee-primary-subtle);
    --pe-primary-border-subtle: var(--survee-primary-border);
    --pe-link-color: var(--survee-primary);
    --pe-link-color-rgb: var(--survee-primary-rgb);
    --pe-link-hover-color: var(--survee-accent);
    --pe-link-hover-color-rgb: var(--survee-accent-rgb);
    --pe-nav-link-hover-color: var(--survee-accent);

    --pe-danger: var(--survee-accent);
    --pe-danger-rgb: var(--survee-accent-rgb);
    --pe-danger-text-emphasis: #8f2169;
    --pe-danger-bg-subtle: var(--survee-accent-subtle);
    --pe-danger-border-subtle: #f2b7de;
    --pe-danger-light: var(--survee-accent-subtle);

    --bs-primary: var(--survee-primary);
    --bs-primary-rgb: var(--survee-primary-rgb);
    --bs-link-color: var(--survee-primary);
    --bs-link-color-rgb: var(--survee-primary-rgb);
    --bs-link-hover-color: var(--survee-accent);
    --bs-link-hover-color-rgb: var(--survee-accent-rgb);
}

/* Override legacy bootstrap primary active shadow */
.btn-primary:first-child:active,
.btn-primary:active {
    box-shadow: 0 .125rem .375rem 0 rgba(6, 62, 157, .3);
}

/* Pagination colors */
.page-link {
    color: var(--survee-primary);
    border-color: var(--survee-primary-border);
}

.page-link:hover {
    color: #042b6e;
    background-color: rgba(6, 62, 157, 0.08);
    border-color: rgba(6, 62, 157, 0.45);
}

.page-item.active .page-link {
    background-color: var(--survee-primary);
    border-color: var(--survee-primary);
    color: #fff;
    box-shadow: 0 .125rem .375rem 0 rgba(6, 62, 157, .25);
}

.page-item.disabled .page-link {
    color: rgba(6, 62, 157, 0.5);
    border-color: rgba(6, 62, 157, 0.2);
}

/* Global loading block */
.loading-block {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    z-index: 2100;
}

.loading-block.is-visible {
    display: flex;
}

.loading-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(15, 23, 42, 0.08);
    min-width: 260px;
    text-align: center;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 3px solid rgba(6, 62, 157, 0.2);
    border-top-color: #063e9d;
    margin: 0 auto 0.75rem;
    animation: loading-spin 0.9s linear infinite;
}

.loading-title {
    font-weight: 600;
    color: #0f172a;
}

.loading-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(100, 116, 139, 0.9);
}

.password-rules-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.74rem;
    line-height: 1.2;
}

.password-rules-compact .password-rule {
    gap: 0.3rem;
    margin: 0;
}

.password-rule i {
    font-size: 0.9rem;
}

.password-rule.is-valid {
    color: #0f9d58;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

[data-bs-theme="dark"] .loading-block {
    background: rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .loading-card {
    background: #2b2b2b;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .loading-title {
    color: #f3f2f1;
}

[data-bs-theme="dark"] .loading-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="dark"] .password-rule {
    color: rgba(243, 242, 241, 0.7);
}

/* Disable layout transitions to avoid first-load "expanding" animation */
#layout-wrapper,
.app-wrapper,
.app-header,
.pe-app-sidebar,
#sidebar,
#sidebar-simplebar {
    transition: none !important;
}

#sidebar .collapse,
#sidebar .collapsing,
#sidebar .pe-slide-menu,
#sidebar .pe-nav-link,
#sidebar .pe-nav-item,
#sidebar .pe-app-sidebar-menu,
#sidebar .pe-app-sidebar-menu * {
    transition: none !important;
    animation: none !important;
}

.avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    line-height: 1;
    background: rgba(6, 62, 157, 0.16) !important;
    color: #063e9d !important;
    border: 1px solid rgba(6, 62, 157, 0.32) !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

[data-bs-theme="dark"] .avatar-initial {
    background: rgba(98, 100, 167, 0.22) !important;
    color: #f3f2f1 !important;
    border-color: rgba(98, 100, 167, 0.55) !important;
}

.avatar img,
.avatar-xs img,
.avatar-sm img,
.avatar-md img,
.avatar-lg img,
.avatar-xl img,
.avatar-xxl img,
.avatar-3xl img,
.member-avatar-shell img,
.invitation-avatar-shell img,
.bookmarks-owner-shell img,
.collection-owner-avatar img,
.user-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.comments-drawer {
    width: min(420px, 92vw);
}

.comments-drawer .offcanvas-header {
    border-bottom: 1px solid var(--pe-border-color);
}

.comments-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.comment-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.comment-item.reply-item {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-replies {
    padding-left: 2.5rem;
    border-left: 2px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-replying {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(6, 62, 157, 0.08);
}

[data-bs-theme="dark"] .comment-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .comment-replies {
    border-left-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .comment-replying {
    background: rgba(98, 100, 167, 0.2);
}

[data-bs-theme="dark"] {
    --pe-primary: var(--survee-primary);
    --pe-primary-rgb: var(--survee-primary-rgb);
    --pe-primary-text-emphasis: var(--survee-primary-dark);
    --pe-primary-bg-subtle: var(--survee-primary-subtle);
    --pe-primary-border-subtle: var(--survee-primary-border);
    --pe-body-bg: #1f1f1f;
    --pe-body-bg-rgb: 31, 31, 31;
    --pe-secondary-bg: #2b2b2b;
    --pe-secondary-bg-rgb: 43, 43, 43;
    --pe-tertiary-bg: #2f2f2f;
    --pe-light: #2e2e2e;
    --pe-light-rgb: 46, 46, 46;
    --pe-border-color: rgba(255, 255, 255, 0.08);
    --pe-card-bg: #2b2b2b;
    --pe-dropdown-bg: #2b2b2b;
    --pe-app-header-bg: #2b2b2b;
    --pe-body-color: #f3f2f1;
    --pe-body-color-rgb: 243, 242, 241;
    --pe-secondary-color: #c8c6c4;
    --pe-emphasis-color: #ffffff;
    --pe-heading-color: #ffffff;
    --pe-link-color: #f3f2f1;
    --pe-link-color-rgb: 243, 242, 241;
    --pe-link-hover-color: #ffffff;
    --pe-link-hover-color-rgb: 255, 255, 255;

    --pe-app-sidebar-bg: #1f1f1f;
    --pe-app-sidebar-border-color: rgba(255, 255, 255, 0.06);
    --pe-app-sidebar-color: #f3f2f1;
    --pe-app-sidebar-caption-color: #c8c6c4;
    --pe-app-sidebar-menu-item-color: #f3f2f1;
    --pe-app-sidebar-menu-item-color-hover: #ffffff;
    --pe-app-sidebar-menu-item-color-active: #ffffff;
    --pe-sidebar-text: #f3f2f1;
    --pe-sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --pe-sidebar-active-bg: rgba(255, 255, 255, 0.14);
    --pe-sidebar-border: rgba(255, 255, 255, 0.06);

    --bs-primary: var(--survee-primary);
    --bs-primary-rgb: var(--survee-primary-rgb);
    --bs-body-bg: #1f1f1f;
    --bs-body-bg-rgb: 31, 31, 31;
    --bs-secondary-bg: #2b2b2b;
    --bs-secondary-bg-rgb: 43, 43, 43;
    --bs-tertiary-bg: #2f2f2f;
    --bs-border-color: rgba(255, 255, 255, 0.08);
    --bs-card-bg: #2b2b2b;
    --bs-dropdown-bg: #2b2b2b;
    --bs-body-color: #f3f2f1;
    --bs-body-color-rgb: 243, 242, 241;
}

/* Override template's :root[data-sidebar-color=dark] / [data-sidebar-color=indigo] variable specificity */
:root[data-bs-theme="dark"][data-sidebar-color],
:root[data-bs-theme="dark"][data-sidebar-color="dark"],
:root[data-bs-theme="dark"][data-sidebar-color="indigo"],
:root[data-bs-theme="dark"][data-sidebar-color="rosewood"],
:root[data-bs-theme="dark"][data-sidebar-color="light"] {
    --pe-app-sidebar-bg: #1f1f1f;
    --pe-sidebar-text: #f3f2f1;
    --pe-sidebar-border: rgba(255, 255, 255, 0.06);
    --pe-sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --pe-sidebar-active-bg: rgba(255, 255, 255, 0.14);
}

[data-bs-theme="dark"] .logo-light {
    display: none;
}

[data-bs-theme="dark"] .logo-dark {
    display: inline-block;
}

[data-bs-theme="light"] .logo-dark {
    display: none;
}

[data-bs-theme="light"] .logo-light {
    display: inline-block;
}

/* Dark mode overrides for Survee activity/collection pages */
[data-bs-theme="dark"] .feed-card,
[data-bs-theme="dark"] .overview-side-card,
[data-bs-theme="dark"] .bookmarks-toolbar,
[data-bs-theme="dark"] .bookmarks-table-card,
[data-bs-theme="dark"] .shared-toolbar,
[data-bs-theme="dark"] .shared-table-card,
[data-bs-theme="dark"] .collection-activity-header,
[data-bs-theme="dark"] .activity-stream-toolbar,
[data-bs-theme="dark"] .activity-stream-card,
[data-bs-theme="dark"] .directory-stat-card,
[data-bs-theme="dark"] .collection-directory-card,
[data-bs-theme="dark"] .members-toolbar,
[data-bs-theme="dark"] .members-table-card,
[data-bs-theme="dark"] .invitation-toolbar,
[data-bs-theme="dark"] .invitation-table-card,
[data-bs-theme="dark"] .activity-detail-card {
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .collection-activity-header,
[data-bs-theme="dark"] .activity-stream-toolbar,
[data-bs-theme="dark"] .bookmarks-toolbar,
[data-bs-theme="dark"] .shared-toolbar,
[data-bs-theme="dark"] .members-toolbar,
[data-bs-theme="dark"] .invitation-toolbar,
[data-bs-theme="dark"] .directory-toolbar,
[data-bs-theme="dark"] .directory-stat-card,
[data-bs-theme="dark"] .activity-detail-header {
    background: rgba(31, 31, 31, 0.92) !important;
}

[data-bs-theme="dark"] .feed-meta,
[data-bs-theme="dark"] .collection-activity-subtitle,
[data-bs-theme="dark"] .collection-activity-inline-stat,
[data-bs-theme="dark"] .activity-detail-subtitle,
[data-bs-theme="dark"] .bookmarks-meta,
[data-bs-theme="dark"] .shared-activity-meta,
[data-bs-theme="dark"] .shared-activity-desc,
[data-bs-theme="dark"] .shared-share-link,
[data-bs-theme="dark"] .invitation-email,
[data-bs-theme="dark"] .member-email,
[data-bs-theme="dark"] .collection-body-copy,
[data-bs-theme="dark"] .collection-compact-stat,
[data-bs-theme="dark"] .collection-activity-inline-stat strong,
[data-bs-theme="dark"] .collection-title,
[data-bs-theme="dark"] .shared-type-label,
[data-bs-theme="dark"] .bookmarks-type-label,
[data-bs-theme="dark"] .activity-detail-meta {
    color: rgba(243, 242, 241, 0.7) !important;
}

[data-bs-theme="dark"] .collection-activity-inline-stat strong,
[data-bs-theme="dark"] .collection-title,
[data-bs-theme="dark"] .shared-collection-cell,
[data-bs-theme="dark"] .bookmarks-collection-cell,
[data-bs-theme="dark"] .member-collection-cell,
[data-bs-theme="dark"] .invitation-collection-cell,
[data-bs-theme="dark"] .member-name,
[data-bs-theme="dark"] .invitation-name {
    color: #f3f2f1 !important;
}

[data-bs-theme="dark"] .collection-activity-chip {
    background: rgba(98, 100, 167, 0.2) !important;
    color: #cfd0f5 !important;
}

[data-bs-theme="dark"] .activity-detail-chip {
    background: rgba(98, 100, 167, 0.2) !important;
    color: #cfd0f5 !important;
}

[data-bs-theme="dark"] .activity-detail-chip.is-neutral {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(243, 242, 241, 0.8) !important;
}

[data-bs-theme="dark"] .collection-activity-chip.is-neutral,
[data-bs-theme="dark"] .collection-chip.is-neutral,
[data-bs-theme="dark"] .collection-chip,
[data-bs-theme="dark"] .invitation-chip,
[data-bs-theme="dark"] .member-chip {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(243, 242, 241, 0.8) !important;
}

[data-bs-theme="dark"] .collection-chip.is-success {
    background: rgba(12, 166, 120, 0.2) !important;
    color: #8fe6c4 !important;
}

[data-bs-theme="dark"] .bookmarks-owner-shell,
[data-bs-theme="dark"] .shared-owner-shell,
[data-bs-theme="dark"] .member-avatar-shell,
[data-bs-theme="dark"] .invitation-avatar-shell {
    background: rgba(98, 100, 167, 0.2) !important;
}

[data-bs-theme="dark"] .member-stack-item {
    background: linear-gradient(135deg, rgba(98, 100, 167, 0.25), rgba(31, 31, 31, 0.9)) !important;
    color: #d6d7f5 !important;
}

/* Auth pages (external layout) */
[data-bs-theme="dark"] .external-page {
    background:
        radial-gradient(circle at 20% 10%, rgba(98, 100, 167, 0.22), transparent 42%),
        radial-gradient(circle at 80% 90%, rgba(98, 100, 167, 0.18), transparent 36%),
        #111112 !important;
}

[data-bs-theme="dark"] .auth-card,
[data-bs-theme="dark"] .auth-card-compact {
    background: rgba(31, 31, 31, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .auth-card .bg-white {
    background: rgba(31, 31, 31, 0.96) !important;
}

[data-bs-theme="dark"] .auth-form-wrap {
    color: #f3f2f1;
}

[data-bs-theme="dark"] .auth-divider {
    color: rgba(243, 242, 241, 0.6);
}

[data-bs-theme="dark"] .auth-divider::before,
[data-bs-theme="dark"] .auth-divider::after {
    border-top-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .auth-form-wrap .text-muted,
[data-bs-theme="dark"] .auth-form-wrap .form-label,
[data-bs-theme="dark"] .auth-form-wrap .form-check-label {
    color: rgba(243, 242, 241, 0.7) !important;
}

[data-bs-theme="dark"] .auth-form-wrap .text-body,
[data-bs-theme="dark"] .auth-form-wrap h1,
[data-bs-theme="dark"] .auth-form-wrap h2,
[data-bs-theme="dark"] .auth-form-wrap h3,
[data-bs-theme="dark"] .auth-form-wrap h4,
[data-bs-theme="dark"] .auth-form-wrap h5,
[data-bs-theme="dark"] .auth-form-wrap h6,
[data-bs-theme="dark"] .auth-form-wrap p,
[data-bs-theme="dark"] .auth-form-wrap a {
    color: #f3f2f1;
}

[data-bs-theme="dark"] .auth-form-wrap .form-control {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f3f2f1;
}

[data-bs-theme="dark"] .auth-form-wrap .form-control::placeholder {
    color: rgba(243, 242, 241, 0.5);
}

[data-bs-theme="dark"] .auth-social-btn.btn-outline-light.text-dark {
    color: #f3f2f1 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-bs-theme="dark"] .auth-form-wrap .btn-outline-light.text-dark {
    color: #f3f2f1 !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

[data-bs-theme="dark"] .bookmarks-activity-thumb,
[data-bs-theme="dark"] .shared-activity-thumb,
[data-bs-theme="dark"] .activity-stream-empty-media,
[data-bs-theme="dark"] .activity-detail-empty {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(243, 242, 241, 0.6) !important;
}

[data-bs-theme="dark"] .share-link-qr {
    background: rgba(31, 31, 31, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .bookmarks-table thead th,
[data-bs-theme="dark"] .shared-table thead th,
[data-bs-theme="dark"] .members-table thead th,
[data-bs-theme="dark"] .invitation-table thead th {
    color: rgba(243, 242, 241, 0.6) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .members-table tbody + tbody tr:first-child td {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .bookmarks-sort-btn i,
[data-bs-theme="dark"] .shared-sort-btn i,
[data-bs-theme="dark"] .members-sort-btn i,
[data-bs-theme="dark"] .invitation-sort-btn i {
    color: rgba(243, 242, 241, 0.5) !important;
}

[data-bs-theme="dark"] .member-email,
[data-bs-theme="dark"] .member-coverage {
    color: rgba(243, 242, 241, 0.7) !important;
}

[data-bs-theme="dark"] .member-collection-cell {
    background: transparent !important;
    color: #f3f2f1 !important;
}

[data-bs-theme="dark"] .bookmarks-empty-state,
[data-bs-theme="dark"] .shared-empty-state,
[data-bs-theme="dark"] .members-empty-state,
[data-bs-theme="dark"] .invitation-empty-state,
[data-bs-theme="dark"] .collection-empty-state,
[data-bs-theme="dark"] .directory-empty-state {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.9), rgba(43, 43, 43, 0.9)) !important;
}

/* Accent color: minimum usage for highlights only */
.icon-dot.bg-danger,
.icon-dot .ping.bg-danger {
    background-color: var(--survee-accent) !important;
}

a:hover,
.dropdown-menu .profile-item a:hover {
    color: var(--survee-accent) !important;
}

.dropdown-menu .profile-item .profile-signout-link:hover,
.dropdown-menu .profile-item .profile-signout-link:focus {
    color: var(--survee-accent) !important;
}

.btn-primary:active,
.btn-primary:first-child:active {
    box-shadow: 0 0.125rem 0.375rem 0 rgba(var(--survee-primary-rgb), 0.3) !important;
}

.badge.bg-success-subtle.text-success {
    background-color: var(--survee-accent-subtle) !important;
    color: var(--survee-accent) !important;
}

/* Override template hardcoded default red shades */
.tree .active,
.tree .selected {
    color: var(--survee-primary) !important;
}

.swal2-container .swal2-popup .swal2-loader {
    border-color: var(--survee-primary) transparent var(--survee-primary) transparent !important;
}

.swal2-close:hover {
    color: var(--survee-primary) !important;
}

.swal2-progress-steps .swal2-progress-step,
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step,
.fc .fc-header-toolbar .fc-button-group .fc-button:hover,
.gridjs-pagination .gridjs-pages button:hover,
.gridjs-pagination .gridjs-pages button.gridjs-currentPage {
    background-color: var(--survee-primary) !important;
}

.swal2-progress-steps .swal2-progress-step-line,
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line,
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step {
    background: rgba(var(--survee-primary-rgb), 0.3) !important;
}

.pagination-next,
.pagination-prev,
.fc .fc-header-toolbar .fc-button-group .fc-button,
.fc-list-table .fc-list-event.bg-primary,
.fc-list-table .fc-list-event.bg-primary .fc-list-event-title > a,
.fc-timegrid-event-harness .fc-timegrid-event.bg-primary .fc-event-time,
.fc-timegrid-event-harness .fc-timegrid-event.bg-primary .fc-event-title {
    color: var(--survee-primary) !important;
}

.fc-daygrid-event-harness .fc-daygrid-event.bg-primary,
.fc-timegrid-event-harness .fc-timegrid-event.bg-primary,
.fc-list-table .fc-list-event.bg-primary {
    border-color: var(--survee-primary) !important;
}

.fc-daygrid-event-harness .fc-daygrid-event.bg-primary .fc-daygrid-event-dot,
.fc-list-table .fc-list-event.bg-primary .fc-list-event-dot {
    border-color: var(--survee-primary) !important;
}

input.gridjs-input:focus,
.swal2-container .swal2-popup .swal2-input:focus {
    border-color: rgba(var(--survee-primary-rgb), 0.45) !important;
}

/* Dark mode readability for sidebar and icon pseudo-elements */
[data-bs-theme="dark"] .pe-app-sidebar,
[data-bs-theme="dark"] .horizontal-sidebar {
    background-color: var(--pe-app-sidebar-bg) !important;
    border-color: var(--pe-app-sidebar-border-color) !important;
}

[data-bs-theme="dark"] .pe-menu-title,
[data-bs-theme="dark"] .pe-nav-link,
[data-bs-theme="dark"] .pe-nav-content,
[data-bs-theme="dark"] .pe-nav-icon,
[data-bs-theme="dark"] .pe-nav-link i,
[data-bs-theme="dark"] .pe-nav-link::before,
[data-bs-theme="dark"] .pe-nav-link::after {
    color: var(--pe-app-sidebar-menu-item-color) !important;
}

[data-bs-theme="dark"] .pe-nav-link:hover,
[data-bs-theme="dark"] .pe-nav-link:hover i,
[data-bs-theme="dark"] .pe-nav-link:hover::before,
[data-bs-theme="dark"] .pe-nav-link:hover::after,
[data-bs-theme="dark"] .pe-nav-link.active,
[data-bs-theme="dark"] .pe-nav-link.active i,
[data-bs-theme="dark"] .pe-nav-link[aria-expanded="true"] {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .app-header .header-menu-btn i,
[data-bs-theme="dark"] .app-header .icon-btn i,
[data-bs-theme="dark"] .app-header .user-name,
[data-bs-theme="dark"] .app-header .text-muted {
    color: #eaf2ff !important;
}

[data-bs-theme="dark"] i::before,
[data-bs-theme="dark"] [class^="ri-"]::before,
[data-bs-theme="dark"] [class*=" ri-"]::before,
[data-bs-theme="dark"] [class^="uil-"]::before,
[data-bs-theme="dark"] [class*=" uil-"]::before {
    color: inherit;
}

/* Home + footer readability in dark mode */
[data-bs-theme="dark"] .breadcrumb-title,
[data-bs-theme="dark"] .main-breadcrumb .breadcrumb,
[data-bs-theme="dark"] .main-breadcrumb .breadcrumb-item,
[data-bs-theme="dark"] .main-breadcrumb .breadcrumb-item a,
[data-bs-theme="dark"] .main-breadcrumb i,
[data-bs-theme="dark"] .app-wrapper h1,
[data-bs-theme="dark"] .app-wrapper p,
[data-bs-theme="dark"] .app-wrapper .fs-16,
[data-bs-theme="dark"] .footer,
[data-bs-theme="dark"] .footer span,
[data-bs-theme="dark"] .footer .text-sm-end {
    color: #ffffff !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .app-wrapper a,
[data-bs-theme="dark"] .footer a {
    color: #ffd4ef !important;
}

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