body.wp-theme-inspiro #content.site-content,
body.wp-theme-inspiro .inner-wrap,
body.wp-theme-inspiro #primary.content-area,
body.wp-theme-inspiro .site-main,
body.wp-theme-inspiro .entry-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 30px !important;
  padding-right: 30px !important;
}

.esg-kpi-full-bleed {
  position: static;
  width: auto;
  margin-left: 0;
  padding-bottom: 56px;
  box-sizing: border-box;
}

.esg-kpi-inner {
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .esg-kpi-inner {
    padding: 0 16px;
  }
}

.esg-kpi-dashboard {
  --esg-primary: #1a7a4c;
  --esg-primary-dark: #125c39;
  --esg-primary-light: #e7f4ec;
  --esg-primary-soft: #f2f9f4;
  --esg-ink: #1c2622;
  --esg-ink-soft: #5b6b62;
  --esg-ink-faint: #9aa8a0;
  --esg-border: #e6eae7;
  --esg-amber: #f8f2df;
  --esg-amber-border: #e3d6a3;
  --esg-radius-lg: 16px;
  --esg-radius-md: 10px;
  --esg-radius-sm: 7px;
  --esg-shadow: 0 1px 2px rgba(20, 30, 24, 0.04), 0 4px 16px rgba(20, 30, 24, 0.05);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--esg-ink);
  max-width: 100%;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.esg-kpi-dashboard * { box-sizing: border-box; }

.esg-login-notice,
.esg-empty-notice {
  padding: 16px 18px;
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-md);
  color: var(--esg-ink-soft);
  font-size: 14px;
}

/* ---------- Category dropdown ---------- */
.esg-category-field {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.esg-category-field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--esg-ink-faint);
  font-weight: 700;
}

.esg-category-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--esg-primary-dark);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a7a4c' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1.5px solid var(--esg-primary);
  border-radius: 999px;
  padding: 10px 40px 10px 20px;
  min-width: 240px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 122, 76, 0.12);
}

.esg-category-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 122, 76, 0.18);
}

/* ---------- Pill navigation ---------- */
.esg-pillbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.esg-pillbar-site {
  margin-bottom: 14px;
}

.esg-pill {
  border: 1px solid var(--esg-border);
  background: #fff;
  color: var(--esg-ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.esg-pill-lg {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.esg-pill-lg.is-active {
  background: var(--esg-primary);
  border-color: var(--esg-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 122, 76, 0.25);
}

.esg-pill-lg:not(.is-active):hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary-dark);
}

.esg-pill-sm {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--esg-primary-soft);
}

.esg-pill-sm.is-active {
  background: var(--esg-primary-dark);
  border-color: var(--esg-primary-dark);
  color: #fff;
}

.esg-pill-sm:not(.is-active):hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary-dark);
  background: var(--esg-primary-light);
}

/* ---------- Card containing the table ---------- */
.esg-card {
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-lg);
  box-shadow: var(--esg-shadow);
  padding: 4px;
}

/* ---------- Table ---------- */
.esg-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
}

.esg-kpi-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: auto;
  font-size: 13px;
}

.esg-kpi-table thead th {
  background: var(--esg-primary-soft);
  color: var(--esg-primary-dark);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 10px;
  border: 1px solid var(--esg-border);
  position: sticky;
  z-index: 10;
}

/* Row 1 of the header: field columns (rowspan) + Sum/Avg/High/Low group labels. */
.esg-kpi-table thead tr:first-child th {
  top: 0;
}

/* Row 2 of the header: the 2023/2024/2025 cells. Must stick BELOW row 1,
   not at top:0 too, or it collides with row 1 while scrolling. */
.esg-kpi-table thead th.esg-yr {
  top: 39px;
  z-index: 9;
}


.esg-group-sum, .esg-group-avg, .esg-group-high, .esg-group-low {
  border-left: 2px solid rgba(26, 122, 76, 0.18);
}

.esg-kpi-table td {
  padding: 10px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  border: 1px solid var(--esg-border);
  vertical-align: middle;
}

.esg-kpi-table tbody tr:hover td {
  background: var(--esg-primary-soft);
}

.esg-kpi-col {
  text-align: left !important;
  max-width: 220px;
  color: var(--esg-ink);
}

.esg-col-narrow {
  max-width: 150px !important;
  color: var(--esg-ink-soft);
  font-size: 12.5px;
}

.esg-col-desc {
  max-width: 170px !important;
}

.esg-col-value {
  min-width: 70px;
}

.esg-col-value-sm {
  min-width: 68px;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.esg-yr {
  font-size: 10.5px;
  color: var(--esg-primary-dark);
  font-weight: 600;
  opacity: 0.6;
  text-transform: none;
}

.esg-dash {
  color: var(--esg-ink-faint);
}

.esg-locked-cell {
  color: var(--esg-ink-faint);
}

/* ---------- Editable cells ---------- */
.esg-editable-cell {
  background: var(--esg-amber);
}

.esg-input {
  width: 100%;
  max-width: 92px;
  padding: 6px 4px;
  border: none;
  border-bottom: 2px solid var(--esg-amber-border);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--esg-ink);
  transition: border-color 0.14s ease;
}

.esg-input::placeholder {
  color: var(--esg-ink-faint);
  font-weight: 400;
}

.esg-input:focus {
  outline: none;
  border-bottom-color: var(--esg-primary);
}

.esg-input.esg-just-saved {
  border-bottom-color: var(--esg-primary);
  background: var(--esg-primary-light);
}

/* ---------- Aggregate badges ---------- */
.esg-agg-cell {
  background: rgba(26, 122, 76, 0.03);
}

.esg-badge {
  display: inline-block;
  min-width: 40px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--esg-primary-light);
  color: var(--esg-primary-dark);
  font-weight: 700;
  font-size: 12px;
}

/* ---------- Save row ---------- */
.esg-save-row {
  margin-top: 16px;
  padding: 0 10px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.esg-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--esg-primary);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(26, 122, 76, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}

.esg-save-btn:hover {
  background: var(--esg-primary-dark);
  transform: translateY(-1px);
}

.esg-save-btn:active {
  transform: translateY(0);
}

.esg-save-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.esg-save-icon {
  font-size: 12px;
}

.esg-save-status {
  font-size: 13px;
  font-weight: 500;
  color: var(--esg-ink-soft);
}

.esg-save-status.is-ok { color: var(--esg-primary-dark); }
.esg-save-status.is-error { color: #b3402a; }

/* ---------- History log ---------- */
.esg-history {
  margin: 6px 10px 10px;
  border-top: 1px solid var(--esg-border);
  padding-top: 12px;
}

.esg-history summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--esg-ink);
  padding: 4px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.esg-history summary::-webkit-details-marker { display: none; }

.esg-history summary::before {
  content: "\203A";
  display: inline-block;
  color: var(--esg-primary);
  font-size: 15px;
  transition: transform 0.15s ease;
}

.esg-history[open] summary::before {
  transform: rotate(90deg);
}

.esg-history-count {
  background: var(--esg-primary-light);
  color: var(--esg-primary-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}

.esg-history-empty {
  font-size: 13px;
  color: var(--esg-ink-faint);
  margin: 8px 0 4px 20px;
}

.esg-history-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 6px;
  border-left: 2px solid var(--esg-border);
}

.esg-history-list li {
  display: flex;
  gap: 12px;
  padding: 0 0 14px 14px;
  position: relative;
}

.esg-history-dot {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--esg-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--esg-primary);
}

.esg-history-body {
  flex: 1;
  min-width: 0;
}

.esg-history-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  font-size: 12.5px;
}

.esg-history-kpi {
  color: var(--esg-ink);
  font-weight: 600;
}

.esg-history-change {
  color: var(--esg-ink-soft);
}

.esg-history-meta {
  color: var(--esg-ink-faint);
  font-size: 11.5px;
  margin-top: 2px;
}

/* ---------- Comments ---------- */
.esg-comments {
  margin: 0;
  border-top: none;
  padding-top: 0;
}

.esg-comments-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--esg-ink);
}

.esg-comments-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esg-comments-list > li {
  padding-top: 10px;
  border-top: 1px solid var(--esg-border);
}

.esg-comments-list > li:first-child {
  padding-top: 0;
  border-top: none;
}

.esg-row-toggle-count {
  display: inline-block;
  background: var(--esg-primary-light);
  color: var(--esg-primary-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 0 4px;
  font-size: 10px;
}

.esg-comments-empty {
  font-size: 13px;
  color: var(--esg-ink-faint);
}

.esg-comment {
  background: var(--esg-primary-soft);
  border-radius: var(--esg-radius-sm);
  padding: 10px 12px;
}

.esg-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.esg-comment-author {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--esg-primary-dark);
}

.esg-comment-to-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--esg-ink-soft);
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 1px 8px;
}

.esg-comment-time {
  font-size: 11px;
  color: var(--esg-ink-faint);
  margin-left: auto;
}

.esg-comment-body {
  font-size: 13px;
  color: var(--esg-ink);
  line-height: 1.5;
}

.esg-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esg-comment-input {
  width: 100%;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 44px;
}

.esg-comment-input:focus {
  outline: none;
  border-color: var(--esg-primary);
  box-shadow: 0 0 0 3px rgba(26, 122, 76, 0.12);
}

.esg-comment-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.esg-comment-to-preview {
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-primary-dark);
  background: var(--esg-primary-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.esg-comment-btn {
  background: var(--esg-primary);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--esg-radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}

.esg-comment-btn:hover {
  background: var(--esg-primary-dark);
}

.esg-comment-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.esg-comment-status {
  font-size: 12.5px;
  color: var(--esg-ink-soft);
}

.esg-comment-status.is-ok { color: var(--esg-primary-dark); }
.esg-comment-status.is-error { color: #b3402a; }

/* ---------- Per-row activity toggle ---------- */
.esg-col-activity {
  min-width: 60px;
  white-space: normal;
  line-height: 1.3;
}

.esg-row-toggle {
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 4px 6px;
  font-size: 11px;
  cursor: pointer;
  color: var(--esg-ink-soft);
  white-space: normal;
}

.esg-row-toggle:hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary-dark);
}

.esg-row-detail td {
  background: var(--esg-primary-soft);
  padding: 14px 18px;
}

.esg-row-detail-inner {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  text-align: left;
}

.esg-row-detail-inner .esg-attachments,
.esg-row-detail-inner .esg-comments {
  flex: 1 1 300px;
  min-width: 260px;
}

.esg-detail-title {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--esg-ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Attachments ---------- */
.esg-attachments-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.esg-attachments-empty {
  font-size: 12.5px;
  color: var(--esg-ink-faint);
}

.esg-attachment {
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}

.esg-attachment a {
  color: var(--esg-primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.esg-attachment a:hover {
  text-decoration: underline;
}

.esg-attachment-meta {
  color: var(--esg-ink-faint);
  font-size: 11px;
  margin-left: auto;
}

.esg-attach-delete {
  background: none;
  border: none;
  color: var(--esg-ink-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.esg-attach-delete:hover {
  color: #b3402a;
}

.esg-attach-delete:disabled {
  opacity: 0.5;
  cursor: default;
}

.esg-attach-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.esg-attach-input {
  font-size: 12.5px;
  max-width: 220px;
}

.esg-attach-btn {
  background: var(--esg-primary);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: var(--esg-radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
}

.esg-attach-btn:hover {
  background: var(--esg-primary-dark);
}

.esg-attach-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.esg-attach-status {
  font-size: 12px;
  color: var(--esg-ink-soft);
}

.esg-attach-status.is-ok { color: var(--esg-primary-dark); }
.esg-attach-status.is-error { color: #b3402a; }

/* ---------- Replies ---------- */
.esg-reply-toggle {
  background: none;
  border: none;
  color: var(--esg-primary-dark);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0 0;
}

.esg-reply-toggle:hover {
  text-decoration: underline;
}

.esg-comment-replies {
  list-style: none;
  margin: 10px 0 0 18px;
  padding: 10px 0 0 14px;
  border-left: 2px solid var(--esg-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esg-comment-reply {
  background: #fff;
}

.esg-reply-form {
  margin: 10px 0 0 18px;
  padding-left: 14px;
}

.esg-reply-comment-form {
  max-width: 420px;
}

.esg-reply-comment-form .esg-comment-input {
  min-height: 34px;
}

/* ---------- Aggregate history (Overview tab) ---------- */
.esg-history-block {
  flex: 1 1 340px;
  min-width: 280px;
}

.esg-history-dot-file {
  background: #b98900;
  box-shadow: 0 0 0 1px #b98900;
}

.esg-history-dot-deleted {
  background: #b3402a;
  box-shadow: 0 0 0 1px #b3402a;
}

.esg-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--esg-primary-dark);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-export-btn:hover {
  background: var(--esg-primary-light);
  color: var(--esg-primary-dark);
}

.esg-export-caret {
  font-size: 10px;
  margin-left: 2px;
}

.esg-export-dropdown {
  position: relative;
}

.esg-export-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  box-shadow: var(--esg-shadow);
  min-width: 170px;
  overflow: hidden;
}

.esg-export-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--esg-ink);
  text-decoration: none;
}

.esg-export-menu a:hover {
  background: var(--esg-primary-soft);
  color: var(--esg-primary-dark);
}

/* ---------- Column filters (Excel-style header dropdowns) ---------- */
.esg-filterable-table {
  margin-bottom: 4px;
}

.esg-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 8px;
}

.esg-filter-clear {
  background: none;
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--esg-ink-soft);
  cursor: pointer;
}

.esg-filter-clear:hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary-dark);
}

.esg-filter-count {
  font-size: 12px;
  color: var(--esg-ink-faint);
}

.esg-filter-th {
  position: relative;
}

.esg-th-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.esg-th-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--esg-primary-dark);
  opacity: 0.55;
  padding: 2px 4px;
  line-height: 1;
}

.esg-th-filter-btn:hover {
  opacity: 1;
}

.esg-th-filter-btn.is-active {
  opacity: 1;
  color: #fff;
  background: var(--esg-primary);
  border-radius: 4px;
}

.esg-th-filter-panel {
  display: none;
  position: fixed;
  z-index: 9999;
  width: 220px;
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  box-shadow: var(--esg-shadow);
  padding: 10px;
  text-align: left;
  text-transform: none;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--esg-ink);
  white-space: normal;
}

.esg-th-filter-search {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid var(--esg-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  margin-bottom: 8px;
}

.esg-th-filter-search:focus {
  outline: none;
  border-color: var(--esg-primary);
}

.esg-th-filter-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.esg-th-filter-actions button {
  flex: 1;
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--esg-primary-dark);
  font-family: inherit;
}

.esg-th-filter-actions button:hover {
  background: var(--esg-primary-light);
}

.esg-th-filter-options {
  max-height: 190px;
  overflow-y: auto;
  border-top: 1px solid var(--esg-border);
  border-bottom: 1px solid var(--esg-border);
  padding: 4px 0;
  margin-bottom: 8px;
}

.esg-th-filter-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
}

.esg-th-filter-options label:hover {
  background: var(--esg-primary-soft);
}

.esg-th-filter-options label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.esg-th-filter-checkbox {
  flex: none;
  accent-color: var(--esg-primary);
}

.esg-th-filter-done {
  width: 100%;
  background: var(--esg-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-th-filter-done:hover {
  background: var(--esg-primary-dark);
}

/* Belt-and-braces bullet removal: some themes style ul/li inside .entry-content with
   higher specificity or ::marker content, which our earlier list-style:none can lose to. */
.esg-comments-list,
.esg-comment-replies {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.esg-comments-list > li,
.esg-comment-replies > li {
  list-style: none !important;
}

.esg-comments-list li::marker,
.esg-comment-replies li::marker {
  content: none !important;
}

/* ---------- @mention autocomplete ---------- */
.esg-mention-dropdown {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  box-shadow: var(--esg-shadow);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.esg-mention-option {
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--esg-ink);
}

.esg-mention-option:hover {
  background: var(--esg-primary-soft);
  color: var(--esg-primary-dark);
}

/* ---------- Admin settings panel ---------- */
.esg-settings-btn {
  position: fixed;
  top: 150px;
  right: 24px;
  z-index: 200;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--esg-border);
  background: #fff;
  color: var(--esg-primary-dark);
  font-size: 22px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--esg-shadow);
}

@media (max-width: 782px) {
  .esg-settings-btn {
    top: 64px; /* WordPress's admin bar grows taller on mobile */
  }
}

.esg-settings-btn:hover {
  background: var(--esg-primary-soft);
}

.esg-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 24, 0.35);
  z-index: 300;
}

.esg-settings-panel {
  position: fixed;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 301;
  background: #fff;
  border-radius: var(--esg-radius-lg);
  box-shadow: var(--esg-shadow);
  width: min(920px, 94vw);
  max-height: calc(100vh - 120px);
  overflow: hidden;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 782px) {
  .esg-settings-panel {
    top: 96px; /* clears WordPress's taller mobile admin bar */
  }
}

.esg-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.esg-settings-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--esg-ink);
}

.esg-settings-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--esg-ink-faint);
  padding: 2px 6px;
}

.esg-settings-close:hover {
  color: var(--esg-ink);
}

.esg-settings-note {
  font-size: 12.5px;
  color: var(--esg-ink-soft);
  margin: 6px 0 16px;
  line-height: 1.5;
}

.esg-settings-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

.esg-settings-links a {
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-primary-dark);
  text-decoration: none;
}

.esg-settings-links a:hover {
  background: var(--esg-primary-light);
}

.esg-settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.esg-settings-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--esg-ink-faint);
  padding: 6px 8px;
  border-bottom: 1px solid var(--esg-border);
}

.esg-settings-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--esg-border);
  vertical-align: middle;
}

.esg-settings-table select {
  width: 100%;
  padding: 5px 6px;
  border: 1px solid var(--esg-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
}

.esg-settings-save {
  background: var(--esg-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-settings-save:hover {
  background: var(--esg-primary-dark);
}

.esg-settings-save:disabled {
  opacity: 0.6;
  cursor: default;
}

.esg-settings-status {
  font-size: 11.5px;
}

.esg-settings-status.is-ok { color: var(--esg-primary-dark); }
.esg-settings-status.is-error { color: #b3402a; }

/* ---------- Settings panel: tabs & sub-sections ---------- */
.esg-settings-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
  border-bottom: 1px solid var(--esg-border);
  padding-bottom: 10px;
}

.esg-settings-tab-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--esg-ink-soft);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.esg-settings-tab-btn:hover {
  background: var(--esg-primary-soft);
}

.esg-settings-tab-btn.is-active {
  background: var(--esg-primary);
  color: #fff;
}

.esg-settings-tab {
  overflow-y: auto;
  flex: 1;
  min-height: 0; /* required for flex children to actually respect overflow instead of growing forever */
}

.esg-settings-subhead {
  margin: 18px 0 8px;
  font-size: 13.5px;
  color: var(--esg-primary-dark);
}

.esg-settings-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 10px 0 16px;
}

.esg-settings-role-row label {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.esg-settings-save-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.esg-settings-save-row button {
  background: var(--esg-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-settings-save-row button:hover {
  background: var(--esg-primary-dark);
}

.esg-settings-grid {
  overflow-x: auto;
  display: block;
}

.esg-settings-add-def {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--esg-primary-soft);
  border-radius: var(--esg-radius-md);
}

.esg-settings-add-def input,
.esg-settings-add-def select {
  padding: 6px 8px;
  border: 1px solid var(--esg-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
}

.esg-settings-add-def button {
  background: var(--esg-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-settings-add-def button:hover {
  background: var(--esg-primary-dark);
}

.esg-def-delete {
  background: none;
  border: 1px solid var(--esg-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: #b3402a;
  cursor: pointer;
}

.esg-def-delete:hover {
  background: #fdeeea;
}

.esg-attach-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--esg-ink-faint);
}

.esg-history-reason {
  font-size: 12px;
  color: var(--esg-ink-soft);
  margin-top: 2px;
}

.esg-reason-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 24, 0.35);
  z-index: 400;
}

.esg-reason-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 401;
  background: #fff;
  border-radius: var(--esg-radius-lg);
  box-shadow: var(--esg-shadow);
  width: min(420px, 90vw);
  padding: 20px;
}

.esg-reason-modal h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--esg-ink);
}

.esg-reason-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

.esg-reason-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.esg-reason-actions button {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-reason-skip {
  background: var(--esg-primary-soft);
  color: var(--esg-ink-soft);
}

.esg-reason-skip:hover {
  background: var(--esg-border);
}

.esg-reason-confirm {
  background: var(--esg-primary);
  color: #fff;
}

.esg-reason-confirm:hover {
  background: var(--esg-primary-dark);
}

.esg-site-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}

.esg-site-checkboxes label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  white-space: nowrap;
}

.esg-kpi-dashboard input[type="checkbox"] {
  accent-color: var(--esg-primary);
}

.esg-col-activity-narrow {
  min-width: 30px;
  white-space: narrow;
  font-size: 11.5px;
}

.esg-col-status {
  min-width: 50px;
  max-width: 120px;
}

.esg-status-select {
  width: 120px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: narrow;
  font-size: 12px;
  padding: 1px;
}

.esg-notif-btn {
  position: fixed;
  top: 150px;
  right: 76px;
  z-index: 200;
  width: 42px;
  height: 42px;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--esg-border);
  background: #fff;
  color: var(--esg-primary-dark);
  cursor: pointer;
  box-shadow: var(--esg-shadow);
}

.esg-notif-btn:hover {
  background: var(--esg-primary-soft);
}

.esg-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #b3402a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

@media (max-width: 782px) {
  .esg-notif-btn { top: 64px; }
}

.esg-notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 24, 0.35);
  z-index: 300;
}

.esg-notif-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 301;
  background: #fff;
  border-radius: var(--esg-radius-lg);
  box-shadow: var(--esg-shadow);
  width: min(480px, 92vw);
  max-height: 75vh;
  overflow-y: auto;
  padding: 20px;
}

.esg-notif-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esg-notif-item {
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  padding: 10px 12px 14px 22px;;
  background: var(--esg-primary-soft);
}

.esg-notif-msg {
  font-size: 12.5px;
  color: var(--esg-ink);
  margin: 8px 0;
  line-height: 1.5;
}

.esg-notif-top {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.esg-notif-where {
  font-size: 11px;
  color: var(--esg-ink-faint);
  font-weight: 600;
}

.esg-notif-msg {
  font-size: 12.5px;
  color: var(--esg-ink);
  margin: 6px 0;
}

.esg-notif-meta {
  font-size: 11px;
  color: var(--esg-ink-faint);
}

.esg-notif-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.esg-notif-actions button {
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.esg-notif-jump {
  background: var(--esg-primary);
  color: #fff;
}

.esg-notif-jump:hover {
  background: var(--esg-primary-dark);
}

.esg-notif-dismiss {
  background: #fff;
  border: 1px solid var(--esg-border) !important;
  color: var(--esg-ink-soft);
}

.esg-notif-dismiss:hover {
  color: #b3402a;
}

.esg-notif-list,
.esg-notif-list > li {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.esg-notif-list li::marker {
  content: none !important;
}

.esg-notif-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex-shrink: 0;
}

.esg-settings-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex-shrink: 0;
}

.esg-status-ring-fixed {
  position: fixed;
  top: 150px;
  right: 128px;
  z-index: 200;
}

@media (max-width: 782px) {
  .esg-status-ring-fixed { top: 64px; }
}

.esg-status-ring-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--esg-border);
  box-shadow: var(--esg-shadow);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.esg-status-ring-btn::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
}

.esg-status-ring-fixed:hover .esg-status-ring-btn {
  transform: scale(1.3);
}

.esg-status-ring-tooltip {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 250;
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: var(--esg-radius-sm);
  box-shadow: var(--esg-shadow);
  padding: 10px 14px;
  min-width: 240px;
  font-size: 12.5px;
}

.esg-status-ring-fixed:hover .esg-status-ring-tooltip {
  display: block;
}

.esg-status-ring-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--esg-ink);
}

.esg-status-ring-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: var(--esg-ink-soft);
}

.esg-ring-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.esg-ring-red { background: #dc2626; }
.esg-ring-yellow { background: #eab308; }
.esg-ring-green { background: #16a34a; }
.esg-ring-grey { background: #9ca3af; }


.esg-status-ring-tooltip-wide {
  min-width: 280px;
  max-height: 320px;
  overflow-y: auto;
}

.esg-status-ring-divider {
  border-top: 1px solid var(--esg-border);
  margin: 8px 0;
}

.esg-status-ring-sitelist {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.esg-status-ring-site-name {
  color: var(--esg-ink);
  font-weight: 600;
}

.esg-status-ring-site-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  padding: 4px 0;
  gap: 10px;
}

.esg-status-ring-site-name {
  color: var(--esg-ink);
  font-weight: 600;
  flex-shrink: 0;
}

.esg-status-ring-site-counts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.esg-status-ring-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--esg-ink-soft);
  font-variant-numeric: tabular-nums;
}

.esg-status-ring-pct {
  color: var(--esg-ink-faint);
  font-size: 10px;
}

.esg-history-dot-edit {
  background: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.esg-comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.esg-comment-actions button {
  border: none !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer;
  font-family: inherit !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
}

.esg-reply-toggle {
  background: var(--esg-primary-soft) !important;
  color: var(--esg-primary-dark) !important;
}

.esg-reply-toggle:hover {
  background: var(--esg-primary-light) !important;
}

.esg-comment-edit-toggle {
  background: #eef2ff !important;
  color: #2563eb !important;
}

.esg-comment-edit-toggle:hover {
  background: #dbeafe !important;
}

.esg-comment-delete {
  background: #fdeeea !important;
  color: #b3402a !important;
}

.esg-comment-delete:hover {
  background: #fbdcd2 !important;
}

.esg-comment-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.esg-comment-edit-actions button {
  border: none !important;
  border-radius: 999px !important;
  padding: 5px 14px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  cursor: pointer;
  font-family: inherit !important;
  box-shadow: none !important;
}

.esg-comment-edit-save {
  background: var(--esg-primary) !important;
  color: #fff !important;
}

.esg-comment-edit-save:hover {
  background: var(--esg-primary-dark) !important;
}

.esg-comment-edit-cancel {
  background: var(--esg-primary-soft) !important;
  color: var(--esg-ink-soft) !important;
}

.esg-comment-edit-cancel:hover {
  background: #eceef0 !important;
  color: var(--esg-ink) !important;
}

.esg-locked-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: var(--esg-radius-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  margin-top: 10px;
}

.esg-lock-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.esg-site-lock-toggle,
.esg-lock-toggle-btn,
.esg-lock-all-btn {
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-ink);
  cursor: pointer;
  font-family: inherit;
}

.esg-site-lock-toggle:hover,
.esg-lock-toggle-btn:hover,
.esg-lock-all-btn:hover {
  background: var(--esg-primary-light);
}

.esg-lock-status,
.esg-lock-status-cell {
  font-size: 12px;
  color: var(--esg-ink-soft);
}

.esg-toolbar-lock-btn {
  margin-left: auto;
}

.esg-locked-badge {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.esg-userlock-btn {
  position: fixed !important;
  top: 150px !important;
  right: 180px !important;
  z-index: 200 !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  border: 1px solid var(--esg-border);
  background: #fff;
  color: var(--esg-primary-dark);
  cursor: pointer;
  box-shadow: var(--esg-shadow);
}

.esg-userlock-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex-shrink: 0;
}

.esg-userlock-btn:hover {
  background: var(--esg-primary-soft);
}

@media (max-width: 782px) {
  .esg-userlock-btn { top: 64px; }
}

.esg-userlock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 24, 0.35);
  z-index: 300;
}

.esg-userlock-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 301;
  background: #fff;
  border-radius: var(--esg-radius-lg);
  box-shadow: var(--esg-shadow);
  width: min(480px, 92vw);
  max-height: 75vh;
  overflow-y: auto;
  padding: 20px;
}

.esg-doc-site-tag {
  background: var(--esg-primary-light);
  color: var(--esg-primary-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

.esg-col-documents {
  min-width: 50px;
  vertical-align: top;
}

th.esg-col-documents {
  text-align: center;
  vertical-align: middle;
}

.esg-topic-docs-toggle {
  background: #fff;
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--esg-ink-soft);
}

.esg-topic-docs-toggle:hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary-dark);
}

.esg-topic-docs-list {
  margin-top: 8px;
  text-align: left;
  font-size: 12px;
}

.esg-topic-docs-zip {
  margin-top: 6px;
  display: inline-flex;
}

.esg-lock-history-toggle {
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-ink);
  cursor: pointer;
  font-family: inherit;
}

.esg-lock-history-toggle:hover {
  background: var(--esg-primary-light);
}

.esg-lock-history-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--esg-border);
}

.esg-history-dot-comment {
  background: #16a34a;
  box-shadow: 0 0 0 1px #16a34a;
}

.esg-save-row-top {
  margin: 10px 0;
}

.esg-history-jump-btn {
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-ink);
  cursor: pointer;
  font-family: inherit;
  margin-left: 8px;
}

.esg-history-jump-btn:hover {
  background: var(--esg-primary-light);
}

.esg-save-btn-toolbar {
  order: -1;
  padding: 6px 14px !important;
  font-size: 12px !important;
}

#esg-settings-tab-users .esg-settings-table thead th,
#esg-settings-tab-roledefaults .esg-settings-table thead th,
#esg-settings-tab-locks .esg-settings-table thead th {
  position: sticky;
  top: 0;
  background: var(--esg-primary-soft);
  z-index: 5;
}

.esg-lock-log-download-row {
  margin-bottom: 18px;
}

.esg-locks-history-btn-row {
  margin-bottom: 18px;
}

.esg-lock-view-btn {
  background: var(--esg-primary-soft);
  border: 1px solid var(--esg-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-ink);
  cursor: pointer;
  font-family: inherit;
}

.esg-lock-view-btn:hover {
  background: var(--esg-primary-light);
}

.esg-lock-view-btn.is-active {
  background: var(--esg-primary);
  border-color: var(--esg-primary);
  color: #fff;
}