/* Final green/black theme normalization and detail-field visibility fixes. */

/* Hidden task fields must never be revived by older flex rules. */
#detailsPanel [data-field].detail-field-is-hidden,
#detailsPanel [data-field][hidden],
#detailsPanel .prop-row.detail-field-is-hidden,
#detailsPanel .prop-row[aria-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* Team Chat: remove legacy accent surfaces in both themes. */
body.app-nav-messages,
body.app-nav-messages .global-messages-page,
body.app-nav-messages .chat-layout,
body.app-nav-messages .chat-main {
  background: #edf6f7 !important;
  background-color: #edf6f7 !important;
}
body.app-nav-messages .chat-sidebar,
body.app-nav-messages .chat-header,
body.app-nav-messages .messages-global-topbar,
body.app-nav-messages .chat-composer,
body.app-nav-messages .messages-global-search,
body.app-nav-messages .chat-info-panel {
  background: #f6fbfc !important;
  background-color: #f6fbfc !important;
  border-color: #d9e9eb !important;
}
body.app-nav-messages .chat-item.active,
body.app-nav-messages .channel-item.active,
body.app-nav-messages .dm-item.active,
body.app-nav-messages .team-chat-item.active {
  background: #e1f2f4 !important;
  color: #05373c !important;
}

/* Dark mode: remove legacy accent and white card/button surfaces project-wide. */
html[data-theme="dark"] {
  --bg-primary: #030c0d !important;
  --bg-secondary: #061112 !important;
  --bg-card: #08181a !important;
  --surface: #08181a !important;
  --surface-2: #0a1e20 !important;
  --card-bg: #08181a !important;
  --panel-bg: #071416 !important;
  --hover-bg: #0c2527 !important;
  --accent: #0b8593 !important;
  --accent-hover: #056d79 !important;
  --border: #133135 !important;
  --border-color: #133135 !important;
  --text-primary: #f1f9f9 !important;
  --text-secondary: #c6d9db !important;
  --text-muted: #9ebdc1 !important;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .shell,
html[data-theme="dark"] .main,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .dashboard-page,
html[data-theme="dark"] .project-page {
  background: #030c0d !important;
  background-color: #030c0d !important;
  color: #f1f9f9 !important;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .floating-dropdown,
html[data-theme="dark"] .widget-menu,
html[data-theme="dark"] .dash-kpi-card,
html[data-theme="dark"] .dash-chart-card,
html[data-theme="dark"] .dash-add-widget-card,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] #detailsPanel,
html[data-theme="dark"] #customizePanel,
html[data-theme="dark"] .list-table,
html[data-theme="dark"] .table-container,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-main,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-composer,
html[data-theme="dark"] .messages-global-topbar,
html[data-theme="dark"] .messages-global-search,
html[data-theme="dark"] .message-bubble,
html[data-theme="dark"] .team-chat-card {
  background: #08181a !important;
  background-color: #08181a !important;
  border-color: #133135 !important;
  color: #f1f9f9 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] button,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .outline-btn,
html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .widget-menu-item,
html[data-theme="dark"] .widget-submenu-item,
html[data-theme="dark"] .fd-menu-item,
html[data-theme="dark"] .add-field-vis-toggle,
html[data-theme="dark"] .back-btn {
  background-color: #0a1e20 !important;
  border-color: #17393d !important;
  color: #e5f4f5 !important;
}
html[data-theme="dark"] button:hover,
html[data-theme="dark"] .btn:hover,
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .widget-menu-item:hover,
html[data-theme="dark"] .widget-submenu-item:hover,
html[data-theme="dark"] .fd-menu-item:hover,
html[data-theme="dark"] .add-field-vis-toggle:hover {
  background-color: #0e2a2d !important;
  color: #ffffff !important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .prop-select,
html[data-theme="dark"] .prop-input,
html[data-theme="dark"] .ql-editor,
html[data-theme="dark"] .rich-editor {
  background: #061112 !important;
  background-color: #061112 !important;
  border-color: #17393d !important;
  color: #f1f9f9 !important;
}
html[data-theme="dark"] .active,
html[data-theme="dark"] [aria-selected="true"],
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .chat-item.active,
html[data-theme="dark"] .channel-item.active {
  background-color: #0d292c !important;
  color: #57c3cb !important;
}
html[data-theme="dark"] [style*="#194c51"],
html[data-theme="dark"] [style*="#2e727a"],
html[data-theme="dark"] [style*="#007380"],
html[data-theme="dark"] [style*="#005b66"],
html[data-theme="dark"] [style*="#0f7682"],
html[data-theme="dark"] [style*="#007380"] {
  color: #57c3cb !important;
  border-color: #17393d !important;
  background-color: #0a1e20 !important;
}

/* Unified dark-green surfaces for Dashboard, Team Chat, Team pages and Profile.
   This file is the final theme source loaded by every page. */
html[data-theme="dark"] {
  --dnxt-page: #030c0d;
  --dnxt-shell: #061112;
  --dnxt-card: #08181a;
  --dnxt-card-2: #0a1e20;
  --dnxt-hover: #0d272a;
  --dnxt-border: #15393d;
  --dnxt-accent: #008894;
  --dnxt-accent-2: #149aa5;
  --dnxt-text: #f1f9f9;
  --dnxt-text-2: #c6d9db;
  --dnxt-muted: #99babe;
}

/* Dashboard: remove the remaining plum/purple canvas and header panel. */
html[data-theme="dark"] #dashboardView,
html[data-theme="dark"] #dashboardView.active,
html[data-theme="dark"] #dashboardView .home-dashboard,
html[data-theme="dark"] #dashboardView .dashboard-page,
html[data-theme="dark"] #dashboardView .dashboard-content,
html[data-theme="dark"] #dashboardView .dashboard-shell,
html[data-theme="dark"] #dashboardView .dashboard-main,
html[data-theme="dark"] #dashboardView .dash-container {
  background: var(--dnxt-page) !important;
  background-image: none !important;
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] #dashboardView .dashboard-welcome,
html[data-theme="dark"] #dashboardView .dash-welcome,
html[data-theme="dark"] #dashboardView .home-welcome,
html[data-theme="dark"] #dashboardView .dash-toolbar,
html[data-theme="dark"] #dashboardView .dashboard-header,
html[data-theme="dark"] #dashboardView .dashboard-filter-bar {
  background: var(--dnxt-shell) !important;
  background-image: none !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] #dashboardView .dash-kpi-card,
html[data-theme="dark"] #dashboardView .dash-chart-card,
html[data-theme="dark"] #dashboardView .dashboard-card,
html[data-theme="dark"] #dashboardView .widget-card,
html[data-theme="dark"] #dashboardView .chart-card,
html[data-theme="dark"] #dashboardView .stat-card {
  background: var(--dnxt-card) !important;
  background-image: none !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] #dashboardView .dash-kpi-card:hover,
html[data-theme="dark"] #dashboardView .dash-chart-card:hover,
html[data-theme="dark"] #dashboardView .dashboard-card:hover {
  background: var(--dnxt-card-2) !important;
  border-color: var(--dnxt-accent) !important;
}
html[data-theme="dark"] #dashboardView h1,
html[data-theme="dark"] #dashboardView h2,
html[data-theme="dark"] #dashboardView h3,
html[data-theme="dark"] #dashboardView h4,
html[data-theme="dark"] #dashboardView .dash-kpi-value,
html[data-theme="dark"] #dashboardView .dash-chart-title {
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] #dashboardView p,
html[data-theme="dark"] #dashboardView .dash-kpi-label,
html[data-theme="dark"] #dashboardView .dashboard-subtitle {
  color: var(--dnxt-text-2) !important;
}

/* Team chat: one dark-green hierarchy instead of mixed plum panels. */
html[data-theme="dark"] body.app-nav-messages,
html[data-theme="dark"] body.app-nav-messages #dashboardView,
html[data-theme="dark"] body.app-nav-messages #dashboardView.active,
html[data-theme="dark"] body.app-nav-messages .global-messages-page,
html[data-theme="dark"] body.app-nav-messages .chat-layout,
html[data-theme="dark"] body.app-nav-messages .chat-main,
html[data-theme="dark"] body.app-nav-messages .chat-feed {
  background: var(--dnxt-page) !important;
  background-image: none !important;
}
html[data-theme="dark"] body.app-nav-messages .chat-sidebar {
  background: var(--dnxt-shell) !important;
  border-color: var(--dnxt-border) !important;
}
html[data-theme="dark"] body.app-nav-messages .messages-global-topbar,
html[data-theme="dark"] body.app-nav-messages .chat-header,
html[data-theme="dark"] body.app-nav-messages .chat-input-bar,
html[data-theme="dark"] body.app-nav-messages .chat-composer,
html[data-theme="dark"] body.app-nav-messages .chat-info-panel {
  background: var(--dnxt-card) !important;
  background-image: none !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="dark"] body.app-nav-messages .chat-item,
html[data-theme="dark"] body.app-nav-messages .channel-item,
html[data-theme="dark"] body.app-nav-messages .dm-item,
html[data-theme="dark"] body.app-nav-messages .team-chat-item {
  color: var(--dnxt-text-2) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] body.app-nav-messages .chat-item:hover,
html[data-theme="dark"] body.app-nav-messages .channel-item:hover,
html[data-theme="dark"] body.app-nav-messages .dm-item:hover,
html[data-theme="dark"] body.app-nav-messages .team-chat-item:hover {
  background: var(--dnxt-hover) !important;
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] body.app-nav-messages .chat-item.active,
html[data-theme="dark"] body.app-nav-messages .channel-item.active,
html[data-theme="dark"] body.app-nav-messages .dm-item.active,
html[data-theme="dark"] body.app-nav-messages .team-chat-item.active {
  background: #083c42 !important;
  color: #ffffff !important;
  border-left-color: var(--dnxt-accent-2) !important;
}
html[data-theme="dark"] body.app-nav-messages .message-bubble,
html[data-theme="dark"] body.app-nav-messages .chat-message-bubble {
  background: var(--dnxt-card-2) !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] body.app-nav-messages .chat-message.own .message-bubble,
html[data-theme="dark"] body.app-nav-messages .chat-message.own .chat-message-bubble,
html[data-theme="dark"] body.app-nav-messages .message-row.own .message-bubble {
  background: #07535c !important;
  color: #ffffff !important;
}
html[data-theme="dark"] body.app-nav-messages .chat-editor,
html[data-theme="dark"] body.app-nav-messages .chat-composer textarea,
html[data-theme="dark"] body.app-nav-messages .chat-composer input,
html[data-theme="dark"] body.app-nav-messages .messages-global-search {
  background: var(--dnxt-shell) !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
}

/* Team pages: correct contrast and align cards, rows and controls. */
html[data-theme="dark"] .team-page,
html[data-theme="dark"] .tm-page,
html[data-theme="dark"] .tm-page-content,
html[data-theme="dark"] .team-overview-page,
html[data-theme="dark"] .team-members-page {
  background: var(--dnxt-page) !important;
  background-image: none !important;
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] .team-page-header,
html[data-theme="dark"] .tm-page-section-header,
html[data-theme="dark"] .tm-manage-header,
html[data-theme="dark"] .team-tabs,
html[data-theme="dark"] .team-page-tabs {
  background: var(--dnxt-shell) !important;
  border-color: var(--dnxt-border) !important;
}
html[data-theme="dark"] .tm-page-sidebar,
html[data-theme="dark"] .tm-page-stat-card,
html[data-theme="dark"] .tm-page-member-card,
html[data-theme="dark"] .tm-page-access-card,
html[data-theme="dark"] .tm-page-access-matrix,
html[data-theme="dark"] .tm-page-security-stat,
html[data-theme="dark"] .tm-page-security-section,
html[data-theme="dark"] .tm-team-card,
html[data-theme="dark"] .tm-stat-mini-card,
html[data-theme="dark"] .tm-overview-desc-card,
html[data-theme="dark"] .tm-recent-activity,
html[data-theme="dark"] .team-member-row,
html[data-theme="dark"] .members-list {
  background: var(--dnxt-card) !important;
  background-image: none !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .tm-page-member-card:hover,
html[data-theme="dark"] .tm-page-access-card:hover,
html[data-theme="dark"] .tm-team-card:hover,
html[data-theme="dark"] .team-member-row:hover {
  background: var(--dnxt-card-2) !important;
  border-color: var(--dnxt-accent) !important;
}
html[data-theme="dark"] .team-page h1,
html[data-theme="dark"] .team-page h2,
html[data-theme="dark"] .team-page h3,
html[data-theme="dark"] .team-page h4,
html[data-theme="dark"] .tm-page h1,
html[data-theme="dark"] .tm-page h2,
html[data-theme="dark"] .tm-page h3,
html[data-theme="dark"] .tm-page h4,
html[data-theme="dark"] .tm-page-member-name {
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] .tm-page-member-email,
html[data-theme="dark"] .tm-page-member-meta,
html[data-theme="dark"] .tm-page-section-header p,
html[data-theme="dark"] .team-member-row small {
  color: var(--dnxt-muted) !important;
}
html[data-theme="dark"] .team-tabs .active,
html[data-theme="dark"] .team-page-tabs .active,
html[data-theme="dark"] .tm-page-nav-item.active {
  background: transparent !important;
  color: var(--dnxt-accent-2) !important;
  border-bottom-color: var(--dnxt-accent-2) !important;
}

/* Profile: remove blue/plum hero and grey mismatched cards. */
html[data-theme="dark"] body[data-page="profile"],
html[data-theme="dark"] body[data-page="profile"] .profile-page,
html[data-theme="dark"] body[data-page="profile"] .profile-main,
html[data-theme="dark"] body[data-page="profile"] .profile-content {
  background: var(--dnxt-page) !important;
  background-image: none !important;
  color: var(--dnxt-text) !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-identity-strip,
html[data-theme="dark"] body[data-page="profile"] .profile-studio-hero,
html[data-theme="dark"] body[data-page="profile"] .profile-hero,
html[data-theme="dark"] body[data-page="profile"] .profile-header-card {
  background: linear-gradient(135deg, #08181a 0%, #0b292d 100%) !important;
  border: 1px solid var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-stat-card,
html[data-theme="dark"] body[data-page="profile"] .profile-card,
html[data-theme="dark"] body[data-page="profile"] .profile-section-card,
html[data-theme="dark"] body[data-page="profile"] .profile-about-card,
html[data-theme="dark"] body[data-page="profile"] .profile-team-card,
html[data-theme="dark"] body[data-page="profile"] .profile-category-card,
html[data-theme="dark"] body[data-page="profile"] .profile-activity-card {
  background: var(--dnxt-card) !important;
  background-image: none !important;
  border-color: var(--dnxt-border) !important;
  color: var(--dnxt-text) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-stat-card:hover,
html[data-theme="dark"] body[data-page="profile"] .profile-card:hover {
  background: var(--dnxt-card-2) !important;
  border-color: var(--dnxt-accent) !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-stat-label,
html[data-theme="dark"] body[data-page="profile"] .profile-job-title,
html[data-theme="dark"] body[data-page="profile"] .profile-meta-item,
html[data-theme="dark"] body[data-page="profile"] .profile-card-subtitle,
html[data-theme="dark"] body[data-page="profile"] .profile-team-role,
html[data-theme="dark"] body[data-page="profile"] .activity-time {
  color: var(--dnxt-muted) !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-name,
html[data-theme="dark"] body[data-page="profile"] .profile-stat-value,
html[data-theme="dark"] body[data-page="profile"] .profile-card-title,
html[data-theme="dark"] body[data-page="profile"] h1,
html[data-theme="dark"] body[data-page="profile"] h2,
html[data-theme="dark"] body[data-page="profile"] h3,
html[data-theme="dark"] body[data-page="profile"] h4 {
  color: var(--dnxt-text) !important;
}

/* 2026-07-13 v6: final visibility and green-surface corrections. */
html[data-theme="dark"] #detailsPanel .details-header-bar {
  background: #08181a !important;
  background-color: #08181a !important;
  border-bottom-color: #15393d !important;
  color: #f1f9f9 !important;
}
html[data-theme="dark"] #detailsPanel .details-header-left,
html[data-theme="dark"] #detailsPanel .details-header-right,
html[data-theme="dark"] #detailsPanel .mark-complete-text {
  color: #e5f4f5 !important;
}
html[data-theme="dark"] #detailsPanel .details-header-bar .circle-btn,
html[data-theme="dark"] #detailsPanel .details-header-bar .status-check {
  background: #0c2527 !important;
  border-color: #1f4d52 !important;
  color: #e5f4f5 !important;
}
html[data-theme="dark"] #detailsPanel .details-header-bar .circle-btn i,
html[data-theme="dark"] #detailsPanel .details-header-bar .status-check i {
  color: #e5f4f5 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] #detailsPanel .details-header-bar .circle-btn:hover,
html[data-theme="dark"] #detailsPanel .details-header-bar .status-check:hover {
  background: #10393d !important;
  border-color: #149aa5 !important;
  color: #ffffff !important;
}

/* Current-list toolbar: keep controls dark and icons readable. */
html[data-theme="dark"] #projectImportBtn,
html[data-theme="dark"] #projectExportBtn,
html[data-theme="dark"] #importTasksBtn,
html[data-theme="dark"] #exportTasksBtn,
html[data-theme="dark"] #filterBtn,
html[data-theme="dark"] #sortBtn,
html[data-theme="dark"] #groupBtn,
html[data-theme="dark"] #columnsBtn,
html[data-theme="dark"] .list-toolbar .chip-btn,
html[data-theme="dark"] .list-toolbar .outline-btn,
html[data-theme="dark"] .project-list-actions .chip-btn,
html[data-theme="dark"] .project-list-actions .outline-btn,
html[data-theme="dark"] .current-list-toolbar button,
html[data-theme="dark"] .list-actions button {
  background: #0a1e20 !important;
  border-color: #1f4d52 !important;
  color: #ecf7f9 !important;
}
html[data-theme="dark"] .list-toolbar button i,
html[data-theme="dark"] .project-list-actions button i,
html[data-theme="dark"] .current-list-toolbar button i,
html[data-theme="dark"] .list-actions button i,
html[data-theme="dark"] #projectImportBtn i,
html[data-theme="dark"] #projectExportBtn i,
html[data-theme="dark"] #filterBtn i,
html[data-theme="dark"] #sortBtn i,
html[data-theme="dark"] #groupBtn i,
html[data-theme="dark"] #columnsBtn i {
  color: #a3ebf3 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .list-toolbar button:hover,
html[data-theme="dark"] .project-list-actions button:hover,
html[data-theme="dark"] .current-list-toolbar button:hover,
html[data-theme="dark"] .list-actions button:hover {
  background: #0e2a2d !important;
  border-color: #149aa5 !important;
  color: #ffffff !important;
}

/* Profile/settings action icons and cards must remain visible. */
html[data-theme="dark"] body[data-page="profile"] .circle-btn,
html[data-theme="dark"] body[data-page="profile"] .profile-action-btn,
html[data-theme="dark"] .stg-page .circle-btn,
html[data-theme="dark"] .settings-page .circle-btn {
  background: #0c2527 !important;
  border-color: #1f4d52 !important;
  color: #e5f4f5 !important;
}
html[data-theme="dark"] body[data-page="profile"] .circle-btn i,
html[data-theme="dark"] body[data-page="profile"] .profile-action-btn i,
html[data-theme="dark"] .stg-page button i,
html[data-theme="dark"] .settings-page button i {
  color: #a3ebf3 !important;
  opacity: 1 !important;
}

/* Sidebar Manage Team: one consistent high-contrast green treatment everywhere. */
.sidebar-footer #manageTeamBtn,
.sidebar #manageTeamBtn,
body[data-page="profile"] #manageTeamBtn {
  background: linear-gradient(135deg, #05525b 0%, #044047 100%) !important;
  border: 1px solid #149aa5 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .20) !important;
}
.sidebar-footer #manageTeamBtn i,
.sidebar-footer #manageTeamBtn span,
.sidebar #manageTeamBtn i,
.sidebar #manageTeamBtn span,
body[data-page="profile"] #manageTeamBtn i,
body[data-page="profile"] #manageTeamBtn span {
  color: #ffffff !important;
  opacity: 1 !important;
}
.sidebar-footer #manageTeamBtn:hover,
.sidebar #manageTeamBtn:hover,
body[data-page="profile"] #manageTeamBtn:hover,
body.app-nav-manage-team .sidebar-footer #manageTeamBtn {
  background: linear-gradient(135deg, #008894 0%, #055962 100%) !important;
  border-color: #a3ebf3 !important;
  color: #ffffff !important;
}

/* 2026-07-13 v7: sidebar category menu and hover contrast fixes. */
html[data-theme="dark"] .sidebar .project-item {
  color: #c7d9db !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}
html[data-theme="dark"] .sidebar .project-item .project-name-text,
html[data-theme="dark"] .sidebar .project-item .project-more-btn,
html[data-theme="dark"] .sidebar .project-item .project-more-btn i,
html[data-theme="dark"] .sidebar .project-item .project-default-icon,
html[data-theme="dark"] .sidebar .project-item .category-project-icon {
  color: inherit !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .sidebar .project-item:hover {
  background: #0b292d !important;
  border-color: #174b50 !important;
  color: #f4fdfe !important;
}
html[data-theme="dark"] .sidebar .project-item.active {
  background: #044047 !important;
  border-color: #149aa5 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .sidebar .project-item:hover .project-name-text,
html[data-theme="dark"] .sidebar .project-item:hover .project-more-btn,
html[data-theme="dark"] .sidebar .project-item:hover .project-more-btn i,
html[data-theme="dark"] .sidebar .project-item.active .project-name-text,
html[data-theme="dark"] .sidebar .project-item.active .project-more-btn,
html[data-theme="dark"] .sidebar .project-item.active .project-more-btn i {
  color: #ffffff !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .sidebar .project-item .project-more-btn:hover {
  background: #11444a !important;
  color: #ffffff !important;
}

/* Keep every category context-menu action, including Info, visible. */
html[data-theme="dark"] #projectContextMenu {
  background: #08191b !important;
  border: 1px solid #1b4c51 !important;
  color: #ecf7f9 !important;
}
html[data-theme="dark"] #projectContextMenu .context-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #e1f0f1 !important;
  background: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-theme="dark"] #projectContextMenu .context-menu-item i {
  color: #a3ebf3 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] #projectContextMenu .context-menu-item:hover {
  background: #0d3338 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] #projectContextMenu .context-menu-item:hover i {
  color: #ffffff !important;
}
html[data-theme="dark"] #projectContextMenu .context-menu-item.danger {
  color: #ff9b9b !important;
}
html[data-theme="dark"] #projectContextMenu .context-menu-item.danger:hover {
  background: #582626 !important;
  color: #ffffff !important;
}

/* v9 final visibility fixes: exact Profile hero, task drawer header, and current-list toolbar. */
.mpp-simple-panel .mpp-header.simple-profile-header,
.mpp-panel .mpp-header.simple-profile-header,
#memberProfilePanel .mpp-header.simple-profile-header,
#memberProfilePanel .simple-profile-header {
  background: linear-gradient(135deg, #007380 0%, #005b66 50%, #007380 100%) !important;
  background-color: #005b66 !important;
  border-bottom: 1px solid rgba(185,239,245,.28) !important;
  color: #ffffff !important;
}
.mpp-simple-panel .mpp-header.simple-profile-header::before,
.mpp-panel .mpp-header.simple-profile-header::before,
#memberProfilePanel .simple-profile-header::before {
  background: linear-gradient(115deg, rgba(255,255,255,.10), transparent 46%) !important;
}
.mpp-simple-panel .mpp-header.simple-profile-header::after,
.mpp-panel .mpp-header.simple-profile-header::after,
#memberProfilePanel .simple-profile-header::after {
  background: radial-gradient(circle at 82% -15%, rgba(255,255,255,.15) 0 70px, transparent 72px), radial-gradient(circle at -8% 96%, rgba(255,255,255,.10) 0 55px, transparent 57px) !important;
}
.mpp-simple-panel .simple-profile-header .mpp-panel-title,
.mpp-simple-panel .simple-profile-header .mpp-name,
.mpp-simple-panel .simple-profile-header .mpp-email,
.mpp-simple-panel .simple-profile-header .mpp-presence-line,
#memberProfilePanel .simple-profile-header .mpp-panel-title,
#memberProfilePanel .simple-profile-header .mpp-name,
#memberProfilePanel .simple-profile-header .mpp-email {
  color: #ffffff !important;
}
.mpp-simple-panel .simple-profile-header .mpp-presence-line,
#memberProfilePanel .simple-profile-header .mpp-presence-line {
  background: rgba(0,51,56,.62) !important;
  border-color: rgba(218,248,251,.30) !important;
}
.mpp-simple-panel .simple-profile-header .mpp-close,
#memberProfilePanel .simple-profile-header .mpp-close {
  background: rgba(0,51,56,.72) !important;
  border: 1px solid rgba(218,248,251,.32) !important;
  color: #ffffff !important;
}

#detailsPanel > .details-header-bar,
.details-drawer > .details-header-bar,
aside.details-drawer .details-header-bar {
  background: #041b1d !important;
  background-color: #041b1d !important;
  border-bottom: 1px solid #143d42 !important;
  box-shadow: none !important;
  color: #f0fcfd !important;
}
#detailsPanel > .details-header-bar::before,
#detailsPanel > .details-header-bar::after,
.details-drawer > .details-header-bar::before,
.details-drawer > .details-header-bar::after {
  background: transparent !important;
  content: none !important;
}
#detailsPanel .details-header-left,
#detailsPanel .details-header-right,
#detailsPanel .mark-complete-text,
#detailsPanel .details-header-bar i,
.details-drawer .details-header-left,
.details-drawer .details-header-right,
.details-drawer .mark-complete-text,
.details-drawer .details-header-bar i {
  color: #daf8fb !important;
  opacity: 1 !important;
}

/* Actual current-list button IDs used by index.html. */
#importBtn, #exportBtn, #filterBtn, #sortBtn, #groupBtn, #projectListColumnsBtn,
.project-list-actions .chip-btn,
.list-toolbar .chip-btn,
.toolbar-row .chip-btn {
  background: #0a1e20 !important;
  border: 1px solid #1f4d52 !important;
  color: #f0fcfd !important;
  opacity: 1 !important;
}
#importBtn i, #exportBtn i, #filterBtn i, #sortBtn i, #groupBtn i, #projectListColumnsBtn i,
.project-list-actions .chip-btn i,
.list-toolbar .chip-btn i,
.toolbar-row .chip-btn i {
  color: #b9eff5 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}
#importBtn:hover, #exportBtn:hover, #filterBtn:hover, #sortBtn:hover, #groupBtn:hover, #projectListColumnsBtn:hover {
  background: #0d4c53 !important;
  border-color: #8be2ec !important;
  color: #ffffff !important;
}
/* cache-bust v9 */

/* v10: profile and settings top action icons - high contrast in dark theme */
html[data-theme="dark"] body[data-page="profile"] .profile-identity-strip .profile-studio-actions button,
html[data-theme="dark"] body[data-page="profile"] .profile-studio-actions .profile-edit-btn,
html[data-theme="dark"] body[data-page="profile"] .profile-studio-actions .profile-change-pw-btn,
html[data-theme="dark"] body[data-page="profile"] #profileEditBtn,
html[data-theme="dark"] body[data-page="profile"] #profileChangePwBtn,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions > button,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .circle-btn,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .theme-toggle,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .notification-btn,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-back {
  background: #0a292c !important;
  border: 1px solid #149aa5 !important;
  color: #effcfe !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 1px rgba(163,235,243,.08) inset !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-identity-strip .profile-studio-actions button i,
html[data-theme="dark"] body[data-page="profile"] .profile-studio-actions .profile-edit-btn i,
html[data-theme="dark"] body[data-page="profile"] .profile-studio-actions .profile-change-pw-btn i,
html[data-theme="dark"] body[data-page="profile"] #profileEditBtn i,
html[data-theme="dark"] body[data-page="profile"] #profileChangePwBtn i,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions button i,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .theme-icon-light,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .theme-icon-dark,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-back i {
  color: #b2f0f7 !important;
  fill: #b2f0f7 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-identity-strip .profile-studio-actions button:hover,
html[data-theme="dark"] body[data-page="profile"] .profile-studio-actions button:hover,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions > button:hover,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .circle-btn:hover,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .theme-toggle:hover,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions .notification-btn:hover,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-back:hover {
  background: #0e3f45 !important;
  border-color: #a3ebf3 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] body[data-page="profile"] .profile-identity-strip .profile-studio-actions button:hover i,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-actions button:hover i,
html[data-theme="dark"] body[data-page="settings"] .settings-topbar-back:hover i {
  color: #ffffff !important;
}

/* v11: Current List Add task row visibility in dark theme */
html[data-theme="dark"] #listView .add-task-row,
html[data-theme="dark"] #taskSections .add-task-row,
html[data-theme="dark"] .project-list-view .add-task-row,
html[data-theme="dark"] .section-group .add-task-row,
html[data-theme="dark"] .add-task-row[data-add-task-section] {
  color: #c7f3f8 !important;
  background: #071f22 !important;
  border-color: #143d42 !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-weight: 700 !important;
}
html[data-theme="dark"] #listView .add-task-row i,
html[data-theme="dark"] #taskSections .add-task-row i,
html[data-theme="dark"] .project-list-view .add-task-row i,
html[data-theme="dark"] .section-group .add-task-row i,
html[data-theme="dark"] .add-task-row[data-add-task-section] i,
html[data-theme="dark"] #listView .add-task-row span,
html[data-theme="dark"] #taskSections .add-task-row span {
  color: #a3ebf3 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-theme="dark"] #listView .add-task-row:hover,
html[data-theme="dark"] #taskSections .add-task-row:hover,
html[data-theme="dark"] .project-list-view .add-task-row:hover,
html[data-theme="dark"] .section-group .add-task-row:hover,
html[data-theme="dark"] .add-task-row[data-add-task-section]:hover {
  color: #ffffff !important;
  background: #0c3e44 !important;
  border-color: #7edce6 !important;
}
html[data-theme="dark"] #listView .add-task-row:hover i,
html[data-theme="dark"] #taskSections .add-task-row:hover i,
html[data-theme="dark"] .add-task-row[data-add-task-section]:hover i {
  color: #ffffff !important;
}
/* cache-bust v11 */

/* v12: Team Chat active row uses the same visual treatment as hover. */
body.app-nav-messages .chat-sidebar .chat-ch-btn:hover,
body.app-nav-messages .chat-sidebar .chat-ch-btn.active {
  background: var(--chat-hover) !important;
  background-color: var(--chat-hover) !important;
  color: var(--chat-text) !important;
  border-left-color: transparent !important;
}
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-ch-name,
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-ch-hash,
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-muted-icon {
  color: var(--chat-text) !important;
}
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-fav-star,
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-fav-star.is-favorited {
  color: var(--chat-text-muted) !important;
}
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-fav-star:hover {
  color: #b7791f !important;
  background: var(--chat-hover) !important;
}
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-dm-status {
  border-color: var(--chat-sidebar-bg) !important;
}
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-dm-role-badge.admin,
body.app-nav-messages .chat-sidebar .chat-ch-btn.active .chat-dm-role-badge.manager {
  background: var(--chat-accent-wash) !important;
  color: var(--chat-text) !important;
}
/* cache-bust v12 */
