/* ═══════════════════════════════════════════════════════════════════════════
   admin-activations-v9.css — Onglet Activations admin v9
   Style cible : Linear / DataDog / Vercel. Tableau heartbeat-aware desktop,
   cards stackées mobile-first, status dots animés, timeline SVG 24h.
   Branding : rouge Suisse #DC2626, Inter / Instrument Serif / JetBrains Mono.
   Scope : classes prefixees .act-* + .act-detail-* + .act-status-*. Zero conflit.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --act-bg: rgba(15, 23, 42, 0.62);
  --act-bg-deeper: rgba(10, 15, 30, 0.78);
  --act-bg-soft: rgba(255, 255, 255, 0.025);
  --act-border: rgba(255, 255, 255, 0.08);
  --act-border-hover: rgba(220, 38, 38, 0.35);
  --act-border-strong: rgba(255, 255, 255, 0.14);
  --act-text: #f1f5f9;
  --act-text-dim: rgba(241, 245, 249, 0.66);
  --act-text-muted: rgba(241, 245, 249, 0.42);
  --act-accent: #DC2626;
  --act-accent-soft: rgba(220, 38, 38, 0.14);
  --act-accent-glow: rgba(220, 38, 38, 0.45);
  --act-online: #10b981;
  --act-online-soft: rgba(16, 185, 129, 0.18);
  --act-online-glow: rgba(16, 185, 129, 0.55);
  --act-offline: #64748b;
  --act-offline-soft: rgba(100, 116, 139, 0.15);
  --act-warn: #f59e0b;
  --act-warn-soft: rgba(245, 158, 11, 0.16);
  --act-danger: #ef4444;
  --act-danger-soft: rgba(239, 68, 68, 0.16);
  --act-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --act-serif: 'Instrument Serif', 'Times New Roman', serif;
  --act-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── PAGE WRAPPER ─────────────────────────────────────────────────────── */
.act-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--act-sans);
  color: var(--act-text);
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ─── PAGE HEADER ──────────────────────────────────────────────────────── */
.act-pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(15, 23, 42, 0.55));
  border: 1px solid var(--act-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}
.act-pagehead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(720px 220px at 0% 0%, rgba(220, 38, 38, 0.18), transparent 60%);
  pointer-events: none;
}
.act-pagehead-title {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.act-pagehead-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(220, 38, 38, 0.08));
  border: 1px solid var(--act-border-hover);
  display: grid;
  place-items: center;
  color: var(--act-accent);
  font-size: 18px;
  box-shadow: 0 4px 18px var(--act-accent-glow);
}
.act-pagehead h2 {
  font-family: var(--act-serif);
  font-size: 26px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}
.act-pagehead-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--act-mono);
  font-size: 12px;
  color: var(--act-text-dim);
  margin-top: 2px;
}
.act-pagehead-counter strong { color: var(--act-online); font-weight: 600; }
.act-pagehead-counter .act-sep { opacity: 0.4; }

.act-pagehead-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}
.act-help-fab {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--act-border-strong);
  background: var(--act-bg-soft);
  color: var(--act-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}
.act-help-fab:hover {
  border-color: var(--act-accent);
  background: var(--act-accent-soft);
  color: var(--act-accent);
  transform: translateY(-1px);
}

/* ─── TOOLBAR (search + filters + sort) ────────────────────────────────── */
.act-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 12px 14px;
  background: var(--act-bg);
  border: 1px solid var(--act-border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
}
.act-search {
  position: relative;
  display: flex;
  align-items: center;
}
.act-search i {
  position: absolute;
  left: 14px;
  color: var(--act-text-muted);
  font-size: 13px;
  pointer-events: none;
}
.act-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  font: 16px/1 var(--act-sans);
  color: var(--act-text);
  background: var(--act-bg-soft);
  border: 1px solid var(--act-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.act-search input:focus {
  border-color: var(--act-accent);
  background: rgba(220, 38, 38, 0.04);
  outline: 2px solid rgba(220, 38, 38, 0.25);
  outline-offset: 1px;
}
.act-search input::placeholder { color: var(--act-text-muted); }

.act-filter, .act-sort {
  display: flex;
  gap: 4px;
  background: var(--act-bg-soft);
  border: 1px solid var(--act-border);
  border-radius: 10px;
  padding: 4px;
  height: 44px;
  align-items: center;
}
.act-filter button, .act-sort select {
  font: 500 12px/1 var(--act-sans);
  color: var(--act-text-dim);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  padding: 0 12px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.act-filter button:hover { color: var(--act-text); background: rgba(255,255,255,0.04); }
.act-filter button.active {
  color: var(--act-text);
  background: var(--act-accent-soft);
  border: 1px solid var(--act-border-hover);
}
.act-filter button .pill {
  font-family: var(--act-mono);
  font-size: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 2px 6px;
}
.act-filter button.active .pill {
  background: var(--act-accent);
  color: white;
}
.act-sort select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'><path d='M1 1l4 4 4-4' stroke='%23DC2626' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  color: var(--act-text);
}
.act-sort select:focus { outline: 2px solid rgba(220, 38, 38, 0.25); }

/* ─── DESKTOP TABLE ────────────────────────────────────────────────────── */
.act-table-card {
  background: var(--act-bg);
  border: 1px solid var(--act-border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.act-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.act-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 920px;
}
.act-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15,23,42,0.95), rgba(15,23,42,0.82));
  backdrop-filter: blur(8px);
  font: 600 11px/1 var(--act-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--act-text-muted);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--act-border);
  white-space: nowrap;
}
.act-table thead th:first-child { padding-left: 18px; }
.act-table tbody td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  color: var(--act-text-dim);
}
.act-table tbody td:first-child { padding-left: 18px; }
.act-table tbody tr {
  transition: background 0.15s ease;
}
.act-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(220,38,38,0.04), transparent 60%);
}
.act-table tbody tr:last-child td { border-bottom: 0; }

.act-cell-email {
  color: var(--act-text);
  font-weight: 500;
}
.act-cell-email small {
  display: block;
  color: var(--act-text-muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}
.act-cell-hwid {
  font-family: var(--act-mono);
  font-size: 11px;
  color: var(--act-text-dim);
  letter-spacing: 0.02em;
  background: var(--act-bg-soft);
  padding: 3px 7px;
  border-radius: 5px;
  display: inline-block;
  border: 1px solid var(--act-border);
}
.act-cell-machine {
  color: var(--act-text);
  font-weight: 500;
}
.act-cell-machine small {
  display: block;
  color: var(--act-text-muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}
.act-cell-relative {
  font-family: var(--act-mono);
  font-size: 11px;
  color: var(--act-text-dim);
  white-space: nowrap;
}
.act-cell-relative.recent { color: var(--act-online); }
.act-cell-relative.stale { color: var(--act-warn); }
.act-cell-relative.dead { color: var(--act-text-muted); }

.act-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.act-actions .act-iconbtn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid var(--act-border);
  background: var(--act-bg-soft);
  color: var(--act-text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
}
.act-actions .act-iconbtn:hover {
  border-color: var(--act-accent);
  color: var(--act-accent);
  background: var(--act-accent-soft);
  transform: translateY(-1px);
}
.act-actions .act-iconbtn.danger:hover {
  border-color: var(--act-danger);
  color: var(--act-danger);
  background: var(--act-danger-soft);
}

/* ─── STATUS DOTS ──────────────────────────────────────────────────────── */
.act-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--act-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.act-status-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--act-offline);
  flex-shrink: 0;
}
.act-status-dot.online {
  color: var(--act-online);
}
.act-status-dot.online::before {
  background: var(--act-online);
  box-shadow: 0 0 0 0 var(--act-online-glow);
  animation: act-pulse-green 2s infinite;
}
.act-status-dot.recent {
  color: var(--act-warn);
}
.act-status-dot.recent::before {
  background: var(--act-warn);
}
.act-status-dot.offline {
  color: var(--act-offline);
}

@keyframes act-pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.65); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ─── MOBILE CARDS ─────────────────────────────────────────────────────── */
.act-cards { display: none; }

.act-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--act-bg);
  border: 1px solid var(--act-border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.act-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--act-offline);
  border-radius: 0 3px 3px 0;
}
.act-card.online::before { background: var(--act-online); box-shadow: 0 0 12px var(--act-online-glow); }
.act-card.recent::before { background: var(--act-warn); }

.act-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.act-card-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.act-card-email {
  font: 600 14px/1.3 var(--act-sans);
  color: var(--act-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.act-card-pack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11px/1 var(--act-mono);
  color: var(--act-text-dim);
}
.act-card-pack .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--act-text-muted); }

.act-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--act-bg-soft);
  border-radius: 10px;
  border: 1px solid var(--act-border);
}
.act-card-grid .field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.act-card-grid .field .lbl {
  font: 500 10px/1 var(--act-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--act-text-muted);
}
.act-card-grid .field .val {
  font: 500 12px/1.3 var(--act-sans);
  color: var(--act-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-card-grid .field .val.mono {
  font-family: var(--act-mono);
  font-size: 11px;
}

.act-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 500 11px/1.4 var(--act-mono);
  color: var(--act-text-dim);
}
.act-card-meta .row { display: flex; align-items: center; gap: 8px; }
.act-card-meta .row i { width: 12px; color: var(--act-text-muted); }

.act-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.act-card-actions button {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--act-border-strong);
  background: var(--act-bg-soft);
  color: var(--act-text);
  font: 600 13px/1 var(--act-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.act-card-actions button:hover { border-color: var(--act-accent); color: var(--act-accent); background: var(--act-accent-soft); }
.act-card-actions button.danger:hover { border-color: var(--act-danger); color: var(--act-danger); background: var(--act-danger-soft); }
.act-card-actions button.primary { background: linear-gradient(135deg, var(--act-accent), #b91c1c); color: white; border-color: var(--act-accent); }
.act-card-actions button.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px var(--act-accent-glow); }

/* ─── EMPTY STATE ──────────────────────────────────────────────────────── */
.act-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--act-text-dim);
}
.act-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--act-accent-soft);
  border: 1px solid var(--act-border-hover);
  display: grid;
  place-items: center;
  color: var(--act-accent);
  font-size: 28px;
}
.act-empty h3 {
  font: 400 22px/1.3 var(--act-serif);
  color: var(--act-text);
  margin: 0 0 6px;
}
.act-empty p { font-size: 13px; margin: 0; }

/* ─── DETAIL DRAWER ────────────────────────────────────────────────────── */
.act-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.act-detail-overlay.open { opacity: 1; pointer-events: auto; }

.act-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(640px, 100vw);
  height: 100dvh;
  background: var(--act-bg-deeper);
  border-left: 1px solid var(--act-border);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.act-detail-drawer.open { transform: translateX(0); }

.act-detail-head {
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--act-border);
  background: linear-gradient(135deg, rgba(220,38,38,0.06), transparent);
}
.act-detail-head h2 {
  font: 400 22px/1.2 var(--act-serif);
  margin: 0 0 6px;
  color: var(--act-text);
  letter-spacing: -0.01em;
}
.act-detail-head .hwid-mono {
  font: 500 12px/1 var(--act-mono);
  color: var(--act-text-dim);
  letter-spacing: 0.04em;
}
.act-detail-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 1px solid var(--act-border);
  background: var(--act-bg-soft);
  color: var(--act-text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.act-detail-close:hover { color: var(--act-accent); border-color: var(--act-accent); }

.act-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}
.act-detail-section {
  background: var(--act-bg-soft);
  border: 1px solid var(--act-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.act-detail-section h3 {
  font: 600 11px/1 var(--act-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--act-text-muted);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.act-detail-section h3 i { color: var(--act-accent); font-size: 11px; }
.act-detail-section .kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 12px;
  align-items: baseline;
  font-size: 13px;
}
.act-detail-section .kv dt {
  color: var(--act-text-muted);
  font-weight: 500;
  font-size: 12px;
}
.act-detail-section .kv dd {
  margin: 0;
  color: var(--act-text);
  word-break: break-word;
}
.act-detail-section .kv dd.mono { font-family: var(--act-mono); font-size: 12px; }

.act-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-top: 1px solid var(--act-border);
  background: rgba(15, 23, 42, 0.6);
}
.act-detail-actions button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font: 600 13px/1 var(--act-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  flex: 1;
  min-width: 130px;
}
.act-detail-actions button.danger {
  border: 1px solid var(--act-danger);
  background: var(--act-danger-soft);
  color: var(--act-danger);
}
.act-detail-actions button.danger:hover { background: var(--act-danger); color: white; }
.act-detail-actions button.warn {
  border: 1px solid var(--act-warn);
  background: var(--act-warn-soft);
  color: var(--act-warn);
}
.act-detail-actions button.warn:hover { background: var(--act-warn); color: #1a1a1a; }
.act-detail-actions button.ghost {
  border: 1px solid var(--act-border-strong);
  background: transparent;
  color: var(--act-text-dim);
}
.act-detail-actions button.ghost:hover { color: var(--act-text); border-color: var(--act-text-dim); }

/* ─── TIMELINE SVG (heartbeat 24h) ─────────────────────────────────────── */
.act-timeline {
  width: 100%;
  height: 92px;
  background: var(--act-bg-deeper);
  border-radius: 10px;
  border: 1px solid var(--act-border);
  position: relative;
  overflow: hidden;
}
.act-timeline svg { display: block; width: 100%; height: 100%; }
.act-timeline .axis-label {
  font: 500 9px/1 var(--act-mono);
  fill: var(--act-text-muted);
}
.act-timeline-grid line {
  stroke: var(--act-border);
  stroke-dasharray: 2 4;
}
.act-timeline-line {
  fill: none;
  stroke: var(--act-online);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.act-timeline-area {
  fill: url(#actTimelineGradient);
  opacity: 0.55;
}
.act-timeline-dot {
  fill: var(--act-online);
  stroke: var(--act-bg-deeper);
  stroke-width: 2;
}
.act-timeline-dot.dead { fill: var(--act-offline); }

/* ─── HELP MODAL (FAB stats globales) ──────────────────────────────────── */
.act-stats-modal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.act-stat {
  padding: 12px 14px;
  background: var(--act-bg-soft);
  border: 1px solid var(--act-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.act-stat .lbl {
  font: 500 10px/1 var(--act-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--act-text-muted);
}
.act-stat .val {
  font: 500 22px/1 var(--act-serif);
  color: var(--act-text);
  font-weight: 400;
}
.act-stat .val.online { color: var(--act-online); }
.act-stat .val.danger { color: var(--act-danger); }
.act-stat .val.mono { font-family: var(--act-mono); font-size: 16px; }

/* ─── LOADER ───────────────────────────────────────────────────────────── */
.act-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--act-text-muted);
  gap: 10px;
  font: 500 13px/1 var(--act-mono);
}
.act-loader .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--act-border);
  border-top-color: var(--act-accent);
  border-radius: 50%;
  animation: act-spin 0.8s linear infinite;
}
@keyframes act-spin { to { transform: rotate(360deg); } }

.act-error {
  padding: 18px 22px;
  border: 1px solid var(--act-danger);
  background: var(--act-danger-soft);
  color: var(--act-danger);
  border-radius: 12px;
  font-size: 13px;
}

/* ─── RESPONSIVE BREAKPOINTS ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  .act-table-card { display: none; }
  .act-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .act-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .act-toolbar .act-filter {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .act-toolbar .act-filter::-webkit-scrollbar { display: none; }
}

@media (max-width: 768px) {
  .act-pagehead { padding: 14px 16px; border-radius: 14px; }
  .act-pagehead h2 { font-size: 22px; }
  .act-pagehead-icon { width: 38px; height: 38px; font-size: 16px; }
  .act-card-email { max-width: 200px; }
  .act-detail-drawer {
    width: 100vw;
    border-left: 0;
  }
  .act-detail-head { padding: 16px 18px; }
  .act-detail-body { padding: 14px 18px; }
  .act-detail-section .kv {
    grid-template-columns: 110px 1fr;
    font-size: 12px;
  }
  .act-detail-actions { padding: 12px 16px; }
  .act-detail-actions button { min-width: 110px; flex: 1 1 calc(50% - 4px); font-size: 12px; }
}

@media (max-width: 420px) {
  .act-card-grid { grid-template-columns: 1fr; }
  .act-stats-modal { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .act-status-dot.online::before,
  .act-card,
  .act-detail-drawer,
  .act-detail-overlay,
  .act-actions .act-iconbtn,
  .act-card-actions button,
  .act-detail-actions button {
    animation: none !important;
    transition: none !important;
  }
}

/* ─── ACCESSIBILITY (focus, target size) ───────────────────────────────── */
.act-actions .act-iconbtn:focus-visible,
.act-card-actions button:focus-visible,
.act-detail-actions button:focus-visible,
.act-help-fab:focus-visible,
.act-detail-close:focus-visible,
.act-filter button:focus-visible {
  outline: 2px solid var(--act-accent);
  outline-offset: 2px;
}


/* light-theme override block (auto-generated) */
[data-theme="light"] {
    --act-bg: rgba(255, 254, 248, 0.85);
    --act-bg-deeper: rgba(255, 254, 248, 0.95);
    --act-bg-soft: rgba(20, 18, 12, 0.025);
    --act-border: rgba(20, 18, 12, 0.10);
    --act-border-hover: rgba(220, 38, 38, 0.40);
    --act-border-strong: rgba(20, 18, 12, 0.18);
    --act-text: #1A1A1F;
    --act-text-dim: rgba(26, 26, 31, 0.66);
    --act-text-muted: rgba(26, 26, 31, 0.42);
    --act-accent-soft: rgba(220, 38, 38, 0.12);
    --act-accent-glow: rgba(220, 38, 38, 0.35);
    --act-online-soft: rgba(16, 185, 129, 0.16);
    --act-online-glow: rgba(16, 185, 129, 0.42);
    --act-offline-soft: rgba(100, 116, 139, 0.14);
    --act-warn-soft: rgba(245, 158, 11, 0.14);
    --act-danger-soft: rgba(239, 68, 68, 0.14);
}


/* ═════════════════════════════════════════════════════════════════════════
   light-theme hardcoded overrides
   ═════════════════════════════════════════════════════════════════════════ */

[data-theme="light"] .act-table thead th {
    background: linear-gradient(180deg, rgba(255, 254, 248, 0.95), rgba(245, 241, 232, 0.85));
}

[data-theme="light"] .act-detail-overlay {
    background: rgba(20, 18, 12, 0.40);
}

[data-theme="light"] .act-detail-drawer {
    box-shadow: -20px 0 60px rgba(120, 80, 40, 0.28);
}

[data-theme="light"] .act-detail-actions {
    background: rgba(20, 18, 12, 0.04);
}

/* ═══════════════════════════════════════════════════════════════════════════
   scroll-x guard 2026-05-03
   Cause root: .act-table { min-width: 920px } (ligne 248) — table desktop
   très large. Wrapper .act-table-wrap a overflow-x:auto donc scroll local OK,
   mais le parent .act-table-card et .act-shell n'ont pas de containment
   strict. La vue mobile bascule en cards (.act-cards) au break 1023px mais
   on neutralise au cas où.
   ═══════════════════════════════════════════════════════════════════════════ */
.act-shell,
.act-table-card,
.act-toolbar,
.act-pagination,
.act-cards,
.act-card,
.act-detail-drawer,
.act-detail-content,
.act-stats-modal {
    max-width: 100%;
    min-width: 0;
}
.act-table-card { overflow: hidden; }
.act-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Sur mobile, neutraliser le min-width:920px de la table (admin-mobile-guard
   le fait déjà mais on est explicite ici pour idempotence). */
@media (max-width: 1023px) {
    .act-table { min-width: 0 !important; }
    /* Table en cards si le HTML rendu maintient encore la table — fallback */
    .act-table thead { display: none; }
    .act-table tbody td {
        white-space: normal !important;
        word-break: break-word;
    }
}

/* Cards mobile : assure containment pour avatars/emails longs. */
.act-card,
.act-card-head,
.act-card-body,
.act-card-email { max-width: 100%; min-width: 0; }
.act-card-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* HWID / fingerprints / licence keys : casser les hashes. */
.act-table .mono,
.act-card .mono,
.act-detail .mono {
    overflow-wrap: anywhere;
    word-break: break-all;
}

/* Stats modal grid : 2 cols → 1 col en très petit (déjà fait à 420px). */
.act-stats-modal { min-width: 0; }

/* design refresh 2026-05-03 */

/* ─────────────────────────────────────────────────────────────────
   design refresh 2026-05-03
   Stats grid Activations + status dot pulse online + amelio cards.
   ───────────────────────────────────────────────────────────────── */

.act-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.act-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--act-bg);
    border: 1px solid var(--act-border);
    border-radius: 14px;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    position: relative;
    overflow: hidden;
    transition: transform .18s, border-color .18s, box-shadow .18s;
    min-width: 0;
}
.act-stat-card:hover {
    transform: translateY(-1px);
    border-color: var(--act-border-hover);
    box-shadow: 0 12px 28px -16px rgba(220, 38, 38, .35);
}
.act-stat-card .aov-stat__icon {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--act-accent-soft);
    color: var(--act-accent);
    font-size: 16px;
    border: 1px solid var(--act-border-hover);
}
.act-stat-card--online .aov-stat__icon {
    background: var(--act-online-soft);
    color: var(--act-online);
    border-color: rgba(16, 185, 129, 0.32);
}
.act-stat-card--offline .aov-stat__icon {
    background: var(--act-offline-soft);
    color: var(--act-offline);
    border-color: rgba(100, 116, 139, 0.30);
}
.act-stat-card .aov-stat__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.act-stat-card .aov-stat__value {
    font-family: var(--act-serif);
    font-size: 28px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--act-text);
}
.act-stat-card .aov-stat__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--act-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pulse dot animé pour stat online */
.act-stat-pulse {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--act-online);
    box-shadow: 0 0 0 0 var(--act-online-glow);
    animation: actStatPulse 1.8s infinite;
    display: inline-block;
}
@keyframes actStatPulse {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); transform: scale(1); }
    70%  { box-shadow: 0 0 0 10px rgba(16,185,129,0);  transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0);     transform: scale(1); }
}

/* Light theme */
[data-theme="light"] .act-stat-card {
    background: rgba(255,255,255,0.92);
    border-color: rgba(20, 18, 12, 0.10);
}
[data-theme="light"] .act-stat-card .aov-stat__value { color: #1A1A1F; }
[data-theme="light"] .act-stat-card .aov-stat__label { color: #6F6E6A; }
[data-theme="light"] .act-stat-card--online .aov-stat__icon {
    background: rgba(16, 185, 129, 0.10);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.30);
}
[data-theme="light"] .act-stat-card--offline .aov-stat__icon {
    background: rgba(100, 116, 139, 0.10);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.30);
}
[data-theme="light"] .act-stat-card:hover {
    box-shadow: 0 12px 28px -18px rgba(220, 38, 38, 0.20);
}

/* Mobile compact */
@media (max-width: 640px) {
    .act-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .act-stat-card { padding: 10px 12px; gap: 10px; }
    .act-stat-card .aov-stat__icon { width: 32px; height: 32px; font-size: 13px; }
    .act-stat-card .aov-stat__value { font-size: 22px; }
    .act-stat-card .aov-stat__label { font-size: 11px; }
}

/* Renforcer le status dot online dans les rows : pulse ring */
.act-status-dot.online::before {
    animation: actStatPulse 1.8s infinite;
}
