/* ============================================================================
   Thème sombre du panel. Rouge en accent, pour coller au gamemode.
   ============================================================================ */

:root {
    --bg:        #0d0f12;
    --panel:     #15181d;
    --panel-2:   #1b1f25;
    --line:      #262b33;
    --text:      #e6e8ea;
    --muted:     #8b9199;
    --accent:    #e4504d;
    --accent-dim:#7a2a28;
    --green:     #4aa05f;
    --orange:    #d7903a;
    --blue:      #4a7fd4;
    --radius:    10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------------ Barre */

.topbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 18px;
    height: 52px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    margin-right: 18px;
    white-space: nowrap;
}

.brand .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.nav { display: flex; gap: 2px; overflow-x: auto; }

.nav a {
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--muted);
    white-space: nowrap;
    transition: background .12s, color .12s;
}

.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.on    { background: var(--accent-dim); color: #fff; }

.me {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.me img { width: 26px; height: 26px; border-radius: 50%; }
.me .out { color: var(--muted); font-size: 12px; }
.me .out:hover { color: var(--accent); }

/* ----------------------------------------------------------------- Pages */

.wrap { padding: 18px; max-width: 1500px; margin: 0 auto; }

.grid { display: grid; gap: 14px; }
.grid.two  { grid-template-columns: 1fr 1fr; }
.grid.four { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
    .grid.two, .grid.four { grid-template-columns: 1fr; }
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.card > h2 {
    margin: 0;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    text-transform: uppercase;
}

.card .body { padding: 15px; }

.kpi { padding: 16px 18px; }
.kpi .n { font-size: 28px; font-weight: 650; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* --------------------------------------------------------------- Tableaux */

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
    text-align: left;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--muted);
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
    position: sticky;
    top: 52px;
}

td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

tbody tr:hover { background: var(--panel-2); }

.when  { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg   { color: var(--text); }
.data  { color: var(--muted); font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ Tags */

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--muted);
    white-space: nowrap;
}

.tag.info  { border-color: #2c3a4e; color: #7fa5dd; }
.tag.warn  { border-color: #4e3f22; color: var(--orange); }
.tag.alert { border-color: #4e2523; color: var(--accent); }

.who { color: var(--text); }
.who small { color: var(--muted); }

/* --------------------------------------------------------------- Filtres */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
}

input, select, button {
    font: inherit;
    color: var(--text);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 7px 10px;
    outline: none;
}

input:focus, select:focus { border-color: var(--accent-dim); }
input[type=search] { min-width: 230px; }

button {
    cursor: pointer;
    background: var(--accent-dim);
    border-color: transparent;
    color: #fff;
}

button:hover { filter: brightness(1.15); }
button.ghost { background: var(--panel-2); color: var(--muted); }

.pager {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 15px;
    color: var(--muted);
}

/* ----------------------------------------------------------------- Login */

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login .box {
    width: 340px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 34px 28px;
    text-align: center;
}

.login h1 { margin: 14px 0 6px; font-size: 20px; }
.login p  { margin: 0 0 22px; color: var(--muted); font-size: 13px; }

.login .mark {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 14px;
    background: var(--accent-dim);
    display: grid;
    place-items: center;
    font-size: 24px;
}

.btn-discord {
    display: block;
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    background: #5865f2;
    color: #fff;
    font-weight: 500;
}

.btn-discord:hover { filter: brightness(1.1); }

/* ------------------------------------------------------------------ Divers */

#map { height: 460px; background: #0a1016; }
canvas { max-width: 100%; }
