:root,
html[data-theme="light"],
body[data-theme="light"] {
  --ecd-blue: #2f6fb5;
  --ecd-blue-strong: #245f9f;
  --ecd-red: #c32730;
  --ecd-green: #1f6b34;
  --ecd-yellow: #f1e61b;

  --ecd-bg: #f5f9ff;
  --ecd-surface: #ffffff;
  --ecd-surface-soft: #f2f8ff;
  --ecd-text: #173b63;
  --ecd-muted: #4f6e8e;
  --ecd-border: rgba(47, 111, 181, 0.24);
  --ecd-shadow-sm: 0 6px 14px rgba(22, 71, 125, 0.1);
  --ecd-shadow-md: 0 10px 24px rgba(22, 71, 125, 0.14);
  --ecd-focus: 0 0 0 3px rgba(31, 107, 52, 0.22);
}

html[data-theme="dark"],
body[data-theme="dark"],
.dark-theme,
body.dark,
body[data-theme-mode="dark"] {
  --ecd-bg: #11263b;
  --ecd-surface: #1a334d;
  --ecd-surface-soft: #223e5d;
  --ecd-text: #eaf4ff;
  --ecd-muted: #bcd2e7;
  --ecd-border: rgba(122, 175, 232, 0.28);
  --ecd-shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.24);
  --ecd-shadow-md: 0 12px 28px rgba(0, 0, 0, 0.34);
  --ecd-focus: 0 0 0 3px rgba(79, 197, 115, 0.35);
}

html.etnp-site-theme,
body.etnp-site-theme {
  background: var(--ecd-bg) !important;
  color: var(--ecd-text) !important;
  font-family: "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.etnp-site-theme * {
  box-sizing: border-box;
}

.etnp-site-theme :focus-visible {
  outline: none !important;
  box-shadow: var(--ecd-focus) !important;
  border-radius: 6px;
}

/* Detail view layout replica (Performance Entry style at site level) */
.etnp-site-theme .form-page,
.etnp-site-theme .layout-main-section,
.etnp-site-theme .page-body {
  background: linear-gradient(180deg, var(--ecd-bg) 0%, #edf6ff 100%) !important;
}

.etnp-site-theme .page-head {
  background: linear-gradient(90deg, var(--ecd-blue) 0%, var(--ecd-green) 52%, var(--ecd-red) 100%) !important;
  border-bottom: 4px solid var(--ecd-yellow) !important;
}

.etnp-site-theme .page-head .title,
.etnp-site-theme .page-head .title-text,
.etnp-site-theme .page-head h1,
.etnp-site-theme .page-head h2,
.etnp-site-theme .page-head h3,
.etnp-site-theme .page-head h5,
.etnp-site-theme .page-title,
.etnp-site-theme .page-title .title-text,
.etnp-site-theme .ellipsis.title-text,
.etnp-site-theme .breadcrumb-container li,
.etnp-site-theme .breadcrumb-container a,
.etnp-site-theme .breadcrumb-container .title-text,
.etnp-site-theme .breadcrumb-container .title-text-form {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.etnp-site-theme .form-layout,
.etnp-site-theme .frappe-control {
  background: var(--ecd-surface) !important;
  border-left: 4px solid var(--ecd-blue) !important;
}

.etnp-site-theme .section-head {
  color: var(--ecd-text) !important;
  font-weight: 700 !important;
  border-left: 4px solid var(--ecd-blue) !important;
  padding: 8px 12px !important;
  margin-bottom: 8px !important;
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.1), transparent) !important;
}

.etnp-site-theme .control-label {
  color: var(--ecd-text) !important;
  font-weight: 600 !important;
}

.etnp-site-theme input[type="text"],
.etnp-site-theme input[type="email"],
.etnp-site-theme input[type="password"],
.etnp-site-theme input[type="number"],
.etnp-site-theme input[type="date"],
.etnp-site-theme textarea,
.etnp-site-theme select,
.etnp-site-theme .form-control,
.etnp-site-theme .awesomplete input,
.etnp-site-theme .input-with-feedback input,
.etnp-site-theme .ql-editor {
  background: var(--ecd-surface) !important;
  color: var(--ecd-text) !important;
  border: 2px solid rgba(47, 111, 181, 0.6) !important;
  border-radius: 8px !important;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.etnp-site-theme input:focus,
.etnp-site-theme textarea:focus,
.etnp-site-theme select:focus,
.etnp-site-theme .form-control:focus,
.etnp-site-theme .ql-editor:focus {
  border-color: var(--ecd-green) !important;
  box-shadow: var(--ecd-focus) !important;
}

.etnp-site-theme .btn.btn-primary,
.etnp-site-theme .btn-primary {
  background: linear-gradient(135deg, var(--ecd-blue) 0%, var(--ecd-green) 100%) !important;
  border: 1px solid var(--ecd-blue-strong) !important;
  color: #ffffff !important;
  box-shadow: var(--ecd-shadow-sm) !important;
}

.etnp-site-theme .btn.btn-default,
.etnp-site-theme .btn-default,
.etnp-site-theme .page-actions .btn,
.etnp-site-theme .custom-actions .btn,
.etnp-site-theme .actions-btn-group .btn,
.etnp-site-theme .menu-btn-group .btn {
  border-radius: 999px !important;
  border: 1px solid var(--ecd-border) !important;
  background: linear-gradient(135deg, #ffffff 0%, var(--ecd-surface-soft) 100%) !important;
  color: var(--ecd-text) !important;
  font-weight: 700 !important;
  box-shadow: 0 5px 12px rgba(47, 111, 181, 0.1) !important;
}

.etnp-site-theme .btn.btn-default:hover,
.etnp-site-theme .btn-default:hover,
.etnp-site-theme .page-actions .btn:hover,
.etnp-site-theme .custom-actions .btn:hover,
.etnp-site-theme .actions-btn-group .btn:hover,
.etnp-site-theme .menu-btn-group .btn:hover {
  border-color: var(--ecd-green) !important;
  transform: translateY(-1px);
}

.etnp-site-theme .grid-heading-row {
  background: linear-gradient(90deg, #eaf2fb 0%, #dce9f8 100%) !important;
  color: #173b63 !important;
  border-bottom: 1px solid rgba(47, 111, 181, 0.35) !important;
}

.etnp-site-theme .grid-heading-row .grid-static-col,
.etnp-site-theme .grid-heading-row .col,
.etnp-site-theme .grid-heading-row .ellipsis,
.etnp-site-theme .grid-heading-row .text-muted,
.etnp-site-theme .grid-heading-row .small,
.etnp-site-theme .grid-heading-row label,
.etnp-site-theme .grid-heading-row a,
.etnp-site-theme .grid-heading-row span,
.etnp-site-theme .grid-heading-row i,
.etnp-site-theme .grid-heading-row svg {
  color: #173b63 !important;
  fill: #173b63 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

.etnp-site-theme .grid-footer {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.14), rgba(31, 107, 52, 0.1), rgba(195, 39, 48, 0.08)) !important;
  color: var(--ecd-text) !important;
  border-top: 1px solid var(--ecd-border) !important;
}

/* Fallback for forms rendered before theme class is attached */
body .form-grid .grid-heading-row,
body .grid-body .grid-heading-row {
  background: linear-gradient(90deg, #eaf2fb 0%, #dce9f8 100%) !important;
  color: #173b63 !important;
  border-bottom: 1px solid rgba(47, 111, 181, 0.35) !important;
}

body .form-grid .grid-heading-row .grid-static-col,
body .form-grid .grid-heading-row .col,
body .form-grid .grid-heading-row .ellipsis,
body .form-grid .grid-heading-row .text-muted,
body .form-grid .grid-heading-row .small,
body .form-grid .grid-heading-row label,
body .form-grid .grid-heading-row a,
body .form-grid .grid-heading-row span,
body .form-grid .grid-heading-row i,
body .form-grid .grid-heading-row svg,
body .grid-body .grid-heading-row .grid-static-col,
body .grid-body .grid-heading-row .col,
body .grid-body .grid-heading-row .ellipsis,
body .grid-body .grid-heading-row .text-muted,
body .grid-body .grid-heading-row .small,
body .grid-body .grid-heading-row label,
body .grid-body .grid-heading-row a,
body .grid-body .grid-heading-row span,
body .grid-body .grid-heading-row i,
body .grid-body .grid-heading-row svg {
  color: #173b63 !important;
  fill: #173b63 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* Left + right sidebars */
.etnp-site-theme .layout-side-section,
.etnp-site-theme .form-sidebar,
.etnp-site-theme .form-sidebar-items,
.etnp-site-theme .list-sidebar,
.etnp-site-theme .standard-sidebar,
.etnp-site-theme .sidebar-menu,
.etnp-site-theme .form-dashboard-section,
.etnp-site-theme .sidebar-toggle-placeholder {
  background: linear-gradient(145deg, var(--ecd-surface) 0%, var(--ecd-surface-soft) 100%) !important;
  border: 2px solid var(--ecd-blue) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: var(--ecd-shadow-md) !important;
}

.etnp-site-theme .layout-side-section .standard-sidebar-item,
.etnp-site-theme .layout-side-section .sidebar-item,
.etnp-site-theme .form-sidebar .sidebar-section,
.etnp-site-theme .form-sidebar .sidebar-stat-item,
.etnp-site-theme .form-sidebar .form-tags,
.etnp-site-theme .form-sidebar .tag-area,
.etnp-site-theme .list-sidebar .sidebar-section,
.etnp-site-theme .list-sidebar .list-filters {
  background: linear-gradient(135deg, var(--ecd-surface-soft) 0%, var(--ecd-surface) 100%) !important;
  border-left: 4px solid var(--ecd-green) !important;
  border-radius: 8px !important;
  padding: 10px !important;
  margin-bottom: 8px !important;
}

.etnp-site-theme .form-sidebar-label,
.etnp-site-theme .sidebar-stat-item .stat-label,
.etnp-site-theme .layout-side-section .sidebar-item-label,
.etnp-site-theme .layout-side-section .standard-sidebar-label,
.etnp-site-theme .text-muted {
  color: var(--ecd-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.etnp-site-theme .form-sidebar .value,
.etnp-site-theme .sidebar-stat-item .stat-value,
.etnp-site-theme .layout-side-section .sidebar-item-control,
.etnp-site-theme .layout-side-section .stat-value,
.etnp-site-theme .sidebar-stat-value {
  color: var(--ecd-blue) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* Comments + timeline */
.etnp-site-theme .comment-box,
.etnp-site-theme .new-timeline,
.etnp-site-theme .timeline,
.etnp-site-theme .form-footer {
  background: linear-gradient(145deg, var(--ecd-surface) 0%, var(--ecd-surface-soft) 100%) !important;
  border: 2px solid var(--ecd-blue) !important;
  border-radius: 12px !important;
  padding: 12px !important;
}

.etnp-site-theme .comment-input-wrapper,
.etnp-site-theme .timeline-content,
.etnp-site-theme .timeline-message-box {
  background: var(--ecd-surface) !important;
  border: 1px solid var(--ecd-border) !important;
  border-radius: 8px !important;
}

.etnp-site-theme .timeline-dot {
  background: linear-gradient(135deg, var(--ecd-blue), var(--ecd-green)) !important;
  border: 3px solid var(--ecd-yellow) !important;
  box-shadow: 0 0 0 4px rgba(241, 230, 27, 0.35) !important;
}

/* Dashboard links and badges */
.etnp-site-theme .document-link {
  border: 2px solid rgba(47, 111, 181, 0.35) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(47, 111, 181, 0.1), rgba(31, 107, 52, 0.08)) !important;
}

.etnp-site-theme .document-link .open-notification,
.etnp-site-theme .document-link .count,
.etnp-site-theme .badge {
  background: linear-gradient(135deg, var(--ecd-blue), var(--ecd-green)) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
}

/* Indicator-pill: default-like state colors, but readable on the themed page head */
.page-head .indicator-pill,
.title-area .indicator-pill {
  background: rgba(255, 255, 255, 0.94) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18) !important;
}

.page-head .indicator-pill span,
.title-area .indicator-pill span {
  color: inherit !important;
  font-weight: inherit !important;
}

.page-head .indicator-pill.orange,
.title-area .indicator-pill.orange {
  color: #b54708 !important;
}

.page-head .indicator-pill.green,
.title-area .indicator-pill.green {
  color: #027a48 !important;
}

.page-head .indicator-pill.red,
.title-area .indicator-pill.red {
  color: #b42318 !important;
}

.page-head .indicator-pill.blue,
.title-area .indicator-pill.blue {
  color: #175cd3 !important;
}

.page-head .indicator-pill.gray,
.page-head .indicator-pill.grey,
.title-area .indicator-pill.gray,
.title-area .indicator-pill.grey {
  color: #475467 !important;
}

/* List views */
.etnp-site-theme .frappe-list .list-row-head,
.etnp-site-theme .list-row-head {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.12), rgba(31, 107, 52, 0.1)) !important;
  border: 1px solid var(--ecd-border) !important;
  border-radius: 10px !important;
}

.etnp-site-theme .frappe-list .list-row-container,
.etnp-site-theme .list-row-container {
  background: var(--ecd-surface) !important;
  border: 1px solid rgba(47, 111, 181, 0.2) !important;
  border-radius: 9px !important;
  box-shadow: 0 6px 16px rgba(47, 111, 181, 0.08) !important;
}

.etnp-site-theme .frappe-list .list-row:hover,
.etnp-site-theme .list-row-container:hover {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.08), rgba(31, 107, 52, 0.06)) !important;
}

/* ETNP workspace hero + widgets */
.etnp-site-theme .etnp-workspace-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(47, 111, 181, 0.14) 0%, rgba(31, 107, 52, 0.12) 52%, rgba(195, 39, 48, 0.12) 100%) !important;
  border: 1px solid rgba(47, 111, 181, 0.22) !important;
  box-shadow: var(--ecd-shadow-md) !important;
}

.etnp-site-theme .etnp-workspace-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(241, 230, 27, 0.08), transparent 38%, rgba(47, 111, 181, 0.06));
  pointer-events: none;
}

.etnp-site-theme .etnp-workspace-hero__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.etnp-site-theme .etnp-workspace-hero__logo {
  width: 126px;
  max-width: 100%;
  border-radius: 14px;
  background: #ffffff;
  padding: 8px 10px;
  box-shadow: 0 8px 18px rgba(22, 71, 125, 0.12);
}

.etnp-site-theme .etnp-workspace-hero__copy {
  flex: 1 1 280px;
}

.etnp-site-theme .etnp-workspace-hero__eyebrow {
  color: var(--ecd-red) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.etnp-site-theme .etnp-workspace-hero h3 {
  margin: 0 0 6px;
  color: var(--ecd-blue) !important;
  font-size: 28px;
  font-weight: 900;
}

.etnp-site-theme .etnp-workspace-hero p {
  margin: 0;
  color: var(--ecd-text) !important;
  font-size: 14px;
  font-weight: 600;
}

.etnp-site-theme .widget-group {
  background: transparent !important;
}

.etnp-site-theme .workspace-page .widget-group-head {
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid var(--ecd-yellow);
}

.etnp-site-theme .workspace-page .widget-group-title {
  color: var(--ecd-blue) !important;
  font-weight: 800 !important;
}

.etnp-site-theme .workspace-page .widget.links-widget-box,
.etnp-site-theme .workspace-page .widget.shortcut-widget-box,
.etnp-site-theme .workspace-page .widget.number-widget-box,
.etnp-site-theme .workspace-page .widget.chart-widget-box {
  background: linear-gradient(145deg, var(--ecd-surface) 0%, var(--ecd-surface-soft) 100%) !important;
  border: 1px solid rgba(47, 111, 181, 0.18) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 18px rgba(22, 71, 125, 0.08) !important;
}

.etnp-site-theme .workspace-page .widget.links-widget-box:hover,
.etnp-site-theme .workspace-page .widget.shortcut-widget-box:hover,
.etnp-site-theme .workspace-page .widget.number-widget-box:hover,
.etnp-site-theme .workspace-page .widget.chart-widget-box:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 107, 52, 0.34) !important;
  box-shadow: var(--ecd-shadow-md) !important;
}

.etnp-site-theme .workspace-page .widget .widget-head,
.etnp-site-theme .workspace-page .widget .widget-title,
.etnp-site-theme .workspace-page .widget .link-item,
.etnp-site-theme .workspace-page .widget .widget-body {
  color: var(--ecd-text) !important;
}

.etnp-site-theme .workspace-page .widget.shortcut-widget-box .indicator-pill {
  background: rgba(241, 230, 27, 0.22) !important;
  color: #7a5d00 !important;
}

/* Workspace icons keep default app-specific look */

.etnp-site-theme .desktop-icon .app-title,
.etnp-site-theme .workspace-icon .title {
  color: var(--ecd-text) !important;
  font-weight: 700 !important;
}

@media (prefers-reduced-motion: reduce) {
  .etnp-site-theme *,
  .etnp-site-theme *::before,
  .etnp-site-theme *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Ultimate fallback: apply even without theme class */
body .page-head,
body .form-page .page-head,
body .layout-main-section .page-head {
  background: linear-gradient(90deg, #2f6fb5 0%, #1f6b34 52%, #c32730 100%) !important;
  border-bottom: 4px solid #f1e61b !important;
}

body .title-area .navbar-breadcrumbs li:not(:has(.indicator-pill)),
body .title-area .navbar-breadcrumbs li a,
body .title-area .navbar-breadcrumbs .worksapce-breadcrumb,
body .title-area .navbar-breadcrumbs .title-text,
body .title-area .navbar-breadcrumbs .title-text-form,
body .title-area .editable-title .navbar-breadcrumbs li:not(:has(.indicator-pill)),
body .title-area .editable-title .navbar-breadcrumbs li a {
  color: #ffffff !important;
  font-weight: 800 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

body .title-area .navbar-breadcrumbs svg,
body .title-area .navbar-breadcrumbs use {
  color: #ffffff !important;
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* Left sidebar forced styling */
body .layout-side-section,
body .layout-side-section.visible-section,
body .form-sidebar,
body .form-sidebar-items,
body .form-dashboard-section,
body .sidebar-toggle-placeholder {
  background: linear-gradient(145deg, #ffffff 0%, #f2f8ff 100%) !important;
  border: 2px solid #2f6fb5 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 10px 24px rgba(22, 71, 125, 0.14) !important;
}

body .layout-side-section .standard-sidebar-item,
body .layout-side-section .sidebar-item,
body .layout-side-section .sidebar-item-container,
body .layout-side-section .sidebar-section,
body .layout-side-section .list-filters,
body .form-sidebar .sidebar-section,
body .form-sidebar .sidebar-stat-item,
body .form-sidebar .form-tags,
body .form-sidebar .tag-area,
body .form-dashboard-section .sidebar-stat-item {
  background: linear-gradient(135deg, #f2f8ff 0%, #ffffff 100%) !important;
  border-left: 4px solid #1f6b34 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  margin-bottom: 8px !important;
}

body .layout-side-section .standard-sidebar-label,
body .layout-side-section .sidebar-item-label,
body .form-sidebar-label,
body .form-sidebar .sidebar-stat-item .stat-label {
  color: #4f6e8e !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

body .layout-side-section .sidebar-item-control,
body .layout-side-section .stat-value,
body .form-sidebar .value,
body .form-sidebar .sidebar-stat-item .stat-value,
body .sidebar-stat-value {
  color: #2f6fb5 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* Final simple parity: left sidebar should look like right sidebar */
body .layout-side-section,
body .layout-side-section.visible-section,
body .form-sidebar,
body .form-sidebar-items,
body .form-dashboard-section,
body .sidebar-toggle-placeholder {
  background: linear-gradient(145deg, #ffffff 0%, #f2f8ff 100%) !important;
  border: 2px solid #2f6fb5 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 10px 24px rgba(22, 71, 125, 0.14) !important;
}

body .layout-side-section .standard-sidebar-item,
body .layout-side-section .sidebar-item,
body .layout-side-section .sidebar-item-container,
body .layout-side-section .sidebar-section,
body .layout-side-section .list-filters,
body .form-sidebar .sidebar-section,
body .form-sidebar .sidebar-stat-item,
body .form-sidebar .form-tags,
body .form-sidebar .tag-area,
body .form-dashboard-section .sidebar-stat-item {
  background: transparent !important;
  border: none !important;
  border-left: none !important;
  border-radius: 0 !important;
  padding: 4px 0 !important;
  margin-bottom: 6px !important;
  box-shadow: none !important;
}

body .layout-side-section .standard-sidebar-label,
body .layout-side-section .sidebar-item-label,
body .form-sidebar-label,
body .form-sidebar .sidebar-stat-item .stat-label,
body .layout-side-section .text-muted,
body .form-sidebar .text-muted {
  color: #4f6e8e !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body .layout-side-section .sidebar-item-control,
body .layout-side-section .stat-value,
body .form-sidebar .value,
body .form-sidebar .sidebar-stat-item .stat-value,
body .sidebar-stat-value {
  color: #2f6fb5 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Final fallback fixes: always show doctype title and style left sidebar */
body .form-page .page-head,
body .layout-main-section .page-head {
  background: linear-gradient(90deg, #2f6fb5 0%, #1f6b34 52%, #c32730 100%) !important;
  border-bottom: 4px solid #f1e61b !important;
}

body .form-page .page-head .title,
body .form-page .page-head .title-text,
body .form-page .page-title,
body .form-page .page-title .title-text,
body .form-page .ellipsis.title-text,
body .layout-main-section .page-head .title,
body .layout-main-section .page-head .title-text,
body .layout-main-section .page-title,
body .layout-main-section .page-title .title-text,
body .layout-main-section .ellipsis.title-text {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Only specific safe children — never the container itself (pill inherits color) */
body .form-page .title-area .navbar-breadcrumbs li:not(:has(.indicator-pill)),
body .form-page .title-area .navbar-breadcrumbs a,
body .form-page .title-area .navbar-breadcrumbs .title-text,
body .layout-main-section .title-area .navbar-breadcrumbs li:not(:has(.indicator-pill)),
body .layout-main-section .title-area .navbar-breadcrumbs a,
body .layout-main-section .title-area .navbar-breadcrumbs .title-text {
  color: #ffffff !important;
  font-weight: 800 !important;
}

body .form-page .title-area .navbar-breadcrumbs a,
body .form-page .title-area .navbar-breadcrumbs li:not(:has(.indicator-pill)),
body .form-page .title-area .navbar-breadcrumbs .worksapce-breadcrumb,
body .form-page .title-area .navbar-breadcrumbs .title-text,
body .form-page .title-area .navbar-breadcrumbs .title-text-form,
body .layout-main-section .title-area .navbar-breadcrumbs a,
body .layout-main-section .title-area .navbar-breadcrumbs li:not(:has(.indicator-pill)),
body .layout-main-section .title-area .navbar-breadcrumbs .worksapce-breadcrumb,
body .layout-main-section .title-area .navbar-breadcrumbs .title-text,
body .layout-main-section .title-area .navbar-breadcrumbs .title-text-form {
  color: #ffffff !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

.page-head .indicator-pill.orange span,
.title-area .indicator-pill.orange span {
  color: #b54708 !important;
}

.page-head .indicator-pill.green span,
.title-area .indicator-pill.green span {
  color: #027a48 !important;
}

.page-head .indicator-pill.red span,
.title-area .indicator-pill.red span {
  color: #b42318 !important;
}

.page-head .indicator-pill.blue span,
.title-area .indicator-pill.blue span {
  color: #175cd3 !important;
}

.page-head .indicator-pill.gray span,
.page-head .indicator-pill.grey span,
.title-area .indicator-pill.gray span,
.title-area .indicator-pill.grey span {
  color: #475467 !important;
}

body .layout-side-section,
body .form-page .layout-side-section,
body .form-sidebar,
body .form-sidebar-items,
body .form-dashboard-section,
body .sidebar-toggle-placeholder,
body .layout-side-section.visible-section {
  background: linear-gradient(145deg, #ffffff 0%, #f2f8ff 100%) !important;
  border: 2px solid #2f6fb5 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 10px 24px rgba(22, 71, 125, 0.14) !important;
}

body .layout-side-section .standard-sidebar-item,
body .layout-side-section .sidebar-item,
body .layout-side-section .sidebar-item-container,
body .form-sidebar .sidebar-section,
body .form-sidebar .sidebar-stat-item,
body .form-sidebar .form-tags,
body .form-sidebar .tag-area,
body .form-dashboard-section .sidebar-stat-item {
  background: linear-gradient(135deg, #f2f8ff 0%, #ffffff 100%) !important;
  border-left: 4px solid #1f6b34 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  margin-bottom: 8px !important;
}

body .layout-side-section .standard-sidebar-label,
body .layout-side-section .sidebar-item-label,
body .form-sidebar-label,
body .form-sidebar .sidebar-stat-item .stat-label {
  color: #4f6e8e !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

body .layout-side-section .sidebar-item-control,
body .layout-side-section .stat-value,
body .form-sidebar .value,
body .form-sidebar .sidebar-stat-item .stat-value,
body .sidebar-stat-value {
  color: #2f6fb5 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* ── Dropdown menus: ECD theme for all doctypes ── */
body .dropdown-menu {
  background: #ffffff !important;
  border: 1px solid rgba(47, 111, 181, 0.28) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(22, 71, 125, 0.14) !important;
  padding: 4px 0 !important;
  min-width: 160px !important;
}

body .dropdown-menu .dropdown-item,
body .dropdown-menu li > a,
body .dropdown-menu li > button {
  color: #173b63 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 7px 16px !important;
  border-radius: 6px !important;
  margin: 1px 4px !important;
  background: transparent !important;
  border: none !important;
  transition: background 120ms ease, color 120ms ease !important;
  display: block !important;
  width: calc(100% - 8px) !important;
}

body .dropdown-menu .dropdown-item:hover,
body .dropdown-menu li > a:hover,
body .dropdown-menu li > button:hover {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.1) 0%, rgba(31, 107, 52, 0.07) 100%) !important;
  color: #2f6fb5 !important;
  border-left: 3px solid #2f6fb5 !important;
  padding-left: 13px !important;
}

body .dropdown-menu .dropdown-item:active,
body .dropdown-menu li > a:active,
body .dropdown-menu li > button:active {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.18) 0%, rgba(31, 107, 52, 0.12) 100%) !important;
  color: #1f6b34 !important;
}

body .dropdown-menu .dropdown-divider,
body .dropdown-menu .divider {
  border-top: 1px solid rgba(47, 111, 181, 0.16) !important;
  margin: 3px 8px !important;
}

body .dropdown-menu .dropdown-item.text-danger,
body .dropdown-menu li > a.text-danger {
  color: #c32730 !important;
}

body .dropdown-menu .dropdown-item.text-danger:hover,
body .dropdown-menu li > a.text-danger:hover {
  background: linear-gradient(90deg, rgba(195, 39, 48, 0.09) 0%, rgba(195, 39, 48, 0.05) 100%) !important;
  border-left-color: #c32730 !important;
  color: #c32730 !important;
}

/* Awesomplete / link-field dropdown */
body .awesomplete ul,
body .autocomplete-results {
  background: #ffffff !important;
  border: 1px solid rgba(47, 111, 181, 0.28) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 18px rgba(22, 71, 125, 0.12) !important;
}

body .awesomplete ul li,
body .autocomplete-results .autocomplete-result {
  color: #173b63 !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
}

body .awesomplete ul li:hover,
body .awesomplete ul li[aria-selected="true"],
body .autocomplete-results .autocomplete-result:hover {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.1), rgba(31, 107, 52, 0.07)) !important;
  color: #2f6fb5 !important;
}

/* ═══════════════════════════════════════════════════════════
   ECD Task Tree View — rich, readable, hierarchical
   ═══════════════════════════════════════════════════════════ */

/* Tree page container */
body .tree-container,
body [data-page-route*="Tree"] .layout-main-section-wrapper {
  padding: 12px 16px !important;
}

/* Root tree wrapper */
body .tree {
  background: transparent !important;
}

/* Remove default UL list styling */
body .tree ul,
body .tree-children {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}

/* ── Level 0: Project nodes (root) ── */
body .tree > ul > .tree-node,
body .tree > .tree-children > .tree-node {
  margin-bottom: 10px !important;
}

body .tree > ul > .tree-node > .tree-link,
body .tree > .tree-children > .tree-node > .tree-link {
  background: linear-gradient(135deg, #2f6fb5 0%, #245f9f 100%) !important;
  border-left: 5px solid #f1e61b !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(47, 111, 181, 0.28) !important;
  padding: 10px 14px !important;
}

body .tree > ul > .tree-node > .tree-link .tree-label,
body .tree > .tree-children > .tree-node > .tree-link .tree-label {
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25) !important;
}

/* ── Level 1: Outcome nodes ── */
body .tree > ul > .tree-node > .tree-children > .tree-node,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node {
  margin-bottom: 6px !important;
  padding-left: 18px !important;
  position: relative !important;
}

body .tree > ul > .tree-node > .tree-children > .tree-node::before,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node::before {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 3px !important;
  background: linear-gradient(180deg, #1f6b34, rgba(31, 107, 52, 0.2)) !important;
  border-radius: 2px !important;
}

body .tree > ul > .tree-node > .tree-children > .tree-node > .tree-link,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node > .tree-link {
  background: linear-gradient(135deg, #eef7f0 0%, #ddf0e4 100%) !important;
  border-left: 4px solid #1f6b34 !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(31, 107, 52, 0.14) !important;
  padding: 8px 12px !important;
}

body .tree > ul > .tree-node > .tree-children > .tree-node > .tree-link .tree-label,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node > .tree-link .tree-label {
  color: #1a5a2c !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* ── Level 2: Output nodes ── */
body .tree > ul > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node {
  margin-bottom: 4px !important;
  padding-left: 18px !important;
  position: relative !important;
}

body .tree > ul > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node::before,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node::before {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 2px !important;
  background: linear-gradient(180deg, #c32730, rgba(195,39,48,0.15)) !important;
  border-radius: 2px !important;
}

body .tree > ul > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node > .tree-link,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node > .tree-link {
  background: linear-gradient(135deg, #fff5f5 0%, #fde8e8 100%) !important;
  border-left: 4px solid #c32730 !important;
  border-radius: 7px !important;
  box-shadow: 0 1px 6px rgba(195,39,48,0.10) !important;
  padding: 7px 12px !important;
}

body .tree > ul > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node > .tree-link .tree-label,
body .tree > .tree-children > .tree-node > .tree-children > .tree-node > .tree-children > .tree-node > .tree-link .tree-label {
  color: #8b1a1e !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* ── Level 3: Activity nodes ── */
body .tree .tree-children .tree-children .tree-children .tree-children .tree-node > .tree-link {
  background: linear-gradient(135deg, #fffbea 0%, #fef5c7 100%) !important;
  border-left: 4px solid #b8860b !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 4px rgba(184,134,11,0.10) !important;
  padding: 6px 12px !important;
}

body .tree .tree-children .tree-children .tree-children .tree-children .tree-node > .tree-link .tree-label {
  color: #6b5000 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* ── ALL nodes: key fixes for long text ── */
body .tree .tree-link {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: filter 140ms ease, transform 140ms ease !important;
  margin-bottom: 3px !important;
  min-height: unset !important;
  height: auto !important;
  white-space: normal !important;
  overflow: visible !important;
}

body .tree .tree-link:hover {
  filter: brightness(0.96) !important;
  transform: translateX(2px) !important;
}

/* The label — allow wrapping, no truncation */
body .tree .tree-label {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  line-height: 1.45 !important;
  flex: 1 1 auto !important;
  display: block !important;
  max-width: 100% !important;
}

/* Expand/collapse toggle button */
body .tree .tree-expand {
  flex-shrink: 0 !important;
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.55) !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
  transition: background 120ms ease !important;
  cursor: pointer !important;
  margin-top: 1px !important;
}

body .tree .tree-expand:hover {
  background: rgba(255,255,255,0.90) !important;
}

body .tree .tree-expand .octicon,
body .tree .tree-expand svg {
  width: 12px !important;
  height: 12px !important;
}

/* No-children leaf node: hide empty expand area */
body .tree .tree-node.is-leaf .tree-expand {
  visibility: hidden !important;
}

/* Task name (TASK-XXXX) inside tree labels — high contrast badge */
body .tree .tree-label .text-muted {
  display: inline-block !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  color: #ffd447 !important;
  background: rgba(0, 0, 0, 0.52) !important;
  border: 1px solid rgba(255, 212, 71, 0.55) !important;
  border-radius: 999px !important;
  padding: 2px 8px !important;
  margin-left: 8px !important;
  vertical-align: middle !important;
  letter-spacing: 0.28px !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65) !important;
}

/* Compact + elegant sidebar links (single-line, right-sidebar feel) */
body .body-sidebar .standard-sidebar-item,
body .layout-side-section .standard-sidebar-item,
body .form-sidebar .standard-sidebar-item,
body .list-sidebar .standard-sidebar-item {
  margin-bottom: 1px !important;
}

body .body-sidebar .standard-sidebar-item .item-anchor,
body .layout-side-section .standard-sidebar-item .item-anchor,
body .form-sidebar .standard-sidebar-item .item-anchor,
body .list-sidebar .standard-sidebar-item .item-anchor,
body .body-sidebar .sidebar-item,
body .layout-side-section .sidebar-item,
body .form-sidebar .sidebar-item,
body .list-sidebar .sidebar-item {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 7px !important;
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  overflow: hidden !important;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 180ms ease,
    transform 120ms ease !important;
}

body .body-sidebar .standard-sidebar-item .item-anchor:hover,
body .layout-side-section .standard-sidebar-item .item-anchor:hover,
body .form-sidebar .standard-sidebar-item .item-anchor:hover,
body .list-sidebar .standard-sidebar-item .item-anchor:hover,
body .body-sidebar .sidebar-item:hover,
body .layout-side-section .sidebar-item:hover,
body .form-sidebar .sidebar-item:hover,
body .list-sidebar .sidebar-item:hover {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.1) 0%, rgba(31, 107, 52, 0.07) 100%) !important;
  border-color: rgba(47, 111, 181, 0.23) !important;
  box-shadow: 0 2px 6px rgba(22, 71, 125, 0.08) !important;
  transform: translateX(1px);
}

body .body-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
body .layout-side-section .standard-sidebar-item.active-sidebar .item-anchor,
body .form-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
body .list-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
body .body-sidebar .sidebar-item.selected,
body .layout-side-section .sidebar-item.selected,
body .form-sidebar .sidebar-item.selected,
body .list-sidebar .sidebar-item.selected {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.17) 0%, rgba(31, 107, 52, 0.1) 100%) !important;
  border-color: rgba(47, 111, 181, 0.35) !important;
  box-shadow: inset 2px 0 0 #2f6fb5 !important;
}

body .body-sidebar .sidebar-item-label,
body .layout-side-section .sidebar-item-label,
body .form-sidebar .sidebar-item-label,
body .list-sidebar .sidebar-item-label,
body .body-sidebar .standard-sidebar-label,
body .layout-side-section .standard-sidebar-label,
body .form-sidebar .standard-sidebar-label,
body .list-sidebar .standard-sidebar-label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: block !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  color: #2b5d93 !important;
  letter-spacing: 0.005em;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body .body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label,
body .layout-side-section .standard-sidebar-item.active-sidebar .sidebar-item-label,
body .form-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label,
body .list-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label {
  color: #1e4f84 !important;
  font-weight: 700 !important;
}

body .body-sidebar .sidebar-item-icon,
body .layout-side-section .sidebar-item-icon,
body .form-sidebar .sidebar-item-icon,
body .list-sidebar .sidebar-item-icon {
  color: #2f6fb5 !important;
  opacity: 0.92;
  flex: 0 0 auto !important;
  transition: transform 120ms ease, color 150ms ease !important;
}

body .body-sidebar .standard-sidebar-item:hover .sidebar-item-icon,
body .layout-side-section .standard-sidebar-item:hover .sidebar-item-icon,
body .form-sidebar .standard-sidebar-item:hover .sidebar-item-icon,
body .list-sidebar .standard-sidebar-item:hover .sidebar-item-icon {
  transform: scale(1.05);
}

@keyframes ecdSidebarHoverGlow {
  0% { box-shadow: 0 0 0 rgba(47, 111, 181, 0); }
  100% { box-shadow: 0 2px 6px rgba(22, 71, 125, 0.08); }
}

body .body-sidebar .standard-sidebar-item .item-anchor:hover,
body .layout-side-section .standard-sidebar-item .item-anchor:hover,
body .form-sidebar .standard-sidebar-item .item-anchor:hover,
body .list-sidebar .standard-sidebar-item .item-anchor:hover {
  animation: ecdSidebarHoverGlow 120ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  body .body-sidebar .standard-sidebar-item .item-anchor,
  body .layout-side-section .standard-sidebar-item .item-anchor,
  body .form-sidebar .standard-sidebar-item .item-anchor,
  body .list-sidebar .standard-sidebar-item .item-anchor,
  body .body-sidebar .sidebar-item,
  body .layout-side-section .sidebar-item,
  body .form-sidebar .sidebar-item,
  body .list-sidebar .sidebar-item {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Final left-sidebar cleanup: remove nested borders and give a bit more width */
@media (min-width: 992px) {
  :root,
  html,
  body {
    --sidebar-width: 280px !important;
  }

  .body-sidebar-container.expanded .body-sidebar,
  .body-sidebar-container.expanded .body-sidebar-placeholder {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
  }
}

/* Remove nested borders/padding pressure inside left sidebar links */
body .body-sidebar .standard-sidebar-item,
body .body-sidebar .sidebar-item {
  border: none !important;
  box-shadow: none !important;
}

body .body-sidebar .standard-sidebar-item .item-anchor,
body .body-sidebar .sidebar-item {
  border: none !important;
  padding-left: 5px !important;
  padding-right: 5px !important;
}

body .body-sidebar .standard-sidebar-item .item-anchor:hover,
body .body-sidebar .sidebar-item:hover,
body .body-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
body .body-sidebar .sidebar-item.selected {
  border-color: transparent !important;
}

body .body-sidebar .sidebar-item-label,
body .body-sidebar .standard-sidebar-label {
  max-width: 100% !important;
}

/* Restore the branded desk left sidebar shell and Raven card styling */
html.etnp-site-theme body .body-sidebar,
body.etnp-site-theme .body-sidebar,
body .body-sidebar {
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%) !important;
  border-right: 1px solid rgba(47, 111, 181, 0.22) !important;
  box-shadow: 10px 0 24px rgba(22, 71, 125, 0.08) !important;
}

html.etnp-site-theme body .body-sidebar .body-sidebar-top,
html.etnp-site-theme body .body-sidebar .body-sidebar-bottom,
body.etnp-site-theme .body-sidebar .body-sidebar-top,
body.etnp-site-theme .body-sidebar .body-sidebar-bottom,
body .body-sidebar .body-sidebar-top,
body .body-sidebar .body-sidebar-bottom {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html.etnp-site-theme body .body-sidebar .standard-sidebar-item .item-anchor,
html.etnp-site-theme body .body-sidebar .sidebar-item,
body.etnp-site-theme .body-sidebar .standard-sidebar-item .item-anchor,
body.etnp-site-theme .body-sidebar .sidebar-item,
body .body-sidebar .standard-sidebar-item .item-anchor,
body .body-sidebar .sidebar-item,
body #raven-sidebar-link {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 246, 255, 0.92) 100%) !important;
  border: 1px solid rgba(47, 111, 181, 0.14) !important;
  box-shadow: 0 2px 8px rgba(22, 71, 125, 0.05) !important;
}

body .body-sidebar .sidebar-item-label.header-title {
  color: #173b63 !important;
  font-weight: 800 !important;
}

body .body-sidebar .sidebar-item-label.header-subtitle {
  color: #4f6e8e !important;
}

body #raven-sidebar-link {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 24px !important;
  padding: 4px 7px !important;
  border-radius: 7px !important;
  color: #2b5d93 !important;
  text-decoration: none !important;
}

body .body-sidebar .standard-sidebar-item .item-anchor:hover,
body .body-sidebar .sidebar-item:hover,
body .body-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
body .body-sidebar .sidebar-item.selected,
body #raven-sidebar-link:hover {
  background: linear-gradient(90deg, rgba(47, 111, 181, 0.12) 0%, rgba(31, 107, 52, 0.08) 100%) !important;
  border-color: rgba(47, 111, 181, 0.24) !important;
  box-shadow: 0 4px 10px rgba(22, 71, 125, 0.09) !important;
}

body #raven-sidebar-link span {
  font-size: 10.5px !important;
  font-weight: 700 !important;
}
