/* Moyo EPI — système visuel */
:root {
  --moyo-navy: #0f2a44;
  --moyo-navy-2: #16395c;
  --moyo-accent: #0e9f8a;
  --moyo-red: #c0392b;
  --moyo-orange: #e67e22;
  --moyo-yellow: #f1c40f;
  --moyo-bg: #f3f5f8;
  --moyo-card: #ffffff;
  --moyo-border: #e3e8ef;
  --moyo-muted: #6b7a8c;
  --moyo-text: #1b2733;
  --sidebar-w: 262px;
}
[data-bs-theme="dark"] {
  --moyo-bg: #0f1720;
  --moyo-card: #16212c;
  --moyo-border: #243342;
  --moyo-muted: #93a4b6;
  --moyo-text: #e6edf3;
}
body { background: var(--moyo-bg); color: var(--moyo-text); font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .92rem; }
a { text-decoration: none; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, var(--moyo-navy), #0b2033); color: #cfe0ef; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1030; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; color: #fff; font-weight: 700; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--moyo-accent); display: grid; place-items: center; font-size: 1.1rem; }
.sidebar .brand small { display: block; font-weight: 400; font-size: .68rem; color: #8fb2cf; letter-spacing: .02em; }
.sidebar .nav-section { font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; color: #7f9db8; padding: .9rem 1.2rem .3rem; }
.sidebar .nav-link { color: #cfe0ef; padding: .38rem 1.2rem; display: flex; align-items: center; gap: .6rem; border-left: 3px solid transparent; font-size: .87rem; }
.sidebar .nav-link i { font-size: 1rem; width: 1.1rem; text-align: center; opacity: .85; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar .nav-link.active { background: rgba(14,159,138,.16); color: #fff; border-left-color: var(--moyo-accent); }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--moyo-card); border-bottom: 1px solid var(--moyo-border); padding: .55rem 1.2rem; display: flex; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 1020; }
.topbar .outbreak-pill { background: rgba(192,57,43,.08); color: var(--moyo-red); border: 1px solid rgba(192,57,43,.25); border-radius: 999px; padding: .2rem .7rem; font-weight: 600; font-size: .8rem; }
.content { padding: 1.2rem 1.4rem 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--moyo-muted); font-size: .84rem; margin-top: .15rem; }
.card { background: var(--moyo-card); border: 1px solid var(--moyo-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(15,42,68,.04); }
.card-header { background: transparent; border-bottom: 1px solid var(--moyo-border); font-weight: 600; padding: .7rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-header .hint { font-weight: 400; color: var(--moyo-muted); font-size: .78rem; }
.kpi { padding: .9rem 1rem; height: 100%; position: relative; overflow: hidden; }
.kpi .label { color: var(--moyo-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi .value { font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: .78rem; color: var(--moyo-muted); }
.kpi .icon { position: absolute; right: .8rem; top: .8rem; font-size: 1.4rem; opacity: .18; }
.kpi.red .value { color: var(--moyo-red); } .kpi.orange .value { color: var(--moyo-orange); } .kpi.teal .value { color: var(--moyo-accent); }
.chart { width: 100%; height: 320px; }
.chart.sm { height: 220px; } .chart.lg { height: 420px; }
.map { width: 100%; height: 440px; border-radius: 10px; }
.map.full { height: calc(100vh - 170px); min-height: 520px; }
.table { --bs-table-bg: transparent; font-size: .86rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--moyo-muted); font-weight: 600; border-bottom-width: 1px; white-space: nowrap; }
.table-hover tbody tr:hover { background: rgba(14,159,138,.05); }
.form-section { margin-bottom: 1rem; }
.form-section > .card-header { background: rgba(15,42,68,.03); }
.form-label { font-weight: 600; font-size: .8rem; margin-bottom: .2rem; }
.form-text { font-size: .74rem; }
.symptom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .3rem 1.2rem; }
.symptom-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem 0; border-bottom: 1px dashed var(--moyo-border); }
.symptom-row .lbl { font-size: .82rem; }
.yni .btn { padding: .05rem .45rem; font-size: .72rem; }
.badge { font-weight: 600; }
.status-ok { color: #198754; } .status-warn { color: #d39e00; } .status-bad { color: var(--moyo-red); }
.kpi-dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.kpi-dot.ok { background: #198754; } .kpi-dot.warn { background: #ffc107; } .kpi-dot.bad { background: var(--moyo-red); } .kpi-dot.na { background: #adb5bd; }
.grid21 td, .grid21 th { padding: .15rem .25rem !important; text-align: center; font-size: .75rem; min-width: 26px; }
.grid21 .cell { cursor: pointer; border-radius: 4px; font-weight: 700; display: block; min-height: 22px; line-height: 22px; }
.grid21 .cell.c-X { background: #d1e7dd; color: #0f5132; } .grid21 .cell.c-0 { background: #f8d7da; color: #842029; }
.grid21 .cell.c-1 { background: #ffe5d0; color: #984c0c; } .grid21 .cell.c-2 { background: #212529; color: #fff; }
.grid21 .cell.c-D { background: #e2d9f3; color: #432874; } .grid21 .cell.c-3 { background: var(--moyo-red); color: #fff; }
.grid21 .cell.c-R { background: #cff4fc; color: #055160; } .grid21 .cell.future { background: repeating-linear-gradient(45deg, transparent 0 4px, rgba(0,0,0,.04) 4px 8px); cursor: default; }
.timeline { position: relative; padding-left: 1.6rem; }
.timeline:before { content: ""; position: absolute; left: .55rem; top: 0; bottom: 0; width: 2px; background: var(--moyo-border); }
.timeline .ev { position: relative; margin-bottom: .9rem; }
.timeline .ev .dot { position: absolute; left: -1.35rem; top: .15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; color: #fff; }
.help-callout { background: rgba(14,159,138,.07); border: 1px solid rgba(14,159,138,.25); border-radius: 10px; padding: .6rem .9rem; font-size: .82rem; }
.legend-sq { width: .8rem; height: .8rem; display: inline-block; border-radius: 3px; vertical-align: middle; margin-right: .25rem; }
.heat-cell { text-align: center; font-weight: 600; font-size: .78rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--moyo-card); border-top: 1px solid var(--moyo-border); padding: .7rem 1rem; z-index: 5; border-radius: 0 0 12px 12px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #16395c, #0b2033 60%); }
.login-card { width: 100%; max-width: 420px; }
.orgunit-search { margin-bottom: .25rem; }
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
}
@media print {
  .sidebar, .topbar, .no-print, .btn { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
