/* Dashboard Assistant ZG — Zone GFX · Dev - by - Dowly */
:root {
    --bg: #07070a;
    --bg-2: #0c0c11;
    --panel: rgba(20, 20, 28, .72);
    --panel-solid: #12121a;
    --panel-2: rgba(255, 255, 255, .035);
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);
    --text: #f1f1f6;
    --muted: #9a9aab;
    --faint: #5f5f70;
    --accent: #ad4cee;
    --accent-2: #7c3aed;
    --accent-glow: rgba(173, 76, 238, .35);
    --accent-soft: rgba(173, 76, 238, .13);
    --cyan: #22d3ee;
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, .12);
    --yellow: #facc15;
    --orange: #fb923c;
    --red: #f43f5e;
    --red-soft: rgba(244, 63, 94, .12);
    --blue: #6366f1;
    --radius: 14px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: -20% -10% auto; height: 70vh; pointer-events: none; z-index: 0;
    background: radial-gradient(45% 60% at 20% 0%, rgba(173,76,238,.16), transparent 70%), radial-gradient(35% 50% at 85% 10%, rgba(34,211,238,.08), transparent 70%); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent-glow); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
[hidden] { display: none !important; }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 100% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes slideIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pop { 0% { transform: scale(.94); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.page > * { animation: rise .55s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .04s; } .page > *:nth-child(3) { animation-delay: .08s; }
.page > *:nth-child(4) { animation-delay: .12s; } .page > *:nth-child(5) { animation-delay: .16s; }
.page > *:nth-child(6) { animation-delay: .2s; }  .page > *:nth-child(n+7) { animation-delay: .24s; }
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .05s; } .stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .15s; } .stagger > *:nth-child(4) { animation-delay: .2s; }
.stagger > *:nth-child(5) { animation-delay: .25s; } .stagger > *:nth-child(n+6) { animation-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

/* ---------- Layout ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 60px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 20;
    background: rgba(7,7,10,.7); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 20px -6px var(--accent-glow); }
.brand small { display: block; font-size: 10.5px; color: var(--faint); font-weight: 500; letter-spacing: .02em; }
.guild-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 13px; background: var(--panel-2); }
.guild-chip img { width: 24px; height: 24px; border-radius: 50%; }
.search-btn { flex: 1; max-width: 440px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--panel-2); color: var(--faint); text-align: left; transition: border-color .2s, background .2s; }
.search-btn:hover { border-color: var(--line-2); background: rgba(255,255,255,.05); }
.search-btn span { flex: 1; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); background: rgba(255,255,255,.04); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
    color: var(--green); background: var(--green-soft); border: 1px solid rgba(34,197,94,.25); }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ring 1.8s infinite; }
.live-pill.down { color: var(--red); background: var(--red-soft); border-color: rgba(244,63,94,.3); }
.live-pill.down i { animation: none; }
.live-pill .mono { font-weight: 500; opacity: .8; }
.me { display: flex; align-items: center; gap: 6px; }
.me img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-2); }
.icon-btn { background: none; border: 1px solid transparent; border-radius: 9px; padding: 7px; color: var(--muted); display: inline-grid; place-items: center; transition: .2s var(--ease); }
.icon-btn:hover { color: var(--text); background: var(--panel-2); border-color: var(--line); }
.menu-btn { display: none; }

.sidebar { border-right: 1px solid var(--line); padding: 16px 12px 24px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; background: rgba(7,7,10,.4); }
.nav-group { margin-bottom: 18px; }
.nav-title { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--faint); padding: 4px 12px 6px; text-transform: uppercase; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; transition: color .2s, background .2s, transform .2s var(--ease); }
.nav-link:hover { color: var(--text); background: var(--panel-2); transform: translateX(2px); }
.nav-link.active { color: var(--text); background: linear-gradient(90deg, var(--accent-soft), transparent 90%); }
.nav-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-link.active svg { color: var(--accent); }
.nav-badge { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: #d8b4fe; }
.nav-badge.live { background: var(--green-soft); color: var(--green); }
.side-foot { display: flex; gap: 10px; align-items: center; margin: 10px 4px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); font-size: 12px; }
.side-foot img { width: 30px; height: 30px; border-radius: 50%; }
.side-foot b { display: block; font-size: 13px; }

.main { padding: 30px 28px 70px; min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.03em; font-weight: 700;
    background: linear-gradient(180deg, #fff, #b9b9c9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .25s, transform .25s var(--ease); }
.card.hover:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: 14.5px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.card-head p { margin: 0; font-size: 12px; color: var(--muted); width: 100%; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.card-icon.green { background: var(--green-soft); color: var(--green); }
.card-icon.red { background: var(--red-soft); color: var(--red); }
.card-icon.cyan { background: rgba(34,211,238,.12); color: var(--cyan); }
.card-icon.yellow { background: rgba(250,204,21,.12); color: var(--yellow); }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.span-2 { grid-column: span 2; }
.mb { margin-bottom: 16px; }

/* ---------- KPI ---------- */
.kpi { padding: 16px 18px 14px; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--kc, var(--accent-glow)), transparent 70%); opacity: .5; pointer-events: none; transition: opacity .3s; }
.kpi:hover::after { opacity: .9; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--kt, var(--accent)); }
.kpi-val { font-family: var(--mono); font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin: 10px 0 4px; line-height: 1; }
.kpi-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-height: 20px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.delta.down { background: var(--red-soft); color: var(--red); }
.delta.flat { background: var(--panel-2); color: var(--muted); }
.spark { display: block; width: 100%; height: 40px; margin-top: 10px; overflow: visible; }
.spark .ln { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1.4s var(--ease) .2s forwards; }
.spark .ar { animation: fade 1s ease .6s both; }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 290px; padding: 12px 16px 16px; }
.chart-box.sm { height: 220px; }
.chart-box.xs { height: 180px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

.heatmap { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; padding: 16px 18px 18px; font-size: 10.5px; color: var(--faint); }
.heatmap .hl { display: flex; align-items: center; font-weight: 600; }
.heatmap .hh { text-align: center; }
.heat { aspect-ratio: 1; border-radius: 4px; background: rgba(173,76,238,var(--a)); border: 1px solid rgba(255,255,255,.03); animation: pop .4s var(--ease) both; transition: transform .15s, outline-color .15s; outline: 1px solid transparent; }
.heat:hover { transform: scale(1.35); outline-color: rgba(255,255,255,.6); z-index: 2; position: relative; }

/* ---------- Boutons & contrôles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13px; transition: transform .15s var(--ease), border-color .2s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px var(--accent-glow); }
.btn.primary:hover { box-shadow: 0 10px 30px -8px var(--accent-glow); filter: brightness(1.08); }
.btn.danger { background: var(--red-soft); border-color: rgba(244,63,94,.35); color: #fda4af; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); position: relative; }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; transition: color .2s; }
.seg button.on { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 14px -6px var(--accent-glow); }
.seg button:not(.on):hover { color: var(--text); }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label, .label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.field small { color: var(--faint); font-size: 11.5px; }
.input, select.input, textarea.input { width: 100%; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9aab' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-row { display: flex; gap: 10px; align-items: center; }
.color-input { width: 44px; height: 38px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.35); cursor: pointer; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row output { font-family: var(--mono); min-width: 44px; text-align: right; font-weight: 600; }
input[type=range] { flex: 1; accent-color: var(--accent); }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: rgba(255,255,255,.1); border-radius: 24px; transition: background .25s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #d4d4dc; transition: transform .3s var(--ease), background .25s; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.switch input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
.switch input:disabled + span { opacity: .45; cursor: default; }

.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(0,0,0,.35); min-height: 44px; transition: border-color .2s; }
.chips-input:focus-within { border-color: var(--accent); }
.chips-input input { flex: 1; min-width: 140px; border: 0; background: none; outline: none; padding: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); animation: pop .25s var(--ease); }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip button { border: 0; background: none; color: var(--faint); padding: 0; line-height: 1; font-size: 14px; }
.chip button:hover { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .2s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255,255,255,.015); }
.row > div:first-child { flex: 1; min-width: 0; }
.row b { display: block; font-size: 13.5px; font-weight: 600; }
.row small { color: var(--muted); font-size: 12.5px; }

details.mod { border-bottom: 1px solid var(--line); }
details.mod:last-child { border-bottom: 0; }
details.mod summary { list-style: none; cursor: pointer; }
details.mod summary::-webkit-details-marker { display: none; }
details.mod .chev { transition: transform .25s var(--ease); color: var(--faint); }
details.mod[open] .chev { transform: rotate(180deg); }
.mod-body { padding: 4px 18px 18px 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 18px; animation: rise .35s var(--ease); }

/* ---------- Listes ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(173,76,238,.05); }
.reason { color: var(--muted); max-width: 420px; overflow-wrap: anywhere; }

.user { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.user img { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--panel-2); }
.user b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border: 0; }
.rank-n { font-family: var(--mono); color: var(--faint); width: 24px; font-size: 12px; font-weight: 600; }
.rank-n.gold { color: #fbbf24; } .rank-n.silver { color: #cbd5e1; } .rank-n.bronze { color: #d97706; }
.rank-v { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.hbar { height: 5px; background: rgba(255,255,255,.06); border-radius: 5px; margin-top: 6px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.feed-row { display: grid; grid-template-columns: 54px 84px 1fr; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; transition: background .2s; }
.feed-row:hover { background: rgba(255,255,255,.015); }
.feed-row:last-child { border-bottom: 0; }
.feed-time { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.tag { justify-self: start; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: rgba(99,102,241,.12); color: #a5b4fc; }
.t-warn { background: rgba(250,204,21,.1); color: var(--yellow); }
.t-mute, .t-timeout, .t-kick, .t-derank { background: rgba(251,146,60,.1); color: var(--orange); }
.t-ban { background: var(--red-soft); color: #fb7185; }
.t-unban, .t-unmute, .t-backup { background: var(--green-soft); color: var(--green); }
.feed-txt b { font-weight: 600; }
.feed-txt .muted { font-size: 12px; }

.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font-size: 12px; color: var(--muted); font-weight: 600; transition: .2s; }
.tabs button.on { color: var(--text); background: rgba(255,255,255,.08); }

.livebadge { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--green); letter-spacing: .08em; display: inline-flex; gap: 7px; align-items: center; }
.livebadge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }

/* ---------- Gauge / donut ---------- */
.gauge-wrap { display: flex; gap: 20px; align-items: center; padding: 20px 18px; }
.gauge { width: 120px; height: 120px; position: relative; flex: none; }
.gauge svg { transform: rotate(-90deg); }
.gauge .arc { transition: stroke-dasharray 1.4s var(--ease); filter: drop-shadow(0 0 8px currentColor); }
.gauge-val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge-val b { font-family: var(--mono); font-size: 30px; display: block; line-height: 1; }
.gauge-val small { font-size: 10.5px; color: var(--muted); }
.risk { font-size: 20px; font-weight: 700; margin: 2px 0 4px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-family: var(--mono); text-align: right; }

/* ---------- Quick actions & todo ---------- */
.quick a { display: flex; gap: 12px; align-items: center; padding: 15px 16px; }
.quick b { display: block; font-size: 13.5px; }
.quick small { color: var(--muted); font-size: 12px; }
.qi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; transition: transform .3s var(--ease); }
.quick a:hover .qi { transform: rotate(-8deg) scale(1.08); }
.qi.red { background: var(--red-soft); color: var(--red); } .qi.cyan { background: rgba(34,211,238,.12); color: var(--cyan); } .qi.green { background: var(--green-soft); color: var(--green); }
.todo summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; }
.todo summary::-webkit-details-marker { display: none; }
.todo summary small { color: var(--muted); font-size: 12px; display: block; }
.todo summary em { color: var(--red); font-style: normal; }
.progress { display: flex; align-items: center; gap: 10px; margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bar { width: 110px; height: 6px; background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #4ade80); border-radius: 6px; transform-origin: left; animation: grow 1.2s var(--ease) both; }
.todo ul { margin: 0; padding: 4px 18px 14px; list-style: none; border-top: 1px solid var(--line); }
.todo li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.todo li:last-child { border: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); flex: none; transform: translateY(-1px); }
.dot.red { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- Live ---------- */
.voice-card { padding: 14px 16px; }
.voice-card h3 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.voice-card h3 .mono { margin-left: auto; color: var(--muted); font-size: 12px; }
.vm { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13px; animation: rise .4s var(--ease) both; }
.vm img { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(34,197,94,.35); }
.vm .ic { margin-left: auto; display: flex; gap: 5px; color: var(--faint); }
.vm .ic .on { color: var(--red); }
.vm .ic .live { color: #fff; background: var(--red); font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .04em; }

/* ---------- Membre ---------- */
.member-head { display: flex; gap: 16px; align-items: center; padding: 22px 18px 16px; }
.member-head img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 3px var(--panel-solid), 0 0 0 5px var(--accent-soft); }
.member-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill.red { background: var(--red-soft); color: #fda4af; } .pill.green { background: var(--green-soft); color: var(--green); } .pill.yellow { background: rgba(250,204,21,.12); color: var(--yellow); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.mini-stats div { padding: 13px 18px; border-right: 1px solid var(--line); }
.mini-stats div:last-child { border: 0; }
.mini-stats small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.mini-stats b { font-family: var(--mono); font-size: 19px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); }

/* ---------- Aperçu Discord ---------- */
.dc-preview { background: #313338; border-radius: 12px; padding: 16px; font-family: 'gg sans', 'Inter', sans-serif; color: #dbdee1; font-size: 14.5px; }
.dc-msg { display: flex; gap: 14px; }
.dc-msg > img { width: 40px; height: 40px; border-radius: 50%; }
.dc-name { font-weight: 600; color: #fff; }
.dc-bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: 5px; vertical-align: 2px; }
.dc-time { color: #949ba4; font-size: 12px; margin-left: 6px; }
.dc-content { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.dc-embed { margin-top: 6px; max-width: 520px; background: #2b2d31; border-left: 4px solid var(--ec, #ad4cee); border-radius: 4px; padding: 10px 14px 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dc-embed .t { font-weight: 700; color: #fff; }
.dc-embed .d { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.dc-embed .th { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; grid-row: span 2; }
.dc-embed .im { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; margin-top: 6px; }
.dc-embed .f { grid-column: 1 / -1; font-size: 12px; color: #b5bac1; }

/* ---------- Divers ---------- */
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
.empty svg { color: var(--faint); margin-bottom: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.06) 50%, rgba(255,255,255,.02) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border: 1px solid var(--line); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); color: #c7d2fe; font-size: 12.5px; }
.note.warn { background: rgba(250,204,21,.07); border-color: rgba(250,204,21,.2); color: #fde68a; }
.sticky-save { position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 14px; margin-top: 16px; border-radius: 14px; background: rgba(18,18,26,.85); backdrop-filter: blur(12px); border: 1px solid var(--line-2); animation: rise .4s var(--ease); }
.sticky-save span { margin-right: auto; align-self: center; color: var(--muted); font-size: 12.5px; }

.logbox { background: #040406; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; line-height: 1.65; padding: 12px 18px; max-height: 440px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #b9b9c7; border-radius: 0 0 var(--radius) var(--radius); }
.logbox .err { color: #fda4af; } .logbox .warn { color: #fde68a; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: start center; padding: 12vh 16px 16px; z-index: 50; backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal { width: 100%; max-width: 460px; animation: pop .3s var(--ease); background: var(--panel-solid); }
.modal .card-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }

.palette { max-width: 560px; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 16px 18px; font-size: 15px; outline: none; }
.palette-list { max-height: 50vh; overflow: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.palette-item.sel, .palette-item:hover { background: var(--accent-soft); color: var(--text); }
.palette-item small { margin-left: auto; color: var(--faint); font-size: 11px; }
.palette-sec { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 10px 12px 4px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(18,18,26,.95); backdrop-filter: blur(12px); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 16px; font-weight: 500; z-index: 60; box-shadow: 0 16px 40px rgba(0,0,0,.55); max-width: calc(100vw - 32px); animation: slideIn .35s var(--ease); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex: none; }
.toast.err::before { background: var(--red); box-shadow: 0 0 10px var(--red); }

/* ---------- Login ---------- */
.login { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 400px; padding: 34px 28px; text-align: center; animation: pop .5s var(--ease); }
.login .brand-logo { width: 56px; height: 56px; font-size: 19px; border-radius: 16px; margin: 0 auto 18px; animation: glow 3s infinite; }
.login h1 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.02em; }
.login p { color: var(--muted); margin: 0 0 24px; }
.discord-btn { width: 100%; background: #5865f2; border-color: #5865f2; color: #fff; padding: 11px; }
.discord-btn:hover { background: #4752c4; }
.login .err { margin-top: 14px; color: #fda4af; font-size: 13px; }

/* ---------- Ajouts : 5 colonnes, notifications, lockdown ---------- */
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.quick.g-5 a { padding: 14px; gap: 11px; }
.t-voice { background: rgba(99,102,241,.14); color: #a5b4fc; }
.chip.on { border-color: rgba(34,197,94,.3); color: #86efac; background: rgba(34,197,94,.07); }
.chip.off { border-color: rgba(244,63,94,.3); color: #fda4af; background: rgba(244,63,94,.07); }

.bell-wrap { position: relative; }
.bell-dot { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; color: #fff; background: var(--red); box-shadow: 0 0 0 2px var(--bg), 0 0 10px var(--red); animation: pop .3s var(--ease); }
.bell-panel { position: absolute; right: -60px; top: calc(100% + 10px); width: min(420px, calc(100vw - 24px)); background: var(--panel-solid); z-index: 40; animation: pop .25s var(--ease); transform-origin: top right; }
.bell-list { max-height: 60vh; overflow: auto; }
.bell-item { display: grid; grid-template-columns: 46px 78px 1fr; gap: 8px; align-items: baseline; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; position: relative; }
.bell-item:last-child { border: 0; }
.bell-item.new { background: rgba(173,76,238,.06); }
.bell-item.new::before { content: ''; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.lock-banner { max-width: 1200px; margin: 0 auto 18px; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; color: #fecdd3;
    background: linear-gradient(90deg, rgba(244,63,94,.18), rgba(244,63,94,.06)); border: 1px solid rgba(244,63,94,.35); animation: rise .4s var(--ease), lockpulse 2.4s ease-in-out infinite; }
.lock-banner.running { color: var(--text); background: rgba(173,76,238,.1); border-color: rgba(173,76,238,.35); animation: rise .4s var(--ease); }
.lock-banner .spin { border-color: rgba(255,255,255,.2); border-top-color: var(--accent); }
@keyframes lockpulse { 50% { box-shadow: 0 0 0 4px rgba(244,63,94,.08); } }

/* ---------- Panneau latéral (membres d'un rôle) ---------- */
.role-row { cursor: pointer; }
.role-row:hover .chev { color: var(--accent); transform: translateX(3px); }
.role-row .chev { transition: transform .2s var(--ease), color .2s; }
@keyframes slideFromRight { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-bg { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); animation: fade .2s ease; }
.drawer-bg.closing { opacity: 0; transition: opacity .25s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--panel-solid); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; animation: slideFromRight .35s var(--ease); box-shadow: -30px 0 60px rgba(0,0,0,.5); }
.drawer-list { flex: 1; overflow: auto; padding-bottom: 16px; }
.drawer-item { display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-bottom: 1px solid var(--line); font-size: 13px; transition: background .15s; }
.drawer-item:hover { background: rgba(255,255,255,.02); }
.drawer-item.click { cursor: pointer; }
.drawer-item.click:hover { background: var(--accent-soft); }

.drawer-profile { flex: 1; overflow: auto; padding-bottom: 20px; animation: slideFromRight .3s var(--ease); }
.drawer-profile .member-head img { width: 64px; height: 64px; }
.back-btn { margin: 12px 14px 0; }
.chip.sel-role { border-color: var(--accent); background: var(--accent-soft); color: #fff; }

/* ---------- Pagination à flèches ---------- */
.pager-btn { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); }
.pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pager-btn:disabled { opacity: .3; cursor: default; }
@keyframes slideL { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.page-slide.from-right { animation: slideR .3s var(--ease); }
.page-slide.from-left { animation: slideL .3s var(--ease); }

/* ---------- Sanctions ---------- */
.chip.pick { cursor: pointer; color: var(--muted); transition: all .15s; font: inherit; font-size: 12px; }
.chip.pick:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.pick.sel { color: #fff; background: var(--accent-soft); border-color: var(--accent); }

/* ---------- Accès au dashboard ---------- */
.presence { position: relative; width: 42px; height: 42px; flex: none; }
.presence img { width: 42px; height: 42px; border-radius: 50%; }
.presence i { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #4b4b57; border: 3px solid var(--panel-solid); }
.presence.on i { background: var(--green); animation: ring 1.8s infinite; }
.session { display: flex; gap: 12px; align-items: center; margin: 6px 14px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0,0,0,.2); }
.session.on { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.04); }
.session b { display: block; font-size: 12.5px; font-weight: 600; }
.session small { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); flex: none; }
.session.on .session-ic { color: var(--green); }
.access-user { padding-bottom: 10px; }
.block-banner { display: flex; align-items: center; gap: 10px; margin: 12px 14px 4px; padding: 10px 12px; border-radius: 11px; color: #fecdd3; background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.35); animation: rise .35s var(--ease); }
.block-banner b { display: block; font-size: 12.5px; }
.block-banner small { display: block; font-size: 11.5px; color: #fda4af; opacity: .85; }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) { .g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bell-panel { right: -100px; } }
@media (max-width: 1180px) {
    .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .g-3 { grid-template-columns: 1fr; }
    .g-2 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
}
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; top: 60px; left: 0; bottom: 0; width: 270px; background: var(--bg-2); z-index: 30; transform: translateX(-100%); transition: transform .3s var(--ease); height: auto; }
    .shell.nav-open .sidebar { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.6); }
    .menu-btn { display: inline-grid; }
    .guild-chip, .brand small, .live-pill .mono { display: none; }
    .main { padding: 22px 16px 60px; }
    .search-btn kbd { display: none; }
}
@media (max-width: 560px) {
    .g-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi { padding: 14px; }
    .kpi-val { font-size: 22px; }
    .brand span { display: none; }
    .search-btn span { display: none; }
    .search-btn { flex: 0; margin: 0 0 0 auto; }
    .feed-row { grid-template-columns: 46px 1fr; }
    .feed-row .feed-txt { grid-column: 1 / -1; }
    .table .hide-sm { display: none; }
    .table th, .table td { padding: 10px 12px; }
    .page-head h1 { font-size: 24px; }
    .heatmap { grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 2px; padding: 12px; }
    .heatmap .hh { visibility: hidden; }
    .heatmap .hh:nth-child(6n + 2) { visibility: visible; }
}
