:root {
  --bg: #17191e;
  --side: #111317;
  --card: #20232a;
  --card-2: #272b34;
  --card-3: #2e333d;
  --line: #2f343e;
  --line-soft: #252932;
  --text: #e8eaee;
  --muted: #9aa1ad;
  --dim: #6c7380;
  --accent: #9d5cf0;
  --accent-2: #b98aff;
  --accent-soft: rgba(157, 92, 240, .14);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, .12);
  --red: #f05252;
  --red-soft: rgba(240, 82, 82, .12);
  --yellow: #f5b544;
  --yellow-soft: rgba(245, 181, 68, .12);
  --radius: 10px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side-w: 300px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #353a45; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none;
  background: var(--side);
  border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 19px; }
.logo svg { width: 28px; height: 28px; }
.brand-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--accent-2); border: 1px solid #3a2f52; background: #1b1626;
  padding: 4px 8px; border-radius: 6px;
}

.server-card { padding: 18px 22px 14px; border-bottom: 1px solid var(--line-soft); }
.server-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.server-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.server-addr {
  color: var(--muted); font-size: 13px; margin-top: 2px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; display: block;
}
.server-addr:hover { color: var(--text); }
.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); border: 1px solid rgba(74,222,128,.28);
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.off { background: var(--red-soft); color: var(--red); border-color: rgba(240,82,82,.28); }
.pill.wait { background: var(--yellow-soft); color: var(--yellow); border-color: rgba(245,181,68,.28); }
.pill.wait::before { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.stats-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; margin-top: 16px; font-size: 13.5px; }
.stats-mini div { display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.stats-mini b { margin-left: auto; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-mini svg.i { width: 16px; height: 16px; }

.nav { flex: 1; overflow-y: auto; padding: 12px 12px 18px; }
.nav a, .nav .group-title {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 8px; color: #cfd3da; font-weight: 500; font-size: 15.5px;
  position: relative; cursor: pointer; user-select: none;
}
.nav a:hover, .nav .group-title:hover { background: #1a1d23; color: var(--text); }
.nav a.active { background: #20232a; color: #fff; }
.nav a.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--accent);
}
.nav .group-title .chev { margin-left: auto; transition: transform .2s; }
.nav .group.closed .chev { transform: rotate(-90deg); }
.nav .group.closed .group-items { display: none; }
.nav .group-items a { padding-left: 48px; }
.nav .sep { height: 1px; background: var(--line-soft); margin: 10px 6px; }

.side-foot { border-top: 1px solid var(--line-soft); background: #15171b; padding: 14px 18px; }
.user { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--card-2); display: grid; place-items: center; font-weight: 700; flex: none; border: 2px solid #2b2f38; image-rendering: pixelated; }
.avatar img { width: 100%; height: 100%; }
.user-name { font-weight: 600; }
.user-role { color: var(--muted); font-size: 13px; }

.main { flex: 1; min-width: 0; padding: 30px 38px 60px; }
.mobile-bar { display: none; }

/* ---------- Éléments communs ---------- */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.page-head .grow { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 21px; font-weight: 700; flex-wrap: wrap; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.crumbs a:hover { color: var(--text); }
.crumbs .slash { color: var(--dim); font-weight: 400; }
.crumbs .cur { color: var(--text); }

.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; background: var(--card-2); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.card-body { padding: 18px 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-weight: 600; font-size: 14.5px;
  cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--card-2); border-color: #3a404b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #8b47e6; }
.btn.green { color: var(--green); border-color: rgba(74,222,128,.3); background: var(--green-soft); }
.btn.green:hover { background: rgba(74,222,128,.2); }
.btn.red { color: var(--red); border-color: rgba(240,82,82,.3); background: var(--red-soft); }
.btn.red:hover { background: rgba(240,82,82,.2); }
.btn.yellow { color: var(--yellow); border-color: rgba(245,181,68,.3); background: var(--yellow-soft); }
.btn.yellow:hover { background: rgba(245,181,68,.2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 7px 9px; }
.btn.ghost:hover { background: var(--card-2); color: var(--text); }
.btn.sm { padding: 6px 11px; font-size: 13.5px; }

.input, select.input, textarea.input {
  width: 100%; background: #181a1f; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.mono { font-family: var(--mono); font-size: 14px; }
label.field { display: block; }
label.field > span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

.empty { color: var(--muted); text-align: center; padding: 50px 20px; }
.muted { color: var(--muted); }

/* ---------- Console ---------- */
.power { display: flex; gap: 8px; flex-wrap: wrap; }
.console-card { display: flex; flex-direction: column; overflow: hidden; }
.console-card .card-head { padding: 14px 22px; }
.console-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.uptime { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; font-size: 15px; }
.console-search { width: 0; padding: 0; border: 0; opacity: 0; transition: width .2s, opacity .2s; }
.console-search.open { width: 200px; padding: 6px 10px; border: 1px solid var(--line); opacity: 1; }
.console {
  height: 58vh; min-height: 320px; overflow-y: auto; padding: 14px 22px;
  background: #1a1c21; font: 13.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word;
}
.console .l { min-height: 1.6em; }
.console .l.warn { color: #f5c46a; }
.console .l.err { color: #ff7b7b; }
.console .l.cmd { color: var(--accent-2); }
.console .l.panel { color: #7dd3fc; }
.console .l.hide { display: none; }
.console mark { background: rgba(157,92,240,.4); color: #fff; border-radius: 2px; }
.console-input { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); background: #1d2025; padding: 4px 16px; }
.console-input span { color: var(--accent-2); font-family: var(--mono); font-weight: 500; }
.console-input input { flex: 1; background: transparent; border: 0; outline: none; padding: 12px 0; font-family: var(--mono); font-size: 14px; }
.console-card.full { position: fixed; inset: 16px; z-index: 50; }
.console-card.full .console { height: auto; flex: 1; }
.scroll-down { position: absolute; right: 30px; bottom: 70px; display: none; }
.console-wrap { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }

.graphs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.graph { padding: 16px 18px 12px; }
.graph-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.graph-top b { color: var(--text); margin-left: auto; font-size: 16px; }
.graph svg.spark { width: 100%; height: 64px; margin-top: 10px; display: block; overflow: visible; }
.players-online { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 8px; background: var(--card-2); font-size: 14px; }
.chip img { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }

/* ---------- Fichiers ---------- */
.files-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.toolbar .search { width: 280px; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 700; font-size: 14.5px; padding: 15px 14px; background: var(--card-2); color: #d7dbe1; }
.table th:first-child { border-radius: var(--radius) 0 0 0; }
.table th:last-child { border-radius: 0 var(--radius) 0 0; }
.table td { padding: 13px 14px; border-top: 1px solid var(--line-soft); font-size: 14.5px; }
.table tr.row:hover td { background: #252930; }
.table tr.row.sel td { background: #2a2536; }
.table .num { text-align: right; color: var(--muted); white-space: nowrap; }
.table .date { color: var(--muted); white-space: nowrap; }
.fname { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 0; }
.fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname:hover span { color: var(--accent-2); }
.ico-dir { color: #f2c25c; }
.ico-jar { color: #e88a4e; }
.ico-cfg { color: #f2c25c; }
.ico-file { color: var(--muted); }
.star { cursor: pointer; color: var(--dim); display: inline-flex; }
.star:hover { color: var(--text); }
.star.on { color: #f5c046; }
.star.on svg { fill: currentColor; }
.check { width: 20px; height: 20px; border: 2px solid #4a505c; border-radius: 4px; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.check.on { background: var(--accent); border-color: var(--accent); }
.check svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; display: none; }
.check.on svg { display: block; }
.dropzone-active { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.quick { position: sticky; top: 20px; }
.quick .card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.quick .card-head svg { color: #f5c046; fill: #f5c046; }
.quick-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; }
.quick-item:hover { background: var(--card-2); }
.quick-item .qname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-item .star { color: #f5c046; }

.menu {
  position: fixed; z-index: 80; min-width: 190px; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.menu button { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; padding: 9px 12px; border-radius: 6px; cursor: pointer; text-align: left; font-size: 14.5px; }
.menu button:hover { background: var(--card-3); }
.menu button.danger { color: var(--red); }

.editor-wrap { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 400px; }
.editor {
  flex: 1; resize: none; width: 100%; border: 0; outline: none; background: #1a1c21; color: var(--text);
  font: 13.5px/1.6 var(--mono); padding: 16px 20px; tab-size: 4; border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------- Options ---------- */
.tabs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.tab-card { padding: 18px 22px; cursor: pointer; border: 1px solid var(--line-soft); }
.tab-card:hover { border-color: #3a404b; }
.tab-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tab-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.tab-card p { margin: 0; color: var(--muted); font-size: 14px; }
.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.opt-grid .wide { grid-column: 1 / -1; }
.opt-card .card-head h2 { font-size: 17px; }
.opt-card p.desc { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #3a3f4a; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.save-bar {
  position: sticky; bottom: 18px; margin-top: 20px; display: flex; align-items: center; gap: 14px;
  background: var(--card-2); border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.save-bar .grow { flex: 1; color: var(--muted); }

/* ---------- Listes (sauvegardes, audit) ---------- */
.list-row { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row .ico { width: 42px; height: 42px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; flex: none; }
.list-row .info { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .sub { color: var(--muted); font-size: 13.5px; }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: var(--radius); background: var(--yellow-soft); border: 1px solid rgba(245,181,68,.3); color: #f6d38d; margin-bottom: 18px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modale & toasts ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,6,8,.65); z-index: 90; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 440px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.modal p { margin: 0 0 18px; color: var(--muted); }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--card-2); border: 1px solid var(--line); border-left: 4px solid var(--green); padding: 12px 16px; border-radius: 8px; min-width: 260px; max-width: 380px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: slide .2s; font-size: 14.5px; }
.toast.err { border-left-color: var(--red); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Connexion ---------- */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 50% -10%, rgba(157,92,240,.18), transparent 70%), var(--bg);
}
.login-card { width: 400px; max-width: 100%; padding: 34px 32px 30px; }
.login-card .logo { justify-content: center; font-size: 24px; margin-bottom: 6px; }
.login-card .logo svg { width: 36px; height: 36px; }
.login-card p.sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.login-card form { display: grid; gap: 16px; }
.login-card .btn { width: 100%; padding: 12px; margin-top: 4px; }
.login-err { color: var(--red); font-size: 14px; min-height: 20px; text-align: center; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .files-layout { grid-template-columns: 1fr; }
  .quick { position: static; }
  .graphs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--side); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 40; }
  .layout { flex-direction: column; }
  .main { padding: 20px 16px 50px; }
  .opt-grid, .tabs-cards { grid-template-columns: 1fr; }
  .table .hide-sm { display: none; }
  .console { height: 55vh; padding: 12px; font-size: 12.5px; }
  .console-card .card-head h2 { display: none; }
  .console-card .card-head { padding: 10px 12px; }
  .console-search.open { width: 130px; }
}
.grep-row { display: block; }
.grep-row:hover { background: var(--card-2); }
.grep-row mark { background: rgba(157,92,240,.4); color: #fff; border-radius: 2px; }

/* ---------- Éditeur CodeMirror ---------- */
.editor-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.editor-host .CodeMirror { flex: 1; height: 100%; font: 13.5px/1.6 var(--mono); border-radius: 0 0 var(--radius) var(--radius); }
.cm-s-aster.CodeMirror { background: #1a1c21; color: #e1e4ea; }
.cm-s-aster .CodeMirror-gutters { background: #1d2025; border-right: 1px solid var(--line-soft); }
.cm-s-aster .CodeMirror-linenumber { color: #5c6370; padding: 0 12px 0 8px; }
.cm-s-aster .CodeMirror-cursor { border-left: 2px solid var(--accent-2); }
.cm-s-aster .CodeMirror-activeline-background { background: rgba(255,255,255,.035); }
.cm-s-aster .CodeMirror-selected, .cm-s-aster .CodeMirror-focused .CodeMirror-selected { background: rgba(157,92,240,.28); }
.cm-s-aster .CodeMirror-matchingbracket { color: #fff !important; background: rgba(157,92,240,.35); }
.cm-s-aster .cm-atom, .cm-s-aster .cm-def { color: #b98aff; }
.cm-s-aster .cm-string { color: #a5d6a7; }
.cm-s-aster .cm-number { color: #f5b544; }
.cm-s-aster .cm-keyword { color: #f78fb3; }
.cm-s-aster .cm-comment { color: #6c7380; font-style: italic; }
.cm-s-aster .cm-meta, .cm-s-aster .cm-property { color: #7dd3fc; }
.cm-s-aster .cm-variable, .cm-s-aster .cm-variable-2 { color: #e1e4ea; }
.cm-hit { background: rgba(245,181,68,.15); }
.CodeMirror-dialog { background: var(--card-2); color: var(--text); padding: 8px 12px; border-bottom: 1px solid var(--line) !important; }
.CodeMirror-dialog input { background: #181a1f; border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: 4px 8px; }

/* ---------- Composants des nouvelles pages ---------- */
.tabs-cards.tabs-3 { grid-template-columns: repeat(3, 1fr); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-2); vertical-align: middle; }
.tag svg.i { width: 13px; height: 13px; }
.tag.off { background: #2d3139; color: var(--muted); }
.tag.up { background: var(--green-soft); color: var(--green); }
.pills { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line-soft); padding: 4px; border-radius: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .pills, .toolbar .pills { margin-bottom: 0; }
.pill-tab { background: none; border: 0; padding: 8px 14px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14.5px; display: inline-flex; gap: 8px; align-items: center; }
.pill-tab:hover { color: var(--text); }
.pill-tab.on { background: var(--card-3); color: var(--text); }
.pill-tab span { font-size: 12px; background: #353a45; padding: 1px 7px; border-radius: 99px; }
.banner.info { background: var(--accent-soft); border-color: #4a3870; color: #d5c2fb; }
.banner.ok { background: var(--green-soft); border-color: rgba(74,222,128,.3); color: #a6efc3; }
.banner.err { background: var(--red-soft); border-color: rgba(240,82,82,.3); color: #ffb4b4; }
.head { border-radius: 6px; image-rendering: pixelated; background: var(--card-3); flex: none; }
.list-row.disabled .title, .list-row.disabled .ico { opacity: .55; }
.list-row .switch { margin: 0 4px; }

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.player-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; }
.player-card .info { flex: 1; min-width: 0; }
.player-card .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.player-card .sub { color: var(--muted); font-size: 13px; }
.add-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.add-bar .input { flex: 1; min-width: 180px; }
.toggle-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin-bottom: 14px; }

.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.plugin-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.pc-top { display: flex; gap: 12px; align-items: center; }
.pc-top img, .pc-ico { width: 46px; height: 46px; border-radius: 10px; flex: none; object-fit: cover; background: var(--card-3); display: grid; place-items: center; color: var(--accent-2); }
.plugin-card .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-card .sub { color: var(--muted); font-size: 13px; }
.plugin-card p { margin: 0; color: #c5cad3; font-size: 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-actions { display: flex; justify-content: flex-end; gap: 8px; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { padding: 16px 18px 12px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart { position: relative; margin-top: 10px; }
.chart-svg { width: 100%; height: 190px; display: block; overflow: visible; }
.chart-svg .gl { stroke: #2b3039; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-svg .dl { stroke: var(--red); stroke-dasharray: 5 5; opacity: .6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-svg .ax { fill: var(--dim); font-size: 11px; font-family: var(--sans); }
.chart-svg .hover { stroke: #6c7380; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .tip { position: absolute; top: -6px; width: 140px; background: var(--card-3); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; pointer-events: none; display: flex; flex-direction: column; }
.chart .tip span { color: var(--muted); font-size: 12px; }

.modal.wide { width: 620px; }
.modal .form-body { display: grid; gap: 14px; max-height: 65vh; overflow-y: auto; padding: 2px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form-err { color: var(--red); font-size: 14px; min-height: 18px; margin-top: 10px; }
.field > span { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chips label input { display: none; }
.day-chips label span { display: inline-block; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.day-chips label input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.check-line { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; padding: 4px 0; }
.check-line input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.perm-list { display: grid; gap: 2px; border-top: 1px solid var(--line-soft); padding-top: 10px; transition: opacity .15s; }
.toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.toggle-line .muted { font-size: 13.5px; }
.card-head h2 svg.i { margin-right: 8px; vertical-align: -3px; color: var(--accent-2); }
.version-now { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.version-now > svg.i { width: 34px; height: 34px; color: var(--accent-2); }
@media (max-width: 860px) {
  .tabs-cards.tabs-3, .chart-grid { grid-template-columns: 1fr; }
  .list-row { flex-wrap: wrap; }
  .hide-sm { display: none; }
}

/* ---------- Apparence ---------- */
.ap-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.mc-list { padding: 22px; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)), repeating-conic-gradient(#3b2f22 0 25%, #47382a 0 50%) 0 0 / 16px 16px; border-radius: 0 0 var(--radius) var(--radius); }
.mc-entry { display: flex; gap: 10px; max-width: 610px; margin: 0 auto; padding: 4px; border: 2px solid #808080; background: rgba(0,0,0,.5); }
.mc-icon { width: 64px; height: 64px; flex: none; }
.mc-icon img, .icon-big img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.mc-noicon { width: 100%; height: 100%; background: repeating-conic-gradient(#6b6b6b 0 25%, #8b8b8b 0 50%) 0 0 / 16px 16px; }
.mc-text { flex: 1; min-width: 0; font: 17px/1.2 'Pixelify Sans', var(--mono); text-shadow: 2px 2px 0 #3f3f3f; }
.mc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mc-name { color: #fff; flex: 1; }
.mc-count { color: #aaa; } .mc-count span { color: #555; }
.mc-bars { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; }
.mc-bars i { width: 3px; background: #55ff55; box-shadow: 1px 1px 0 #157215; }
.mc-bars i:nth-child(1) { height: 4px; } .mc-bars i:nth-child(2) { height: 6px; } .mc-bars i:nth-child(3) { height: 8px; } .mc-bars i:nth-child(4) { height: 11px; } .mc-bars i:nth-child(5) { height: 14px; }
.mc-motd { white-space: pre; overflow: hidden; min-height: 1.2em; }
.mc-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; align-items: center; }
.swatches { display: grid; grid-template-columns: repeat(8, 26px); gap: 5px; }
.swatch { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #3a404b; cursor: pointer; padding: 0; }
.swatch:hover { transform: scale(1.12); border-color: #fff; }
.fmt-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.fmt-btns .btn.sm { min-width: 34px; }
.mc-input { font-size: 15px; }
.icon-zone { display: flex; gap: 18px; align-items: flex-start; padding: 4px; border-radius: var(--radius); }
.icon-big { width: 128px; height: 128px; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.field em { font-style: normal; }
@media (max-width: 1100px) { .ap-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .icon-zone { flex-direction: column; } .swatches { grid-template-columns: repeat(8, 1fr); } }

.raw-head { display: flex; gap: 8px; margin-top: 14px; }
#ap-raw-box { margin-top: 10px; }
#ap-raw { font-size: 14px; resize: vertical; }
