/* =========================================================
   WOS Bot Panel — Premium Glassmorphism
   Design: icy arctic blue + deep space, frosted glass layers
   ========================================================= */

:root {
  --bg:      #03060f;
  --accent:  #00d4ff;
  --accent2: #7ab2ff;
  --accent3: #a78bfa;

  --glass-bg:      rgba(5,14,38,.80);
  --glass-bg-side: rgba(4,12,34,.88);
  --glass-bg-deep: rgba(0,8,28,.52);
  --glass-border:  rgba(255,255,255,.09);
  --glass-border2: rgba(255,255,255,.055);

  --text:   #e8f0ff;
  --muted:  rgba(200,220,255,.60);
  --muted2: rgba(200,220,255,.38);

  --glow-cyan:   rgba(0,212,255,.18);
  --glow-violet: rgba(130,100,255,.15);

  /* Status colors */
  --color-ok:      #00dc82;
  --color-ok-bg:   rgba(0,200,120,.09);
  --color-ok-bdr:  rgba(0,220,130,.28);
  --color-warn:    #ffd648;
  --color-warn-bg: rgba(255,190,50,.09);
  --color-warn-bdr:rgba(255,200,60,.28);
  --color-danger:  #ff5252;
  --color-danger-bg:  rgba(255,80,80,.09);
  --color-danger-bdr: rgba(255,80,80,.28);

  /* Rank colors */
  --rank-r1: #a0b4cc;
  --rank-r2: #4fc3f7;
  --rank-r3: #b39ddb;
  --rank-r4: #ffb74d;
  --rank-r5: #ef5350;

  --shadow:  0 8px 32px rgba(0,0,0,.45);
  --shadow2: 0 16px 48px rgba(0,0,0,.55);
  --r: 18px;

  /* z-index scale */
  --z-base:   10;
  --z-sticky: 20;
  --z-toast:  9000;
  --z-modal:  999999;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
img { max-width: 100%; height: auto; }

/* ── Focus visible (accessibilité clavier) ───────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgba(0,212,255,.70);
  outline-offset: 3px;
  border-radius: 6px;
}
.navItem:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(0,212,255,.65);
  outline-offset: 2px;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,212,255,.28);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,.48); }

/* ── Body + Background ───────────────────────────────────── */
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 700px at 8%  12%,  rgba(0,100,255,.22)  0%, transparent 65%),
    radial-gradient(ellipse 700px 500px at 92% 18%,  rgba(0,212,255,.16)  0%, transparent 60%),
    radial-gradient(ellipse 600px 600px at 55% 105%, rgba(80,0,255,.14)   0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 20% 80%,  rgba(0,180,255,.10)  0%, transparent 55%),
    radial-gradient(ellipse 400px 300px at 80% 70%,  rgba(120,60,255,.08) 0%, transparent 55%);
  min-height: 100dvh;
  overflow-x: hidden;
  padding: 22px 18px 22px 22px;
}

/* ── Links ───────────────────────────────────────────────── */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Glass mixin helper (reused via direct props) ─────────── */

/* ── Shell layout ────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.side, .nav { pointer-events: auto; }

.side {
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  background: var(--glass-bg-side);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 0 0 1px rgba(0,212,255,.04);
  padding: 14px;
  position: sticky;
  top: 16px;
  height: fit-content;
}

/* ── Brand block ─────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--glass-border2);
  margin-bottom: 10px;
}
.logo {
  width: 38px; height: 38px; border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,212,255,.9), rgba(0,120,255,.4) 55%, transparent 70%),
    rgba(0,150,255,.15);
  border: 1px solid rgba(0,212,255,.30);
  box-shadow: 0 0 18px rgba(0,212,255,.22), 0 8px 20px rgba(0,0,0,.3);
}
.logoImg {
  width: 38px; height: 38px; border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(0,212,255,.28);
  box-shadow: 0 0 16px rgba(0,212,255,.18), 0 8px 20px rgba(0,0,0,.3);
  background: rgba(0,150,255,.10);
  display: block;
}
.brand h1 { font-size: 14px; margin: 0; font-weight: 800; letter-spacing: .2px; }
.brand p  { margin: 0; font-size: 12px; color: var(--muted); }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 4px;
}

.navSection {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 10px 10px 4px;
  user-select: none;
}

.navDivider {
  height: 1px;
  background: var(--glass-border2);
  margin: 6px 8px;
}

.navItem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
  position: relative;
}
.navBtn {
  appearance: none;
  font-family: inherit;
  text-align: left;
}
.navIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: .65;
  transition: opacity .16s ease;
}
.navLabel { flex: 1; min-width: 0; }

.navItem:hover {
  background: rgba(0,200,255,.08);
  border-color: rgba(0,200,255,.14);
  color: var(--text);
  text-decoration: none;
}
.navItem:hover .navIcon { opacity: 1; }

.navItem.active,
.navItem[aria-current="page"] {
  background: rgba(0,200,255,.11);
  border-color: rgba(0,212,255,.22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
.navItem.active .navIcon,
.navItem[aria-current="page"] .navIcon { opacity: 1; }

.navDanger { color: rgba(255,130,130,.80); }
.navDanger:hover {
  background: rgba(255,80,80,.09);
  border-color: rgba(255,80,80,.18);
  color: rgba(255,160,160,.95);
}

/* ── Chip / badge small ──────────────────────────────────── */
.chip {
  font-size: 11px;
  color: rgba(200,220,255,.85);
  background: rgba(0,180,255,.12);
  border: 1px solid rgba(0,180,255,.22);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; height: 22px; padding: 0 10px;
}

/* ── Main column ─────────────────────────────────────────── */
.main { display: flex; flex-direction: column; gap: 14px; }

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  background: rgba(5,14,38,.82);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  padding: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.title { display: flex; flex-direction: column; gap: 3px; }
.title .h { font-size: 18px; font-weight: 800; letter-spacing: .2px; }
.title .s { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: rgba(5,14,38,.78);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 14px;
  max-width: 100%;
}

/* ── Grid + KPI ──────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.grid > * { min-width: 0; }

.kpi {
  grid-column: span 3;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0,18,52,.72);
  border: 1px solid rgba(0,180,255,.14);
  border-top: 2px solid rgba(0,212,255,.32);
  box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 -1px 0 rgba(0,0,0,.2);
  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(0,212,255,.06), transparent);
  pointer-events: none;
}
.kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(0,180,255,.22);
  border-top-color: rgba(0,212,255,.55);
  box-shadow: 0 12px 32px rgba(0,0,0,.38), 0 0 20px rgba(0,212,255,.08);
}
.kpi .n { font-size: 26px; font-weight: 900; letter-spacing: -.3px; color: #fff; line-height: 1.2; }
.kpi .l { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }

/* ── Inputs ──────────────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,180,255,.16);
  background: rgba(0,15,45,.55);
  color: var(--text);
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(0,212,255,.42);
  box-shadow: 0 0 0 4px rgba(0,180,255,.10);
}
input::placeholder, textarea::placeholder { color: var(--muted2); }
select option { background: #0a1428; color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0,180,255,.22);
  background: rgba(0,140,220,.13);
  color: var(--text);
  cursor: pointer;
  font-weight: 700; font-size: 13px;
  font-family: inherit;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .14s ease;
}
.btn .btnText { flex: 1; min-width: 0; }
.btn:hover {
  background: rgba(0,180,255,.22);
  border-color: rgba(0,212,255,.38);
  box-shadow: 0 0 16px rgba(0,212,255,.14), inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border-color: rgba(0,180,255,.16); }
.btn.ghost:hover { background: rgba(0,180,255,.08); }
.btn.danger { background: rgba(255,80,80,.12); border-color: rgba(255,80,80,.22); }
.btn.danger:hover { background: rgba(255,80,80,.22); border-color: rgba(255,80,80,.38); box-shadow: 0 0 14px rgba(255,80,80,.12); }
.btn.primary {
  background: linear-gradient(135deg, rgba(0,160,255,.38), rgba(0,100,220,.28));
  border-color: rgba(0,212,255,.40);
  box-shadow: 0 4px 14px rgba(0,180,255,.16), inset 0 1px 0 rgba(255,255,255,.10);
}
.btn.primary:hover {
  background: linear-gradient(135deg, rgba(0,180,255,.52), rgba(0,120,240,.40));
  box-shadow: 0 6px 20px rgba(0,212,255,.24), inset 0 1px 0 rgba(255,255,255,.12);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(0,180,255,.20);
  background: rgba(0,160,255,.10);
  color: rgba(200,230,255,.90);
}
.badge.ok {
  border-color: rgba(0,220,130,.28);
  background: rgba(0,200,120,.09);
  color: rgba(130,255,180,.92);
}
.badge.warn {
  border-color: rgba(255,200,60,.28);
  background: rgba(255,190,50,.09);
  color: rgba(255,220,100,.92);
}
.badge.danger {
  border-color: rgba(255,80,80,.28);
  background: rgba(255,80,80,.09);
  color: rgba(255,160,160,.92);
}

/* ── Table ───────────────────────────────────────────────── */
.tableWrap {
  width: 100%; max-width: 100%;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid rgba(0,180,255,.13);
  background: rgba(0,10,35,.72);
}
table { width: 100%; border-collapse: collapse; min-width: max-content; }
th, td {
  padding: 12px;
  border-bottom: 1px solid rgba(0,180,255,.09);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}
th {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(0,10,36,.96);
  color: rgba(180,220,255,.92);
  font-weight: 900; letter-spacing: .3px; font-size: 12px; text-transform: uppercase;
}
tr:last-child td { border-bottom: none; }
tr:hover td {
  background: rgba(0,180,255,.055);
}

/* ── Player card ─────────────────────────────────────────── */
.playerCard {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  will-change: transform;
  position: relative;
}
.playerCard::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(700px 220px at 30% 20%, rgba(0,212,255,.12), transparent 55%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.playerCard:hover {
  transform: translateY(-5px);
  border-color: rgba(0,212,255,.28);
  box-shadow: 0 18px 45px rgba(0,0,0,.45), 0 0 24px rgba(0,180,255,.12);
  filter: saturate(1.04) brightness(1.04);
}
.playerCard:hover::after { opacity: 1; }

/* ── Event cards ─────────────────────────────────────────── */
.eventsWrap { padding: 14px; }
.eventsTitle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.eventsTitle .h { font-weight: 900; letter-spacing: .2px; }
.eventsTitle .s { font-size: 12px; color: var(--muted); }

.eventsGrid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.eventCard {
  grid-column: span 4;
  border-radius: 18px;
  border: 1px solid rgba(0,180,255,.14);
  background:
    linear-gradient(180deg, rgba(0,10,30,.22), rgba(0,10,30,.80)),
    var(--img, none);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  overflow: hidden;
  min-height: 120px;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  will-change: transform;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}
.eventCard:focus-visible {
  outline: 3px solid rgba(0,212,255,.38);
  outline-offset: 3px;
}
.eventCard:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,.28);
  box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 28px rgba(0,180,255,.12);
  filter: saturate(1.06) brightness(1.06);
}
.eventInner {
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
  height: 100%; justify-content: flex-end;
}
.eventName {
  font-weight: 900; font-size: 14px; letter-spacing: .2px;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}

/* ── Modal ───────────────────────────────────────────────── */
.modalBack {
  position: fixed; inset: 0;
  background: rgba(0,5,20,.65);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  display: none; align-items: center; justify-content: center;
  padding: 18px;
  z-index: var(--z-modal);
}
.modalBack.show { display: flex; }

.modal {
  width: min(560px, 92vw);
  border-radius: 20px;
  border: 1px solid rgba(0,200,255,.18);
  background: rgba(0,12,40,.82);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  box-shadow:
    0 24px 80px rgba(0,0,0,.65),
    0 0 40px rgba(0,180,255,.08),
    inset 0 1px 0 rgba(255,255,255,.10);
  overflow: hidden;
}
.modalHead {
  padding: 16px 16px 12px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(0,180,255,.12);
}
.modalTitle { font-weight: 900; letter-spacing: .2px; font-size: 15px; }
.modalSub   { margin-top: 4px; font-size: 12px; color: rgba(180,210,255,.62); }
.modalBody  { padding: 16px; }
.modalFoot  {
  padding: 12px 16px 16px;
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(0,180,255,.12);
}
.modalCloseX {
  appearance: none;
  border: 1px solid rgba(0,180,255,.18);
  background: rgba(0,160,255,.09);
  color: rgba(200,230,255,.9);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer; font-weight: 900;
  transition: background .18s ease, border-color .18s ease;
}
.modalCloseX:hover {
  background: rgba(0,180,255,.16);
  border-color: rgba(0,212,255,.30);
}

.modalKpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.modalKpi {
  border-radius: 14px;
  border: 1px solid rgba(0,180,255,.13);
  background: rgba(0,15,50,.50);
  padding: 12px; min-width: 0;
}
.modalKpi .n { font-weight: 900; font-size: 18px; }
.modalKpi .l { color: rgba(180,210,255,.62); font-size: 12px; margin-top: 2px; }

.modalSmallTitle {
  font-weight: 900; font-size: 12px;
  color: rgba(180,210,255,.78);
  margin: 10px 0 8px;
  text-transform: uppercase; letter-spacing: .4px;
}

/* ── Sync bars ───────────────────────────────────────────── */
.syncBar {
  width: 110px; height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,180,255,.22);
  background: rgba(0,12,38,.55);
  overflow: hidden; position: relative;
  flex: 0 0 auto; display: block;
}
.syncBar > i {
  position: absolute; inset: 0;
  width: 55%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,212,255,.3), rgba(0,212,255,.75));
  filter: saturate(1.3);
  animation: syncBarMove 1.05s ease-in-out infinite;
  display: block;
}
@keyframes syncBarMove {
  0%   { transform: translateX(-90%); opacity: .65; }
  50%  { transform: translateX(90%);  opacity: 1; }
  100% { transform: translateX(-90%); opacity: .65; }
}

.syncPctWrap  { width: 160px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.syncPctBar   { flex: 1; height: 8px; border-radius: 999px; border: 1px solid rgba(0,180,255,.22); background: rgba(0,12,38,.55); overflow: hidden; display: block; }
.syncPctFill  { height: 100%; width: 0%; background: linear-gradient(90deg, rgba(0,180,255,.5), rgba(0,212,255,.9)); border-radius: 999px; transition: width .15s linear; display: block; }
.syncPctTxt   { min-width: 44px; font-size: 12px; font-weight: 900; color: rgba(200,230,255,.88); }

/* ── FC circle ───────────────────────────────────────────── */
.fcCircle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  border: 1px solid rgba(255,100,100,.60);
  background: rgba(255,100,100,.13);
  color: rgba(255,190,190,.95);
  font-weight: 900; font-size: 11px;
  box-shadow: 0 4px 12px rgba(255,80,80,.08);
  flex: 0 0 auto;
}

/* ── Search row ──────────────────────────────────────────── */
.searchRow { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.searchRow .btn, .searchRow input { height: 44px; padding-top: 0; padding-bottom: 0; }
.searchRow input { min-width: 280px; }

/* ── Misc helpers ────────────────────────────────────────── */
.muted  { color: var(--muted);  }
.muted2 { color: var(--muted2); }
.row    { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sp     { height: 12px; }
.center { width: min(520px, calc(100vw - 24px)); margin: 10vh auto; }

/* ── Sync button z-index ─────────────────────────────────── */
#syncAllBtn {
  position: relative;
  z-index: var(--z-sticky);
  pointer-events: auto;
  display: flex; align-items: center;
}

/* ── Typographie de section ──────────────────────────────── */
.sectionTitle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sectionTitle::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border2);
}

/* ── Empty state ─────────────────────────────────────────── */
.emptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted2);
}
.emptyState svg {
  opacity: .35;
  margin-bottom: 4px;
}
.emptyState .emptyTitle {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}
.emptyState .emptyDesc {
  font-size: 13px;
  max-width: 280px;
  line-height: 1.6;
}

/* ── Skeleton loader ─────────────────────────────────────── */
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg,
    rgba(0,180,255,.06) 25%,
    rgba(0,212,255,.12) 50%,
    rgba(0,180,255,.06) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  display: block;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text  { height: 14px; width: 60%; margin: 6px 0; }
.skeleton-title { height: 20px; width: 40%; margin: 6px 0; }
.skeleton-row   { height: 44px; margin: 2px 0; border-radius: 0; }

/* ── Topbar title amélioration ───────────────────────────── */
.title .h { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.title .s { font-size: 12px; font-weight: 500; color: var(--muted); }

/* ── Table header amélioré ───────────────────────────────── */
th { letter-spacing: .07em; }
td { color: var(--text); font-weight: 500; }
td.muted, td .muted { font-weight: 400; }

/* ── Rank badges ─────────────────────────────────────────── */
.rank { display:inline-flex; align-items:center; justify-content:center; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:800; letter-spacing:.04em; border:1px solid; white-space:nowrap; }
.rank-r1 { color:var(--rank-r1); background:rgba(160,180,204,.10); border-color:rgba(160,180,204,.22); }
.rank-r2 { color:var(--rank-r2); background:rgba(79,195,247,.10); border-color:rgba(79,195,247,.25); }
.rank-r3 { color:var(--rank-r3); background:rgba(179,157,219,.10); border-color:rgba(179,157,219,.25); }
.rank-r4 { color:var(--rank-r4); background:rgba(255,183,77,.10); border-color:rgba(255,183,77,.25); }
.rank-r5 { color:var(--rank-r5); background:rgba(239,83,80,.10); border-color:rgba(239,83,80,.25); }

/* ── Avatar initiales ────────────────────────────────────── */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
  flex: 0 0 32px; user-select: none;
  border: 1px solid rgba(255,255,255,.12);
}
.avatarRow { display:flex; align-items:center; gap:10px; }
.avatarRow .avatarName { font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── KPI trend ───────────────────────────────────────────── */
.kpiTrend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; margin-top: 6px;
}
.kpiTrend.up   { color: var(--color-ok);   }
.kpiTrend.down { color: var(--color-danger); }
.kpiTrend.flat { color: var(--muted2); }
.kpiTrend svg  { width:12px; height:12px; }

/* ── Toast notifications ─────────────────────────────────── */
#toastContainer {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(5,14,40,.92);
  box-shadow: 0 8px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
  min-width: 240px; max-width: 360px;
  pointer-events: auto;
  animation: toastIn .22s cubic-bezier(.34,1.56,.64,1) forwards;
  font-size: 13px; font-weight: 500;
  color: var(--text);
}
.toast.hide { animation: toastOut .18s ease forwards; }
.toastIcon { flex: 0 0 18px; margin-top:1px; }
.toastBody { flex: 1; min-width: 0; }
.toastTitle { font-weight: 800; font-size: 13px; line-height:1.3; }
.toastDesc  { font-size: 12px; color: var(--muted); margin-top:2px; }
.toast.ok     { border-color: var(--color-ok-bdr); }
.toast.ok     .toastIcon { color: var(--color-ok); }
.toast.warn   { border-color: var(--color-warn-bdr); }
.toast.warn   .toastIcon { color: var(--color-warn); }
.toast.danger { border-color: var(--color-danger-bdr); }
.toast.danger .toastIcon { color: var(--color-danger); }
@keyframes toastIn  { from { opacity:0; transform:translateX(18px) scale(.96); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; transform:none; } to { opacity:0; transform:translateX(18px) scale(.95); } }

/* ── Table sorting ───────────────────────────────────────── */
.sortable th[data-sort] { cursor:pointer; user-select:none; }
.sortable th[data-sort]:hover { color:#fff; }
.sortable th[data-sort]::after { content:' ⇅'; opacity:.35; font-size:10px; }
.sortable th[data-sort].asc::after  { content:' ↑'; opacity:.9; }
.sortable th[data-sort].desc::after { content:' ↓'; opacity:.9; }

/* ── Inline confirm ──────────────────────────────────────── */
.btn[data-confirming] {
  background: rgba(255,80,80,.22) !important;
  border-color: rgba(255,80,80,.45) !important;
  animation: confirmPulse .3s ease;
}
@keyframes confirmPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.03)} }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .eventCard, .eventCard::after,
  .playerCard, .playerCard::after,
  .kpi, .btn { transition: none; }
  .eventCard:hover, .playerCard:hover { transform: none; }
  .syncBar > i { animation: none; }
  .toast, .toast.hide { animation: none; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .shell  { grid-template-columns: 1fr; }
  .side   { position: relative; top: 0; }
  .kpi    { grid-column: span 6; }
  .eventCard { grid-column: span 6; }
}
@media (max-width: 768px) {
  body { padding: 14px; }
  .shell { gap: 12px; }
  .side  { padding: 12px; }
  .brand { padding: 6px 6px 12px; align-items: flex-start; }
  .searchRow { flex-wrap: wrap; }
  .searchRow input { min-width: 0; width: 100%; }
  .topbar { flex-direction: column; align-items: stretch; padding: 12px; }
  .title  { width: 100%; }
  .title .h { font-size: 16px; }
  .actions { width: 100%; justify-content: stretch; }
  .actions .btn, .actions a.btn { flex: 1 1 160px; justify-content: center; text-align: center; }
  .card { padding: 12px; }
  .grid { gap: 10px; }
  .grid > *[style*="grid-column: span"] { grid-column: 1 / -1 !important; }
  .row { gap: 8px; }
  input, select, textarea { font-size: 16px; }
  th, td { padding: 10px; font-size: 12px; }
  .modalBack { padding: 10px; align-items: flex-end; }
  .modal { width: min(100%, 100vw - 20px); max-height: 85dvh; border-radius: 16px 16px 0 0; overflow: auto; }
  .modalHead, .modalBody, .modalFoot { padding-left: 12px; padding-right: 12px; }
  .modalKpis { grid-template-columns: 1fr; }
  .center { width: min(100%, calc(100vw - 20px)); margin: 24px auto; }
}
@media (max-width: 560px) {
  body { padding: 10px; }
  .eventsWrap { padding: 10px; }
  .eventCard { grid-column: span 12; min-height: 100px; }
  .eventInner { padding: 12px; }
  .eventName  { font-size: 13px; }
  .brand h1   { font-size: 13px; }
  .brand p    { font-size: 11px; }
  .nav a, .nav button:not(.btn) { padding: 10px; font-size: 12px; }
  .btn        { width: 100%; justify-content: center; }
  .kpi        { grid-column: span 12; }
}
