/* Composant Statistique EDC UEMOA - application chrome (maquettes M-02..M-34)
   #00519E institutionnel | #105DA5 secondaire | #E8F0F9 teinte | #FFD500 or | #A91101 alerte | #1FA22E succes */

:root { accent-color: #00519E; }

/* ---------- primary buttons ---------- */
button.primary,
[data-test="dhis2-uicore-button"].primary {
  background: #00519E !important; background-color: #00519E !important;
  border-color: #003B75 !important; color: #fff !important;
}
button.primary:hover,
[data-test="dhis2-uicore-button"].primary:hover {
  background: #003B75 !important; background-color: #003B75 !important; border-color: #002B57 !important;
}
button.primary:active, button.primary:focus,
[data-test="dhis2-uicore-button"].primary:active,
[data-test="dhis2-uicore-button"].primary:focus {
  background: #003468 !important; background-color: #003468 !important; border-color: #002B57 !important;
  box-shadow: 0 0 0 3px rgba(0,81,158,.25) !important;
}
button.destructive,
[data-test="dhis2-uicore-button"].destructive {
  background: #A91101 !important; background-color: #A91101 !important;
  border-color: #8A0E01 !important; color: #fff !important;
}

/* ---------- data tables: tinted headers, institutional-blue text ---------- */
[data-test="dhis2-uicore-datatablecellhead"],
th[data-test*="datatablecellhead"],
.pivot-table thead th, table thead th[role="columnheader"] {
  background-color: #E8F0F9 !important;
  color: #00519E !important;
}

/* ---------- selected navigation / menu items ---------- */
[data-test="dhis2-uicore-menuitem"] a:hover,
[data-test="dhis2-uicore-menuitem"].active a,
li[data-test="dhis2-uicore-menuitem"]:hover > a {
  background-color: #E8F0F9 !important; color: #00519E !important;
}

/* ---------- tabs ---------- */
[data-test="dhis2-uicore-tab"].selected,
button[data-test="dhis2-uicore-tab"][aria-selected="true"] { color: #00519E !important; }
[data-test="dhis2-uicore-tab"].selected::after, button.selected::after { background-color: #00519E !important; }

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

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

/* ---------- switches / checkboxes / radios ---------- */
input[type="checkbox"], input[type="radio"] { accent-color: #00519E; }
[data-test="dhis2-uicore-switch"] input:checked ~ *,
[data-test="dhis2-uicore-checkbox"] input:checked + * {
  background-color: #00519E !important; border-color: #003B75 !important;
}

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

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

/* ---------- header bar refinements (M-02 / M-03) ---------- */
[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; }
[data-test="headerbar-title"] { font-weight: 600 !important; font-size: 15px !important; letter-spacing: .2px; text-shadow: none !important; }
[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 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-blue initials */
[data-test="headerbar-profile"] .text-avatar-initials { background-color: #fff !important; color: #00519E !important; font-weight: 700 !important; }
[data-test="headerbar-profile"] img { background: #fff; border-radius: 50%; }

/* no product/version line in the header bar or command palette */
[data-test="dhis2-ui-headerbar-instanceinfo"], .instance-info { display: none !important; }
