/* Sentinel UI : bibliothèque graphique du panel Sentinel (noir, blanc, rouge de la mire).
   Tokens, mise en page et composants. Toutes les classes commencent par sx-.
   --sx-blue / --sx-blue-2 sont les noms historiques de la couleur d'accent (rouge). */

:root {
  --sx-bg: #050505;
  --sx-bg-2: #0b0b0d;
  --sx-panel: rgba(14, 14, 16, .82);
  --sx-panel-solid: #111113;
  --sx-panel-hi: rgba(44, 44, 50, .5);
  --sx-line: rgba(255, 255, 255, .09);
  --sx-line-soft: rgba(255, 255, 255, .05);
  --sx-line-hi: rgba(255, 42, 58, .55);
  --sx-text: #f2f2f3;
  --sx-muted: #9a9aa2;
  --sx-dim: #62626a;
  --sx-accent-rgb: 255, 42, 58;
  --sx-blue: #ff2a3a;
  --sx-blue-2: #ff4656;
  --sx-cyan: #38bdf8;
  --sx-green: #22d38a;
  --sx-red: #ff4d6a;
  --sx-amber: #f5a524;
  --sx-purple: #a66bff;
  --sx-pink: #ff5fa8;
  --sx-radius: 8px;
  --sx-radius-sm: 6px;
  --sx-font: 'Outfit', system-ui, sans-serif;
  --sx-display: 'Chakra Petch', 'Outfit', sans-serif;
  --sx-shadow: 0 16px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* Couleurs d'accent : chaque composant lit --tone / --tone-rgb.
   sx-tone-blue = blanc acier (le blanc du logo), sx-tone-accent = rouge de la mire. */
.sx-tone-blue { --tone: #e6e7eb; --tone-rgb: 230, 231, 235; }
.sx-tone-accent { --tone: var(--sx-blue-2); --tone-rgb: var(--sx-accent-rgb); }
.sx-tone-cyan { --tone: var(--sx-cyan); --tone-rgb: 56, 189, 248; }
.sx-tone-green { --tone: var(--sx-green); --tone-rgb: 34, 211, 138; }
.sx-tone-red { --tone: var(--sx-red); --tone-rgb: 255, 77, 106; }
.sx-tone-amber { --tone: var(--sx-amber); --tone-rgb: 245, 165, 36; }
.sx-tone-purple { --tone: var(--sx-purple); --tone-rgb: 166, 107, 255; }
.sx-tone-pink { --tone: var(--sx-pink); --tone-rgb: 255, 95, 168; }
.sx-tone-gray { --tone: var(--sx-muted); --tone-rgb: 139, 151, 185; }

.sx-icon { display: block; flex-shrink: 0; }

/* ---------- Coquille de l'application ---------- */

body.sx-app {
  display: flex;
  min-height: 100vh;
  margin: 0;
  font-family: var(--sx-font);
  color: var(--sx-text);
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(255, 42, 58, .07), transparent 62%),
    radial-gradient(700px 460px at -8% 112%, rgba(255, 42, 58, .06), transparent 58%),
    linear-gradient(180deg, #0a0a0b 0%, #030303 100%);
}

/* ---------- Décor : <div class="sx-fx"> en premier enfant du body ---------- */

.sx-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sx-fx > * { position: absolute; display: block; }

.sx-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 72% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 30%, #000 0%, transparent 75%);
}

.sx-eye {
  top: 4%;
  right: -4%;
  width: min(860px, 58vw);
  aspect-ratio: 1;
  background: url('../assets/sentinel-eye.png') center / contain no-repeat;
  opacity: .045;
}

.sx-reticle {
  right: -150px;
  bottom: -150px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .06);
  background:
    radial-gradient(circle, rgba(255, 42, 58, .55) 0 3px, rgba(255, 42, 58, .12) 4px, transparent 9px),
    radial-gradient(circle, transparent 0 21%, rgba(255, 42, 58, .22) 21.2% 21.6%, transparent 22%),
    radial-gradient(circle, transparent 0 46%, rgba(255, 255, 255, .05) 46.2% 46.5%, transparent 47%);
}
.sx-reticle::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 42, 58, .3), rgba(255, 42, 58, .3)) 50% 0 / 1px 38% no-repeat,
    linear-gradient(rgba(255, 42, 58, .3), rgba(255, 42, 58, .3)) 50% 100% / 1px 38% no-repeat,
    linear-gradient(rgba(255, 42, 58, .3), rgba(255, 42, 58, .3)) 0 50% / 38% 1px no-repeat,
    linear-gradient(rgba(255, 42, 58, .3), rgba(255, 42, 58, .3)) 100% 50% / 38% 1px no-repeat;
}
.sx-reticle::after {
  content: '';
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 42, 58, .28);
  animation: sx-spin 90s linear infinite;
}

.sx-scan {
  left: 0;
  right: 0;
  top: 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(255, 42, 58, .02) 85%, rgba(255, 42, 58, .06) 100%);
  border-bottom: 1px solid rgba(255, 42, 58, .05);
  animation: sx-scan 11s linear infinite;
}

@keyframes sx-spin { to { transform: rotate(360deg); } }
@keyframes sx-scan { from { transform: translateY(-180px); } to { transform: translateY(110vh); } }
@media (prefers-reduced-motion: reduce) {
  .sx-fx *, .sx-fx *::after { animation: none !important; }
  .sx-scan { display: none; }
}

.sx-sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 2;
  background: linear-gradient(180deg, rgba(12, 12, 14, .94), rgba(5, 5, 6, .96));
  border-right: 1px solid var(--sx-line);
  backdrop-filter: blur(14px);
  transition: width .2s;
}
.sx-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sx-blue), transparent);
  box-shadow: 0 0 8px rgba(255, 42, 58, .3);
}

.sx-brand { display: flex; align-items: center; gap: 11px; padding: 18px 16px 14px; min-width: 0; }
.sx-brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #000 url('../assets/sentinel-eye.png') center / 82% no-repeat;
  border: 1px solid var(--sx-line);
  box-shadow: 0 0 10px rgba(255, 42, 58, .09);
}
.sx-brand-text { min-width: 0; }
.sx-brand strong {
  display: block;
  font-family: var(--sx-display);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.sx-brand strong em { font-style: italic; color: var(--sx-blue); }
.sx-brand small { display: block; margin-top: 1px; font-size: 11px; color: var(--sx-muted); white-space: nowrap; }

.sx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 8px;
  padding: 0 8px 0 10px;
  border-radius: var(--sx-radius-sm);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--sx-line);
  color: var(--sx-muted);
  transition: border-color .2s;
}
.sx-search:focus-within { border-color: var(--sx-line-hi); box-shadow: 0 0 0 3px rgba(255, 42, 58, .1); }
.sx-search input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--sx-text);
  font: inherit;
  font-size: 13px;
  box-shadow: none;
}
.sx-search input:focus { outline: none; box-shadow: none; background: transparent; }
kbd, .sx-kbd {
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--sx-font);
  font-size: 10.5px;
  color: var(--sx-muted);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--sx-line);
  white-space: nowrap;
}

.sx-nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px 10px; overflow-y: auto; flex: 1; }
.sx-nav-label {
  padding: 16px 10px 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sx-dim);
}
.sx-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--sx-radius-sm);
  color: #c9c9cf;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.sx-nav a .sx-icon { color: var(--sx-muted); }
.sx-nav a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.sx-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(255, 42, 58, .22), rgba(255, 42, 58, .06)); box-shadow: inset 0 0 0 1px rgba(255, 42, 58, .28); }
.sx-nav a.active .sx-icon { color: var(--sx-blue-2); filter: drop-shadow(0 0 4px rgba(255, 42, 58, .35)); }
.sx-nav a.disabled { opacity: .4; pointer-events: none; }
.sx-nav a > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.sx-nav-server { font-weight: 500; }
.sx-nav-server .sx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sx-dim); flex-shrink: 0; }
.sx-nav-server .sx-dot.on { background: var(--sx-green); box-shadow: 0 0 5px var(--sx-green); }
.sx-nav-server > .sx-icon:last-child { transition: transform .2s; }
.sx-nav-server.open > .sx-icon:last-child { transform: rotate(180deg); }
.sx-nav-tree { position: relative; display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 10px; border-left: 1px solid var(--sx-line); }
.sx-nav-tree a { padding: 6px 10px; font-size: 13px; }
.sx-nav-tree a .sx-icon { width: 15px; height: 15px; }
.sx-nav-tree[hidden] { display: none; }
.sx-nav-tree:not([hidden]) { animation: sx-nav-unfold .22s ease-out; }
@keyframes sx-nav-unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sx-nav-server > .sx-icon:first-child { color: var(--sx-blue-2); }
.sx-nav-empty { padding: 4px 10px; margin: 0; }

/* Serveur du menu : sélecteur déroulant puis la liste de ses pages */
.sx-nav-picker { margin: 2px 0 10px; }
.sx-nav-picker-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 0;
  padding: 9px 12px 9px 9px;
  border-radius: var(--sx-radius);
  border: 1px solid rgba(255, 42, 58, .3);
  background: linear-gradient(180deg, rgba(255, 42, 58, .1), rgba(255, 42, 58, .03));
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.sx-nav-picker-btn:hover, .sx-nav-picker.open .sx-nav-picker-btn { border-color: rgba(255, 42, 58, .6); background: rgba(255, 42, 58, .14); }
.sx-nav-picker-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; color: var(--sx-blue-2); background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 42, 58, .3); }
.sx-nav-picker-icon .sx-dot { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--sx-dim); border: 2px solid #0b0b0d; }
.sx-nav-picker-icon .sx-dot.on { background: var(--sx-green); box-shadow: 0 0 5px var(--sx-green); }
.sx-nav-picker-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
.sx-nav-picker-btn > .sx-icon:last-child { color: var(--sx-muted); transition: transform .2s; }
.sx-nav-picker.open .sx-nav-picker-btn > .sx-icon:last-child { transform: rotate(180deg); color: var(--sx-blue-2); }
.sx-nav-picker .sx-dropdown-menu { position: fixed; right: auto; z-index: 200; }
.sx-nav .sx-nav-picker-add { margin-top: 4px; padding: 9px 10px; border-top: 1px solid var(--sx-line-soft); border-radius: 0 0 6px 6px; font-size: 13px; color: var(--sx-muted); }
.sx-nav .sx-nav-picker-add .sx-icon { color: var(--sx-blue-2); }

.sx-nav-pages { display: flex; flex-direction: column; gap: 3px; }
.sx-nav .sx-nav-page { gap: 13px; padding: 11px 14px; font-size: 14.5px; }
.sx-nav .sx-nav-page .sx-icon { width: 18px; height: 18px; }

.sx-sidebar-foot { padding: 10px; border-top: 1px solid var(--sx-line); }
.sx-user { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--sx-radius-sm); }
.sx-user:hover { background: rgba(255, 255, 255, .03); }
.sx-user-text { flex: 1; min-width: 0; }
.sx-user b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-user small { display: block; font-size: 11px; color: var(--sx-muted); }

.sx-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--sx-radius-sm);
  border: 1px solid var(--sx-line);
  background: rgba(255, 255, 255, .03);
  color: var(--sx-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.sx-iconbtn:hover { color: #fff; border-color: var(--sx-line-hi); background: rgba(255, 42, 58, .1); }

/* Barre latérale repliée : body.sx-collapsed */
body.sx-collapsed .sx-sidebar { width: 64px; }
body.sx-collapsed .sx-brand { justify-content: center; padding-inline: 0; }
body.sx-collapsed .sx-brand-text,
body.sx-collapsed .sx-search,
body.sx-collapsed .sx-nav-label,
body.sx-collapsed .sx-nav a > span,
body.sx-collapsed .sx-nav-server > .sx-icon:last-child,
body.sx-collapsed .sx-nav-server .sx-dot,
body.sx-collapsed .sx-user-text { display: none; }
body.sx-collapsed .sx-nav a { justify-content: center; padding: 9px 0; }
body.sx-collapsed .sx-nav-tree { margin-left: 0; padding-left: 0; border-left: 0; }
body.sx-collapsed .sx-nav-picker-btn { justify-content: center; padding: 6px 0; border-color: transparent; background: transparent; }
body.sx-collapsed .sx-nav-picker-name,
body.sx-collapsed .sx-nav-picker-btn > .sx-icon:last-child { display: none; }
body.sx-collapsed .sx-nav .sx-nav-picker-add > span { display: inline; }
body.sx-collapsed .sx-nav .sx-nav-page { justify-content: center; padding: 10px 0; }
body.sx-collapsed .sx-user { flex-direction: column; }

/* ---------- Barre du haut ---------- */

.sx-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -22px -26px 20px;
  padding: 12px 26px;
  background: rgba(6, 6, 7, .78);
  border-bottom: 1px solid var(--sx-line);
  backdrop-filter: blur(14px);
}
.sx-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.sx-crumbs a, .sx-crumbs span {
  padding: 5px 11px;
  border-radius: var(--sx-radius-sm);
  font-size: 13px;
  color: var(--sx-muted);
  text-decoration: none;
  border: 1px solid var(--sx-line);
  background: rgba(255, 255, 255, .02);
  white-space: nowrap;
}
.sx-crumbs a:hover { color: #fff; border-color: var(--sx-line-hi); }
.sx-crumbs span.current { color: #fff; border-color: rgba(255, 42, 58, .35); background: rgba(255, 42, 58, .08); }
.sx-crumbs .sx-icon { color: var(--sx-dim); }
.sx-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.sx-main {
  flex: 1;
  min-width: 0;
  max-width: none;
  overflow: visible;
  position: relative;
  padding: 22px 26px 40px;
  z-index: 1;
}

/* ---------- En-tête de page ---------- */

.sx-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.sx-title {
  margin: 0;
  font-family: var(--sx-display);
  font-size: 40px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #ececef 50%, #9a9aa2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(255, 255, 255, .12));
}
.sx-title em {
  font-style: italic;
  background: linear-gradient(180deg, #ff6b76 0%, #e3101f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 7px rgba(255, 42, 58, .225));
}
.sx-subtitle { display: flex; align-items: center; flex-wrap: wrap; margin: 10px 0 0; color: var(--sx-muted); font-size: 12.5px; letter-spacing: .04em; }
.sx-subtitle::before { content: ''; width: 22px; height: 2px; margin-right: 10px; background: var(--sx-blue); box-shadow: 0 0 5px var(--sx-blue); }
.sx-subtitle i { font-style: normal; margin: 0 8px; color: var(--sx-blue); }
.sx-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sx-header-right > .sx-chip,
.sx-header-right > .sx-select,
.sx-header-right .sx-dropdown-btn { height: 40px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; margin: 0; }
.sx-header-right > .sx-select select { height: 100%; padding-top: 0; padding-bottom: 0; }

.sx-dropdown { position: relative; }
.sx-dropdown-btn {
  width: auto;
  min-width: 190px;
  padding: 0 34px 0 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color .15s, background .15s;
}
.sx-dropdown-btn > span { flex: 1; text-align: left; }
.sx-dropdown-btn > .sx-icon:last-child { transition: transform .2s; }
.sx-dropdown-btn:hover,
.sx-dropdown.open .sx-dropdown-btn { border-color: rgba(var(--sx-accent-rgb), .55); background: rgba(var(--sx-accent-rgb), .07); }
.sx-dropdown.open .sx-dropdown-btn > .sx-icon:last-child { transform: rotate(180deg); color: var(--sx-blue-2); }

.sx-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 100%;
  padding: 6px;
  border-radius: var(--sx-radius-sm);
  background: var(--sx-panel-solid);
  border: 1px solid var(--sx-line);
  border-top: 2px solid var(--sx-blue);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .65), 0 0 0 1px rgba(var(--sx-accent-rgb), .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.sx-dropdown.open .sx-dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.sx-dropdown-label {
  padding: 6px 10px 8px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sx-dim);
}
.sx-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sx-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.sx-dropdown-menu button > span { flex: 1; }
.sx-dropdown-menu button:hover { background: rgba(255, 255, 255, .05); color: var(--sx-text); }
.sx-dropdown-menu button.active { background: rgba(var(--sx-accent-rgb), .12); color: var(--sx-text); box-shadow: inset 2px 0 0 var(--sx-blue); }
.sx-dropdown-menu button .sx-icon { color: var(--sx-blue-2); }
.sx-dropdown-menu .sx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sx-dim); flex-shrink: 0; }
.sx-dropdown-menu .sx-dot.on { background: var(--sx-green); box-shadow: 0 0 5px var(--sx-green); }

.sx-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--sx-radius-sm);
  background: var(--sx-panel);
  border: 1px solid var(--sx-line);
  font-size: 13px;
  color: var(--sx-text);
  white-space: nowrap;
}
.sx-chip .sx-icon { color: var(--sx-blue-2); }
.sx-chip.live { color: var(--sx-green); border-color: rgba(34, 211, 138, .4); background: rgba(34, 211, 138, .08); }
.sx-chip.off { color: var(--sx-red); border-color: rgba(255, 77, 106, .4); background: rgba(255, 77, 106, .08); }
.sx-live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: sx-pulse 2s infinite; }

.sx-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 12px;
  border-radius: var(--sx-radius-sm);
  background: var(--sx-panel);
  border: 1px solid var(--sx-line);
  color: var(--sx-text);
}
.sx-select .sx-icon { color: var(--sx-blue-2); }
.sx-select select {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 9px 22px 9px 0;
  margin: 0;
  width: auto;
  cursor: pointer;
  box-shadow: none;
}
.sx-select select:focus { outline: none; box-shadow: none; background: transparent; }
.sx-select select option { background: var(--sx-panel-solid); color: var(--sx-text); text-transform: none; }
.sx-select > .sx-icon:last-child { position: absolute; right: 10px; pointer-events: none; color: var(--sx-muted); }

/* ---------- Grilles ---------- */

.sx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.sx-dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.sx-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sx-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }

/* ---------- Cartes statistiques ---------- */

.sx-stat {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 18px 16px;
  border-radius: var(--sx-radius);
  background:
    radial-gradient(260px 120px at 100% 100%, rgba(var(--tone-rgb), .12), transparent 70%),
    var(--sx-panel);
  border: 1px solid var(--sx-line);
  box-shadow: var(--sx-shadow);
  backdrop-filter: blur(16px);
}
.sx-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--tone);
  background: rgba(var(--tone-rgb), .14);
  border: 1px solid rgba(var(--tone-rgb), .38);
  box-shadow: 0 0 13px rgba(var(--tone-rgb), .125), inset 0 0 8px rgba(var(--tone-rgb), .07);
}
.sx-stat-body { min-width: 0; flex: 1; position: relative; z-index: 1; }
.sx-stat-label { font-size: 13px; color: var(--sx-text); opacity: .86; }
.sx-stat-value { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-size: 30px; font-weight: 700; line-height: 1.1; }
.sx-stat-value small { font-size: 18px; font-weight: 500; color: var(--sx-muted); margin-left: -6px; }
.sx-stat-hint { margin-top: 6px; font-size: 12px; color: var(--sx-muted); }
.sx-stat-deco { position: absolute; right: 16px; bottom: 14px; color: var(--tone); opacity: .38; }
.sx-stat .sx-progress { margin-top: 10px; }

.sx-trend { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; }
.sx-trend.up { color: var(--sx-green); }
.sx-trend.down { color: var(--sx-red); }
.sx-tone-red .sx-trend.up, .sx-trend.bad { color: var(--sx-red); }

/* ---------- Panneaux ---------- */

.sx-panel {
  min-width: 0;
  border-radius: var(--sx-radius);
  background: var(--sx-panel);
  border: 1px solid var(--sx-line);
  box-shadow: var(--sx-shadow);
  backdrop-filter: blur(16px);
  padding: 16px 18px;
  position: relative;
}
.sx-panel::before, .sx-stat::before, body.sx-app .card::before,
.sx-panel::after, .sx-stat::after, body.sx-app .card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  border-color: rgba(255, 42, 58, .75);
  border-style: solid;
  border-width: 0;
}
.sx-panel::before, .sx-stat::before, body.sx-app .card::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: var(--sx-radius); }
.sx-panel::after, .sx-stat::after, body.sx-app .card::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: var(--sx-radius); }
.sx-stat::before { top: 0; left: 0; }
.sx-stat::after { bottom: 0; right: 0; }
.sx-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sx-panel-icon { color: var(--tone); filter: drop-shadow(0 0 5px rgba(var(--tone-rgb), .3)); }
.sx-panel-titles { flex: 1; min-width: 0; }
.sx-panel-titles h3 { margin: 0; font-family: var(--sx-font); font-size: 17px; font-weight: 600; letter-spacing: .01em; text-transform: none; color: var(--sx-text); }
.sx-panel-titles p { margin: 3px 0 0; font-size: 12px; color: var(--sx-muted); }
.sx-panel-actions { display: flex; align-items: center; gap: 8px; }
.sx-panel-body { min-width: 0; }

/* ---------- Boutons ---------- */

.sx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--sx-radius-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, filter .15s, border-color .2s, background .2s;
}
.sx-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.sx-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.sx-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.sx-btn-primary { color: #fff; border: 1px solid transparent; background: linear-gradient(135deg, #c4101f, #ff3d4c); box-shadow: 0 0 12px rgba(255, 42, 58, .2); }
.sx-btn-outline { color: var(--sx-blue-2); border: 1px solid var(--sx-line-hi); background: rgba(255, 42, 58, .08); }
.sx-btn-outline:hover { color: #fff; background: rgba(255, 42, 58, .18); }
.sx-btn-ghost { color: var(--sx-text); border: 1px solid var(--sx-line); background: transparent; }
.sx-btn-danger { color: #fff; border: 1px solid transparent; background: linear-gradient(135deg, #c81e45, var(--sx-red)); }
.sx-btn-block { width: 100%; }

/* ---------- Tags et statuts ---------- */

.sx-tag, .sx-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--tone);
  background: rgba(var(--tone-rgb), .1);
  border: 1px solid rgba(var(--tone-rgb), .5);
}
.sx-tag::before, .sx-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}
.sx-pill { min-width: 70px; justify-content: center; }

/* ---------- Tableaux ---------- */

.sx-table-wrap { overflow-x: auto; margin: 0 -4px; }
.sx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sx-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sx-muted);
  border-bottom: 1px solid var(--sx-line);
  background: transparent;
}
.sx-table td { padding: 8px 10px; border-bottom: 1px solid var(--sx-line-soft); vertical-align: middle; color: var(--sx-text); }
.sx-table tbody tr:last-child td { border-bottom: 0; }
.sx-table tbody tr:hover td { background: rgba(255, 42, 58, .06); }
.sx-table .num { text-align: right; }
.sx-table .end { text-align: right; white-space: nowrap; width: 1%; }
.sx-table .muted { color: var(--sx-muted); }
.sx-empty { text-align: center; color: var(--sx-muted); padding: 22px 10px !important; }

/* ---------- Joueur / avatar ---------- */

.sx-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-player b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-player small { display: block; font-size: 11px; color: var(--sx-muted); }
.sx-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 220) 70% 52%), hsl(calc(var(--h, 220) + 40) 75% 28%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.sx-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Interrupteur ---------- */

.sx-switch { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; margin: 0; cursor: pointer; }
.sx-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.sx-switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: background .2s, box-shadow .2s, border-color .2s;
}
.sx-switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #e6e6ea;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .2s;
}
.sx-switch input:checked + span { background: linear-gradient(90deg, #14a86c, var(--sx-green)); border-color: transparent; box-shadow: 0 0 8px rgba(34, 211, 138, .225); }
.sx-switch input:checked + span::after { transform: translateX(19px); background: #fff; }
.sx-switch input:disabled + span { opacity: .5; }
.sx-switch input:focus-visible + span { outline: 2px solid var(--sx-blue-2); outline-offset: 2px; }

.sx-toggle-row { display: flex; align-items: center; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--sx-line-soft); }
.sx-toggle-row:last-child { border-bottom: 0; }
.sx-toggle-icon { color: var(--tone); width: 24px; display: grid; place-items: center; filter: drop-shadow(0 0 4px rgba(var(--tone-rgb), .28)); }
.sx-toggle-text { flex: 1; min-width: 0; }
.sx-toggle-text b { display: block; font-size: 13.5px; font-weight: 600; }
.sx-toggle-text small { display: block; font-size: 11.5px; color: var(--sx-muted); margin-top: 2px; }

/* ---------- Barres ---------- */

.sx-progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.sx-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(var(--tone-rgb), .6), var(--tone)); box-shadow: 0 0 6px rgba(var(--tone-rgb), .35); }
.sx-progress-row { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--sx-muted); }
.sx-progress-row .sx-progress { flex: 1; }

.sx-minibars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.sx-minibars i { width: 3px; border-radius: 1px; background: var(--tone); opacity: .85; }

/* ---------- Graphique ---------- */

.sx-chart { position: relative; width: 100%; }
.sx-chart svg { display: block; overflow: visible; }
.sx-chart-grid { stroke: rgba(255, 255, 255, .1); stroke-width: 1; }
.sx-chart-axis { fill: var(--sx-muted); font-size: 11px; font-family: var(--sx-font); }
.sx-chart-cursor { stroke: rgba(255, 255, 255, .45); stroke-dasharray: 3 4; opacity: 0; }
.sx-chart-dot { fill: var(--sx-blue-2); stroke: #fff; stroke-width: 2; opacity: 0; filter: drop-shadow(0 0 4px var(--sx-blue-2)); }
.sx-chart-tip {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(14, 14, 16, .95);
  border: 1px solid var(--sx-line-hi);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
  opacity: 0;
}
.sx-chart-tip b { display: block; font-weight: 600; }
.sx-chart-tip small { color: var(--sx-muted); }
.sx-chart.hover .sx-chart-cursor, .sx-chart.hover .sx-chart-dot, .sx-chart.hover .sx-chart-tip { opacity: 1; }

/* ---------- Cartes de ban ---------- */

.sx-bancards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sx-bancard {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 10px;
  text-align: left;
  font: inherit;
  color: var(--sx-text);
  cursor: pointer;
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--sx-line);
  transition: border-color .2s, background .2s, transform .2s;
}
.sx-bancard:hover { border-color: var(--sx-line-hi); background: rgba(255, 42, 58, .07); transform: translateY(-2px); }
.sx-bancard-thumb {
  width: 96px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--sx-muted);
  background: #000;
  border: 1px solid var(--sx-line);
}
.sx-bancard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sx-bancard-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-bottom: 18px; }
.sx-bancard-info b { color: var(--sx-blue-2); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-bancard-info small { font-size: 11px; color: var(--sx-muted); }
.sx-bancard-info span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-bancard-info em { font-style: normal; font-size: 11px; color: var(--sx-dim); }
.sx-bancard-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 9px;
  font-size: 10.5px;
  border-radius: 6px;
  color: var(--sx-red);
  background: rgba(255, 77, 106, .1);
  border: 1px solid rgba(255, 77, 106, .5);
}

/* ---------- Divers ---------- */

.sx-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sx-toolbar > input.sx-input:first-child { flex: 1; min-width: 240px; max-width: 520px; }
.sx-toolbar > select.sx-input { width: auto; }
.sx-input {
  padding: 9px 12px;
  margin: 0;
  width: auto;
  min-width: 220px;
  border-radius: var(--sx-radius-sm);
  background: rgba(8, 8, 10, .8);
  border: 1px solid var(--sx-line);
  color: var(--sx-text);
  font: inherit;
  font-size: 13px;
}
.sx-input:focus { outline: none; border-color: var(--sx-blue-2); box-shadow: 0 0 0 3px rgba(255, 42, 58, .15); }
.sx-counter { padding: 4px 10px; border-radius: 8px; font-size: 12px; color: var(--sx-blue-2); background: rgba(255, 42, 58, .1); border: 1px solid var(--sx-line-hi); }
.sx-module-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--sx-blue-2); background: rgba(255, 42, 58, .1); border: 1px solid var(--sx-line); }

/* ---------- Onglets ---------- */

.sx-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  border-radius: var(--sx-radius);
  background: var(--sx-panel);
  border: 1px solid var(--sx-line);
}
.sx-tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: max-content;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--sx-radius-sm);
  background: transparent;
  color: var(--sx-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.sx-tabs button:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.sx-tabs button.active { color: #fff; background: rgba(255, 42, 58, .14); border-color: rgba(255, 42, 58, .4); box-shadow: 0 0 8px rgba(255, 42, 58, .075); }
.sx-tabs button.active .sx-icon { color: var(--sx-blue-2); }

/* ---------- Cartes d'options (grille en colonnes) ---------- */

.sx-masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; margin-bottom: 14px; }

.sx-optcard {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 16px 16px 12px;
  border-radius: var(--sx-radius);
  background: var(--sx-panel);
  border: 1px solid var(--sx-line);
  box-shadow: var(--sx-shadow);
}
.sx-optcard::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 12px;
  height: 12px;
  border: 0 solid rgba(255, 42, 58, .75);
  border-top-width: 2px;
  border-left-width: 2px;
  border-top-left-radius: var(--sx-radius);
}
.sx-optcard header { margin-bottom: 12px; }
.sx-optcard h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--sx-font); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #fff; }
.sx-optcard h3 .sx-icon { color: var(--sx-blue-2); }
.sx-optcard header p { margin: 5px 0 0; font-size: 12px; color: var(--sx-muted); }
.sx-optcard-body { border-radius: var(--sx-radius-sm); border: 1px solid var(--sx-line-soft); background: rgba(0, 0, 0, .22); padding: 2px 12px; }
.sx-optcard-body label { color: var(--sx-muted); font-size: 12px; }
.sx-optcard-body.plain { border: 0; background: transparent; padding: 0; }
.sx-optcard-body.plain > .sx-btn { margin-top: 4px; }
.sx-optcard-body pre { margin: 0 0 12px; }

.sx-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--sx-line-soft); }
.sx-opt:last-child { border-bottom: 0; }
.sx-opt-label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; font-weight: 500; color: #e4e4e8; }
.sx-opt .sx-switch { width: 34px; height: 19px; }
.sx-opt .sx-switch span::after { width: 13px; height: 13px; }
.sx-opt .sx-switch input:checked + span::after { transform: translateX(15px); }

/* Action d'un module : Off / Log / Kick / Ban */
.sx-seg {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid var(--sx-line);
}
.sx-seg button {
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--sx-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sx-seg button:hover:not(:disabled) { color: var(--sx-text); background: rgba(255, 255, 255, .05); }
.sx-seg button:disabled { cursor: not-allowed; }
.sx-seg button.active { color: #fff; }
.sx-seg .sx-seg-off.active { background: rgba(255, 255, 255, .12); color: var(--sx-muted); }
.sx-seg .sx-seg-log.active { background: rgba(230, 231, 235, .2); box-shadow: inset 0 0 0 1px rgba(230, 231, 235, .35); }
.sx-seg .sx-seg-kick.active { background: rgba(255, 176, 32, .22); color: #ffc65c; box-shadow: inset 0 0 0 1px rgba(255, 176, 32, .45); }
.sx-seg .sx-seg-ban.active { background: var(--sx-blue); box-shadow: 0 0 7px rgba(var(--sx-accent-rgb), .225); }
.sx-masonry-wide { grid-template-columns: repeat(auto-fill, minmax(390px, 1fr)); }
.sx-masonry-wide .sx-opt-label { flex: 1; }
.sx-mod-intro { margin: 0 0 14px; line-height: 1.6; }
.sx-mod-intro b { color: var(--sx-text); }
.sx-optcard-body.plain textarea { min-height: 84px; margin: 0; font-family: Consolas, monospace; font-size: 12px; }
.sx-optcard-body.plain select { margin: 0; }
.sx-lists-save { margin-top: 14px; }

.sx-info { position: relative; display: inline-grid; place-items: center; color: var(--sx-dim); cursor: help; outline: none; }
.sx-info:hover, .sx-info:focus { color: var(--sx-blue-2); }
.sx-info::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  color: var(--sx-text);
  background: #141416;
  border: 1px solid var(--sx-line-hi);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s, transform .15s;
}
.sx-info:hover::after, .sx-info:focus::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Liste des bans ---------- */

.sx-search-inline { margin: 0; min-width: 260px; }
.sx-bans .sx-panel-head { flex-wrap: wrap; }
.sx-bans-table th { white-space: nowrap; }
.sx-bans-table td { padding: 10px; }
.sx-bans-table tbody tr { cursor: pointer; }
.sx-banplayer { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.sx-banplayer > .sx-icon { color: var(--sx-dim); }
.sx-banplayer b { display: block; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.sx-banplayer small { display: block; font-size: 11.5px; color: var(--sx-muted); }
.sx-idchip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: #e6e6ea;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--sx-line);
  white-space: nowrap;
}
.sx-reason { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e4e4e8; }
.sx-reason-sub { display: block; margin-top: 2px; font-size: 11px; color: var(--sx-amber); }
.sx-proof {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--sx-line);
  background: #000;
  color: var(--sx-muted);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.sx-proof img { width: 100%; height: 100%; object-fit: cover; }
.sx-proof:hover { border-color: var(--sx-line-hi); transform: scale(1.06); }
.sx-proof.clip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, .55) 0 10px, transparent 11px);
}
.sx-proof.clip::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  margin: -5px 0 0 -3px;
  border: 5px solid transparent;
  border-left: 8px solid #fff;
  border-right: 0;
}
.sx-noproof { font-size: 11.5px; color: var(--sx-dim); white-space: nowrap; }
.sx-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sx-status.ban { color: #fff; background: rgba(255, 42, 58, .75); border: 1px solid rgba(255, 90, 100, .6); box-shadow: 0 0 6px rgba(255, 42, 58, .125); }
.sx-status.lifted { color: var(--sx-green); background: rgba(34, 211, 138, .1); border: 1px solid rgba(34, 211, 138, .45); }
.sx-date b { display: block; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; }
.sx-date small { display: block; font-size: 11.5px; color: var(--sx-muted); }
.sx-by { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #d4d4d8; white-space: nowrap; }
.sx-by .sx-icon { color: var(--sx-dim); }
.sx-by.ac { color: var(--sx-blue-2); }
.sx-by.ac .sx-icon { color: var(--sx-blue-2); }
.sx-actions { display: inline-flex; align-items: center; gap: 2px; }
.sx-act {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sx-muted);
  cursor: pointer;
  transition: color .15s, background .15s;
}
.sx-act:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sx-act.danger { color: var(--sx-red); }
.sx-act.danger:hover { color: #fff; background: rgba(255, 42, 58, .25); }

/* ---------- Fiche d'un ban ---------- */

#banModal .modal-box.sx-banmodal { max-width: 600px; padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--sx-radius); border-color: var(--sx-line); }
.sx-banmodal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.sx-banmodal-head > div { flex: 1; min-width: 0; }
.sx-banmodal-head h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--sx-font); font-size: 17px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #fff; }
.sx-banmodal-head h3 .sx-icon { color: var(--sx-blue-2); }
.sx-banmodal-head p { margin: 5px 0 0; font-size: 12.5px; color: var(--sx-muted); }
#banBody { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#banBody > .sx-tabs { margin: 0 20px 4px; }
.sx-banmodal-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px 16px; }
.sx-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 14px; }
.sx-field > span, .sx-field-block > span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--sx-muted); }
.sx-field b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #fff; }
.sx-field-block { margin-bottom: 14px; }
.sx-box { padding: 10px 12px; border-radius: 6px; background: rgba(255, 255, 255, .04); border: 1px solid var(--sx-line); font-size: 13px; color: #fff; }
.sx-kv > div { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.sx-kv i { font-style: normal; color: var(--sx-muted); }
.sx-kv code { padding: 1px 6px; border-radius: 4px; color: var(--sx-blue-2); background: rgba(255, 42, 58, .1); }
.sx-kv pre { margin: 6px 0 0; padding: 8px 10px; font-size: 11.5px; }
.sx-section-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--sx-line); font-family: var(--sx-font); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #fff; }
.sx-section-title .sx-icon { color: var(--sx-blue-2); }
#banModal .sx-banmodal .ban-shot { border-radius: 6px; overflow: hidden; border: 1px solid var(--sx-line); }
.sx-idlist { display: flex; flex-direction: column; gap: 6px; }
.sx-idrow { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 6px; background: rgba(255, 255, 255, .03); border: 1px solid var(--sx-line-soft); }
.sx-idrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #e4e4e8; }
.sx-idtype { min-width: 64px; padding: 2px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; text-align: center; color: var(--sx-blue-2); background: rgba(255, 42, 58, .1); border: 1px solid rgba(255, 42, 58, .3); }
.sx-banmodal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--sx-line); background: rgba(0, 0, 0, .25); }
@media (max-width: 560px) { .sx-fields { grid-template-columns: 1fr; } }

@keyframes sx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- Anciens blocs du panel (.card, table, h2) alignés sur la bibliothèque ---------- */

body.sx-app .card {
  position: relative;
  background: var(--sx-panel);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--sx-shadow);
  backdrop-filter: blur(16px);
}
body.sx-app a.card:hover { border-color: var(--sx-line-hi); box-shadow: 0 0 14px rgba(255, 42, 58, .125), var(--sx-shadow); }
body.sx-app .card h3 { font-family: var(--sx-font); font-size: 16px; font-weight: 600; letter-spacing: .01em; text-transform: none; }
body.sx-app h2 {
  font-family: var(--sx-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #e0e0e4 48%, #85858d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.sx-app table th { font-size: 10.5px; padding: 9px 10px; background: transparent; border-bottom-color: var(--sx-line); }
body.sx-app table td { padding: 9px 10px; border-bottom-color: var(--sx-line-soft); font-size: 13px; }
body.sx-app .toggle { padding: 12px 2px; border-bottom-color: var(--sx-line-soft); }
body.sx-app .toggle .sx-switch { margin-top: 2px; }

/* ---------- Responsive ---------- */

@media (max-width: 1360px) {
  .sx-dash { grid-template-columns: minmax(0, 1fr); }
  .sx-dash > .sx-col:last-child { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
@media (max-width: 1100px) {
  .sx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-bancards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  body.sx-app { flex-direction: column; }
  .sx-sidebar { width: 100%; height: auto; position: relative; }
  .sx-nav { flex-direction: row; overflow-x: auto; }
  .sx-main { padding: 18px 14px 32px; }
  .sx-stats { grid-template-columns: minmax(0, 1fr); }
  .sx-title { font-size: 28px; }
}

/* ---------- Fenêtre de dialogue (SUI.dialog, remplace confirm / prompt) ---------- */

.sx-dialog {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 2, 3, .7);
  backdrop-filter: blur(6px);
  animation: sx-dialog-fade .14s ease;
}
.sx-dialog.closing { animation: sx-dialog-fade .14s ease reverse forwards; }
.sx-dialog-box {
  width: min(440px, 100%);
  box-sizing: border-box;
  padding: 22px 22px 18px;
  border-radius: 12px;
  border: 1px solid var(--sx-line);
  border-top: 2px solid var(--sx-blue);
  background: linear-gradient(180deg, #141417, #0b0b0d);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
  animation: sx-dialog-pop .16s ease;
  font-family: var(--sx-font);
  color: var(--sx-text);
}
.sx-dialog-head { display: flex; align-items: center; gap: 12px; }
.sx-dialog-head h3 { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: .01em; text-transform: none; }
.sx-dialog-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--sx-blue-2);
  background: rgba(255, 42, 58, .1);
  border: 1px solid rgba(255, 42, 58, .25);
}
.sx-dialog-msg { margin: 14px 0 0; color: var(--sx-muted); font-size: 14px; line-height: 1.55; }
.sx-dialog-msg b { color: var(--sx-text); }
.sx-dialog-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: var(--sx-radius);
  border: 1px solid var(--sx-line);
  background: rgba(0, 0, 0, .45);
  color: var(--sx-text);
  font: 14px var(--sx-font);
  resize: vertical;
}
.sx-dialog-input:focus { outline: none; border-color: var(--sx-blue-2); box-shadow: 0 0 0 3px rgba(255, 42, 58, .15); }
.sx-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.sx-dialog-actions .sx-btn { min-width: 104px; justify-content: center; }
.sx-dialog-actions [data-cancel] { color: var(--sx-muted); border-color: var(--sx-line); background: rgba(255, 255, 255, .03); }
.sx-dialog-actions [data-cancel]:hover { color: var(--sx-text); background: rgba(255, 255, 255, .07); }

@keyframes sx-dialog-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-dialog-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
