.reports-tab { padding: 0; height: 100%; display: flex; flex-direction: column; }

.reports-toolbar {
  display: flex; gap: .7rem; align-items: center;
  padding: .55rem .9rem;
  background: rgba(24, 24, 27, .22);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  flex-wrap: wrap;
  backdrop-filter: blur(24px) saturate(180%);
}
.reports-toolbar label { font-size: .82rem; color: #d4d4d8; display: flex; align-items: center; gap: .3rem; }
.reports-toolbar input[type="search"], .reports-toolbar select, .reports-toolbar button {
  background: rgba(39, 39, 42, .45); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px; padding: .25rem .55rem; font-size: .82rem;
}
.reports-toolbar input[type="search"] { min-width: 220px; font-family: inherit; }
.reports-toolbar .reports-stats {
  margin-left: auto;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .8rem; font-weight: 600;
  display: flex; gap: .4rem;
}

/* ===== Layout sidebar + main ===== */
.reports-layout { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; transition: grid-template-columns .2s; }
.reports-layout.sidebar-hidden { grid-template-columns: 0 1fr; }
.reports-layout.sidebar-hidden #rep-sidebar { visibility: hidden; border-right: none; }

#rep-sidebar {
  background: rgba(20, 20, 23, .25);
  border-right: 1px solid rgba(255, 255, 255, .1);
  overflow-y: auto;
  backdrop-filter: blur(24px) saturate(180%);
}
#rep-tree { list-style: none; margin: 0; padding: .35rem 0; }
/* item: chrome hérité de .tree-cat (UI-TREE point 14) ; enfants .rt-* locaux */
#rep-tree .rep-tree-cat.active .rt-label { color: var(--p-base); font-weight: 500; }
#rep-tree .rt-icon { color: var(--p-light); flex-shrink: 0; display: inline-flex; align-items: center; }
#rep-tree .rep-tree-cat.active .rt-icon { color: var(--p-base); }
#rep-tree .rt-label { color: var(--p-light); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rep-tree .rt-badges { display: flex; gap: .22rem; align-items: center; flex-shrink: 0; }
#rep-tree .rt-b {
  font-size: .6rem; font-weight: 700;
  padding: .05rem .32rem; border-radius: 3px; border: 1px solid;
  min-width: 18px; text-align: center; line-height: 1.2;
  font-family: 'Menlo','Consolas',monospace;
}
#rep-tree .rt-b.error { color: var(--v2); border-color: var(--v2); background: rgba(var(--v2-rgb),.12); }
#rep-tree .rt-b.ok    { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb),.1); }
#rep-tree .rt-count   { color: #64748b; font-size: .7rem; font-family: 'Menlo','Consolas',monospace; }

#rep-main { display: flex; flex-direction: column; background: transparent; position: relative; overflow: hidden; min-height: 0; }

#rep-list { flex: 1; overflow-y: auto; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .5rem; }
.reports-empty { color: #64748b; font-style: italic; padding: 1rem; text-align: center; }

/* ===== Card rapport — chrome .card-pri (ref design Vincent 2026-04-29)
   Idem Tasks : inactivé p-base .5 / activé non-running p-base / running vert pulsé.
   s-error → rouge alarm. ===== */
/* UI-CARDPRI: chrome hérite de .card-pri, on ne garde que le layout local */
.rep-card {
  padding: .55rem .8rem;
  display: grid;
  grid-template-columns: auto 32px auto auto auto 1fr auto auto auto;
  gap: .55rem;
  align-items: center;
}
.rep-card.disabled  { opacity: .5; }
.rep-card.s-ok      { /* dernière exec OK = baseline activé = p-base plein (default) */ }
.rep-card.s-error   { --card-rgb: var(--c-state-alarm-rgb); }
.rep-card.s-running { --card-rgb: var(--c-state-notif-rgb); animation: card-pulse 1.6s ease-in-out infinite; box-shadow: 0 0 12px rgba(var(--card-rgb), .25); }

.rep-card .rep-icon { font-size: 1.1rem; text-align: center; }
.rep-card .rep-state {
  font-size: .62rem; padding: .1rem .4rem; border-radius: 3px; font-weight: 700;
  font-family: 'Menlo','Consolas',monospace; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid;
}
.rep-card .rep-state.ok       { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb), .1); }
.rep-card .rep-state.error    { color: var(--v2); border-color: var(--v2); background: rgba(var(--v2-rgb), .12); }
.rep-card .rep-state.idle     { color: #94a3b8; border-color: #64748b; background: rgba(100, 116, 139, .1); }
.rep-card .rep-state.running  { color: var(--p-base); border-color: var(--p-base); background: rgba(var(--p-base-rgb), .12); }
.rep-card .rep-cat {
  font-size: .62rem; padding: .1rem .4rem; border-radius: 3px;
  color: var(--p-light); border: 1px solid rgba(var(--p-light-rgb), .35);
  font-family: 'Menlo','Consolas',monospace; text-transform: uppercase; letter-spacing: .04em;
}
.rep-card .rep-ref {
  font-family: 'Menlo','Consolas',monospace; font-size: .7rem; color: #64748b;
  padding: .1rem .35rem; border: 1px solid rgba(255, 255, 255, .08); border-radius: 3px;
}
.rep-card .rep-title { color: #e4e4e7; font-weight: 500; font-size: .92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-card .rep-meta { color: #94a3b8; font-size: .72rem; font-family: 'Menlo','Consolas',monospace; }
.rep-card .rep-meta .l { color: #64748b; margin-right: .25rem; text-transform: uppercase; font-size: .62rem; }
.rep-card .rep-actions { display: flex; gap: .35rem; flex-shrink: 0; align-items: center; }
/* icônes preview/pdf/edit → standard global .icon-action-btn ; « Générer » reste bouton texte */
.rep-card .rep-actions .icon-action-btn { width: 24px; height: 24px; }
.rep-card .rep-actions button:not(.icon-action-btn) {
  background: rgba(39, 39, 42, .55); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 4px;
  padding: .22rem .55rem; font-size: .75rem; cursor: pointer;
}
.rep-card .rep-actions button:not(.icon-action-btn):hover:not(:disabled) { background: rgba(63, 63, 70, .7); border-color: rgba(var(--p-base-rgb), .4); }
.rep-card .rep-actions button:not(.icon-action-btn):disabled { opacity: .4; cursor: not-allowed; }
.rep-card .rep-actions button.primary {
  background: linear-gradient(135deg, rgba(var(--p-base-rgb), .85), rgba(var(--p-glow-rgb), .75));
  color: var(--p-text-on); border-color: rgba(var(--p-soft-rgb), .8); font-weight: 600;
}

/* ===== Toggle switch activation/desactivation rapport (clone du pattern tasks) ===== */

/* ============================================================================
   STANDARD TOOLBAR — uniforme reference Biometrie sante (Vincent 2026-05-10)
   Zone figee (min-height 3.15rem) + controls cohérents (bg .45, radius 6, h 28).
   ============================================================================ */
.reports-toolbar {
  min-height: 3.15rem !important;
  box-sizing: border-box !important;
}
.reports-toolbar input[type="search"],
.reports-toolbar input[type="text"],
.reports-toolbar input[type="date"],
.reports-toolbar input[type="number"],
.reports-toolbar select,
.reports-toolbar button.t-btn {
  background: rgba(39, 39, 42, .45);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: .22rem .55rem;
  font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace;
  height: 28px;
  box-sizing: border-box;
  line-height: 1.2;
}
.reports-toolbar button.t-btn:hover:not(:disabled) {
  background: rgba(var(--p-base-rgb), .18);
  color: var(--p-base);
  border-color: rgba(var(--p-base-rgb), .35);
}
.reports-toolbar label {
  font-size: .82rem;
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  line-height: 1.2;
}

/* ---- Onglet MATRICE (2026-07-27) ---- */
.mx-help { font-size: .78rem; color: #94a3b8; line-height: 1.5; margin: 0 0 .7rem; }
.mx-grip-inline { color: var(--p-accent, #eab308); }
.mx-wrap { overflow-x: auto; }
.mx-tab { width: 100%; border-collapse: collapse; font-size: .78rem; }
.mx-tab th { text-align: left; font-weight: 600; color: #94a3b8; padding: .3rem .4rem;
  border-bottom: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.mx-tab td { padding: .25rem .4rem; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.mx-th-grip { width: 18px; } .mx-th-lbl { min-width: 220px; } .mx-th-syn { width: 96px; }
.mx-grip { cursor: grab; color: #52525b; user-select: none; text-align: center; }
.mx-grip:active { cursor: grabbing; }
.mx-row-off { opacity: .45; }
.mx-lbl { display: flex; align-items: center; gap: .35rem; }
.mx-label { flex: 1; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  color: var(--p-fg, #e4e4e7); border-radius: 3px; padding: .18rem .35rem; font-size: .78rem; min-width: 150px; }
.mx-desc { color: #64748b; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.mx-cell select { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  color: var(--p-fg, #e4e4e7); border-radius: 3px; font-size: .72rem; padding: .12rem .2rem; }
.mx-cell.off select.mx-agg { opacity: .35; }
.mx-cell .mx-agg { margin-left: .15rem; }
.mx-del { background: none; border: none; color: #64748b; cursor: pointer; font-size: 1rem; line-height: 1; }
.mx-del:hover { color: #f87171; }
.mx-dragging { opacity: .4; }
.mx-over td { border-top: 2px solid var(--p-accent, #eab308); }
.mx-actions { margin: .6rem 0; }
.mx-h { font-size: .82rem; color: var(--p-fg, #e4e4e7); margin: 1.1rem 0 .5rem;
  border-top: 1px solid rgba(255,255,255,.10); padding-top: .7rem; }
.mx-cad-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-size: .78rem; flex-wrap: wrap; }
.mx-cad-on { display: flex; align-items: center; gap: .3rem; min-width: 120px; }
.mx-cad-row select, .mx-cad-row input { background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10); color: var(--p-fg, #e4e4e7); border-radius: 3px;
  padding: .15rem .3rem; font-size: .75rem; }
.mx-cad-day { width: 56px; }
.mx-cad-next { color: #64748b; font-size: .72rem; margin-left: auto; }

.mx-err{color:#f87171;font-size:.78rem;padding:.6rem;text-align:center;}
.mx-empty{color:#64748b;font-size:.78rem;padding:.6rem;text-align:center;font-style:italic;}

/* ---- Bandeau des cadences d'un rapport matriciel (2026-07-27) ---- */
/* [hidden] ne masque pas un display:flex sans !important (standard Vincent) :
   sans cette regle, le bandeau vide occupait une 2e ligne dans chaque carte. */
.cad-when { color: #64748b; font-size: .68rem; }
