/* ERCA Statistical System - application chrome (maquettes M-02..M-34)
   #007F4B institutional | #0D8A57 secondary | #E9F5EF tint | #FFD500 gold | #8D1D36 alert */

:root { accent-color: #007F4B; }

/* ---------- primary buttons (M-03 Modifier, M-07 Actualiser...) ---------- */
button.primary,
[data-test="dhis2-uicore-button"].primary {
  background: #007F4B !important;
  background-color: #007F4B !important;
  border-color: #00693F !important;
  color: #fff !important;
}
button.primary:hover,
[data-test="dhis2-uicore-button"].primary:hover {
  background: #00693F !important;
  background-color: #00693F !important;
  border-color: #005633 !important;
}
button.primary:active, button.primary:focus,
[data-test="dhis2-uicore-button"].primary:active,
[data-test="dhis2-uicore-button"].primary:focus {
  background: #005C39 !important;
  background-color: #005C39 !important;
  border-color: #00482C !important;
  box-shadow: 0 0 0 3px rgba(0,127,75,.25) !important;
}
button.destructive,
[data-test="dhis2-uicore-button"].destructive {
  background: #8D1D36 !important; background-color: #8D1D36 !important;
  border-color: #741226 !important; color: #fff !important;
}

/* ---------- data tables: light-green headers, dark-green text (M-07) ---------- */
[data-test="dhis2-uicore-datatablecellhead"],
th[data-test*="datatablecellhead"],
.pivot-table thead th, table thead th[role="columnheader"] {
  background-color: #E9F5EF !important;
  color: #00693F !important;
}

/* ---------- selected navigation / menu items (M-07 sidebar) ---------- */
[data-test="dhis2-uicore-menuitem"] a:hover,
[data-test="dhis2-uicore-menuitem"].active a,
li[data-test="dhis2-uicore-menuitem"]:hover > a {
  background-color: #E9F5EF !important;
  color: #007F4B !important;
}

/* ---------- tabs: active = green (charte: elements actifs) ---------- */
[data-test="dhis2-uicore-tab"].selected,
button[data-test="dhis2-uicore-tab"][aria-selected="true"] {
  color: #007F4B !important;
}
[data-test="dhis2-uicore-tab"].selected::after,
button.selected::after {
  background-color: #007F4B !important;
}

/* ---------- chips (M-03 dashboard bar: active chip solid green) ---------- */
[data-test="dhis2-uicore-chip"].selected,
[data-test="dashboard-chip"].selected,
div[class*="selectedChip"] {
  background-color: #007F4B !important;
  color: #fff !important;
}

/* ---------- links in app content ---------- */
main a:not([class*="button"]):not(.no-erca), .app a:not([class*="button"]) {
  color: #0D8A57;
}

/* ---------- switches / checkboxes / radios: checked = green ---------- */
input[type="checkbox"], input[type="radio"] { accent-color: #007F4B; }
[data-test="dhis2-uicore-switch"] input:checked ~ *,
[data-test="dhis2-uicore-checkbox"] input:checked + * {
  background-color: #007F4B !important;
  border-color: #00693F !important;
}

/* ---------- focus ring ---------- */
[data-test^="dhis2-uicore"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-color: #007F4B !important;
}

/* ---------- loaders / progress ---------- */
[data-test="dhis2-uicore-circularloader"] circle { stroke: #007F4B !important; }
progress { accent-color: #007F4B; }

/* ---------- header bar refinements (M-02 / M-03) ---------- */
/* white rounded emblem tile on the left, like the login bar */
[data-test="headerbar-logo"] a {
  background: #fff !important;
  border-radius: 8px !important;
  padding: 3px !important;
  margin: 5px 6px 5px 10px !important;
  display: flex !important;
  align-items: center !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.28);
}
[data-test="headerbar-logo"] img,
img[alt="Headerbar Logo"] {
  max-height: 32px !important;
  width: auto !important;
}

/* title: bold institutional lettering, no shadow */
[data-test="headerbar-title"] {
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: .2px;
  text-shadow: none !important;
}

/* online status as a soft pill (mockup "En ligne") */
[data-test="headerbar-online-status"] {
  background: rgba(255,255,255,.18) !important;
  border-radius: 14px !important;
  padding: 2px 10px !important;
}
[data-test="headerbar-online-status"] .info { color: #fff !important; }

/* message / interpretation counters: institutional gold (mockup badge) */
span[data-test="headerbar-messages-count"],
span[data-test="headerbar-interpretations-count"],
span[data-test="headerbar-notifications-count"] {
  background-color: #FFD500 !important;
  color: #212529 !important;
  font-weight: 700 !important;
}

/* profile avatar: white circle, institutional green initials (mockup "AD") */
[data-test="headerbar-profile"] .text-avatar-initials {
  background-color: #fff !important;
  color: #007F4B !important;
  font-weight: 700 !important;
}
[data-test="headerbar-profile"] img {
  background: #fff;
  border-radius: 50%;
}
