.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; }
#rep-tree .rep-tree-cat {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .85rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  transition: background .12s;
  font-size: .82rem;
}
#rep-tree .rep-tree-cat:hover { background: rgba(var(--p-base-rgb), .07); }
#rep-tree .rep-tree-cat.active {
  background: rgba(var(--p-glow-rgb), .12);
  box-shadow: inset 2px 0 0 var(--p-base);
}
#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: #e4e4e7; 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-main .sidebar-handle {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 64px;
  background: rgba(39, 39, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08); border-left: none;
  border-radius: 0 6px 6px 0;
  color: var(--p-light);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem; line-height: 1; padding: 0; z-index: 10;
  backdrop-filter: blur(15px);
}
#rep-main .sidebar-handle:hover { background: rgba(var(--p-base-rgb), .18); color: var(--p-base); }

#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. ===== */
.rep-card {
  --card-rgb: var(--p-base-rgb);
  border-radius: 8px;
  border-top:    1px solid rgba(var(--card-rgb), .4);
  border-right:  1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left:   2px solid rgba(var(--card-rgb), .9);
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb), .1) 0%, rgba(var(--card-rgb), .03) 50%, rgba(24, 24, 27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: inset 8px 0 14px -8px rgba(var(--card-rgb), .55), inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 18px rgba(0, 0, 0, .28);
  padding: .55rem .8rem;
  display: grid;
  grid-template-columns: 36px 32px auto auto auto 1fr auto auto auto;
  gap: .55rem;
  align-items: center;
  transition: opacity .2s, border-color .2s, box-shadow .2s;
}
.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: .25rem; flex-shrink: 0; }
.rep-card .rep-actions button {
  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:hover:not(:disabled) { background: rgba(63, 63, 70, .7); border-color: rgba(var(--p-base-rgb), .4); }
.rep-card .rep-actions button: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) ===== */
.rep-toggle {
  -webkit-appearance: none; appearance: none;
  background: transparent; border: none; padding: 0;
  cursor: pointer;
  display: inline-flex; align-items: center;
  width: 32px; height: 18px;
  outline: none;
  margin-right: .25rem;
}
.rep-toggle .tg-track {
  position: relative;
  width: 32px; height: 18px;
  border-radius: 999px;
  background: rgba(24, 24, 27, .65);
  border: 1px solid rgba(100, 116, 139, .45);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.rep-toggle .tg-knob {
  position: absolute;
  top: 50%; left: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #64748b;
  transform: translateY(-50%);
  transition: left .18s cubic-bezier(.4, 0, .2, 1), background .18s, box-shadow .18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.rep-toggle.on .tg-track {
  background: linear-gradient(135deg, rgba(var(--p-base-rgb), .35), rgba(var(--p-glow-rgb), .22));
  border-color: var(--p-base);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 0 6px rgba(var(--p-glow-rgb), .35);
}
.rep-toggle.on .tg-knob {
  left: 17px;
  background: var(--p-base);
  box-shadow: 0 0 6px rgba(var(--p-glow-rgb), .7), 0 1px 2px rgba(0, 0, 0, .4);
}
.rep-toggle:hover:not(:disabled) .tg-track { border-color: rgba(var(--p-base-rgb), .7); }
.rep-toggle:hover:not(:disabled).on .tg-track { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 0 10px rgba(var(--p-glow-rgb), .55); }
.rep-toggle:focus-visible .tg-track { box-shadow: 0 0 0 2px rgba(var(--p-base-rgb), .4); }
.rep-toggle:active .tg-knob { width: 14px; }

/* ============================================================================
   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;
}
