/* MC Panel — thème sombre */
:root {
  color-scheme: dark;
  --bg: #0a0c0f; --surface: #12151a; --surface-2: #171b21; --surface-3: #1e232a; --hover: #232930;
  --border: rgba(255,255,255,.07); --border-2: rgba(255,255,255,.12);
  --text: #eef1f4; --text-2: #b4bcc6; --muted: #7c8691;
  --accent: #62c94a; --accent-2: #7fdb68; --accent-ink: #0a1a06; --accent-soft: rgba(98,201,74,.12);
  /* séries (palette catégorielle validée, pas sombre) */
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s7: #9085e9;
  /* statuts */
  --good: #0ca30c; --good-ink: #3fd03f; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b; --critical-ink: #ff7a7a;
  --grid: #24282e; --axis: #383d44;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(1200px 600px at 85% -10%, rgba(98,201,74,.07), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(57,135,229,.06), transparent 60%), var(--bg); background-attachment: fixed; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1 { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 15px; font-weight: 650; margin: 0; letter-spacing: -.005em; }
.muted { color: var(--muted); } .mono { font-family: var(--mono); }
::selection { background: rgba(98,201,74,.3); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2a3038; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- structure */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
body.auth .shell { grid-template-columns: 1fr; } body.auth .side { display: none; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-right: 1px solid var(--border); background: rgba(14,17,21,.75); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; }
.brand img { image-rendering: pixelated; border-radius: 7px; box-shadow: 0 0 0 1px var(--border-2), 0 6px 18px rgba(98,201,74,.18); }
.brand b { display: block; font-size: 15.5px; letter-spacing: -.01em; } .brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
.nav { display: grid; gap: 2px; }
.navlink { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--text-2); font-weight: 520; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; transition: background .15s, color .15s; }
.navlink:hover { background: var(--surface-2); color: var(--text); }
.navlink.active { background: var(--accent-soft); color: var(--accent-2); }
.navlink .count { margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--muted); background: var(--surface-3); padding: 1px 7px; border-radius: 99px; }
.navlink.active .count { color: var(--accent-2); background: rgba(98,201,74,.15); }
.sidehost { margin-top: auto; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); display: grid; gap: 10px; font-size: 12.5px; }
.sidehost .row { display: flex; justify-content: space-between; color: var(--text-2); } .sidehost .row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sidefoot { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }
main { min-width: 0; padding: 30px 36px 80px; max-width: 1360px; width: 100%; }
.loading, .empty { color: var(--muted); padding: 50px 0; text-align: center; }
.empty svg { width: 34px; height: 34px; opacity: .5; display: block; margin: 0 auto 10px; }

/* ---------- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface-2); cursor: pointer; white-space: nowrap; font-weight: 550; font-size: 13.5px; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { background: var(--hover); border-color: rgba(255,255,255,.18); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #6fd456, #55b63e); border-color: #4fa93a; color: var(--accent-ink); font-weight: 650; box-shadow: 0 4px 16px rgba(98,201,74,.25), 0 1px 0 rgba(255,255,255,.25) inset; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #7fdd67, #5fc347); border-color: #5fc347; }
.btn.danger { color: var(--critical-ink); }
.btn.danger:hover:not(:disabled) { background: rgba(208,59,59,.14); border-color: rgba(208,59,59,.45); }
.btn.solid-danger { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn.solid-danger:hover:not(:disabled) { background: #e04848; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; } .btn.sm.icon { width: 30px; }
.btngroup { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- en-têtes */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.pagehead .sub { color: var(--muted); margin-top: 4px; }
.eyebrow { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 14px; font-weight: 520; }
.back:hover { color: var(--text); } .back svg { width: 16px; height: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 34px 0 14px; }
.section-title h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }

/* ---------- tuiles KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 4px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .lbl { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 550; }
.kpi .lbl svg { width: 16px; height: 16px; color: var(--muted); }
.kpi .val { font-size: 28px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 550; margin-left: 3px; letter-spacing: 0; }
.kpi .foot { color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* ---------- jauges */
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 6px 0 2px; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--s1); transition: width .5s ease; }
.meter.good > i { background: var(--good); } .meter.warning > i { background: var(--warning); } .meter.critical > i { background: var(--critical); }
.meter.lg { height: 9px; }
.lvl { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.lvl svg { width: 13px; height: 13px; }
.lvl.good { color: var(--good-ink); } .lvl.warning { color: var(--warning); } .lvl.critical { color: var(--critical-ink); }

/* ---------- cartes serveurs */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, transform .2s, box-shadow .2s; box-shadow: var(--shadow); overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: transparent; }
.card.up::before { background: linear-gradient(90deg, var(--accent), transparent 80%); }
.card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.card .top { display: flex; gap: 13px; align-items: center; }
.card .title { min-width: 0; flex: 1; }
.card .name { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .ver { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.card .motd { color: var(--text-2); font-size: 13px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.cstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cstats > div { background: var(--surface-2); padding: 9px 11px; min-width: 0; }
.cstats span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 550; }
.cstats b { display: block; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.card .foot .muted { font-size: 12.5px; }

.tile { width: 44px; height: 44px; border-radius: 11px; flex: none; display: grid; place-items: center; font: 700 15px var(--mono); color: rgba(0,0,0,.72); text-transform: uppercase; position: relative; box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 6px 16px rgba(0,0,0,.35); background-image: linear-gradient(135deg, rgba(255,255,255,.28), transparent 55%), repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 6px, transparent 6px 12px), repeating-linear-gradient(0deg, rgba(0,0,0,.06) 0 6px, transparent 6px 12px); }
.tile.lg { width: 64px; height: 64px; border-radius: 15px; font-size: 21px; }
.tile.FABRIC { background-color: #d8b98a; } .tile.NEOFORGE, .tile.FORGE { background-color: #e98b5b; }
.tile.PAPER, .tile.PURPUR { background-color: #7fb5ec; } .tile.VANILLA { background-color: #7cc35c; }
.tile.QUILT { background-color: #bf9cf0; } .tile.MODRINTH { background-color: #4fd1a5; } .tile.X { background-color: #8d969e; }

.chip { display: inline-flex; align-items: center; gap: 4px; font: 500 12px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-2); }
.chip.warn { border-color: rgba(250,178,25,.35); color: var(--warning); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: .04em; text-transform: uppercase; }
.b-FABRIC { background: rgba(216,185,138,.14); color: #e7cba0; } .b-NEOFORGE, .b-FORGE { background: rgba(233,139,91,.14); color: #f3a57d; }
.b-PAPER, .b-PURPUR { background: rgba(127,181,236,.14); color: #9cc8f3; } .b-VANILLA { background: rgba(124,195,92,.14); color: #9ad97d; }
.b-QUILT { background: rgba(191,156,240,.14); color: #cfb3f5; } .b-MODRINTH { background: rgba(79,209,165,.14); color: #78e0bc; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 9px; border-radius: 99px; background: var(--surface-3); white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.s-online { color: var(--good-ink); background: rgba(12,163,12,.12); }
.s-starting, .s-busy { color: var(--warning); background: rgba(250,178,25,.1); } .s-starting i, .s-busy i { animation: pulse 1s infinite; }
.s-stopped, .s-never { color: var(--muted); } .s-error { color: var(--critical-ink); background: rgba(208,59,59,.12); }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- détail */
.hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 300px; background: radial-gradient(closest-side, rgba(98,201,74,.1), transparent); pointer-events: none; }
.hero .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.hero .id h1 { overflow-wrap: anywhere; }
.hero .tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 20px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; position: relative; z-index: 1; }
.facts > div { background: var(--surface-2); padding: 12px 14px; min-width: 0; }
.facts span { display: block; color: var(--muted); font-size: 12px; font-weight: 550; }
.facts b { display: block; font-weight: 650; font-size: 14.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.notice { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; word-break: break-word; display: flex; gap: 10px; align-items: flex-start; position: relative; z-index: 1; }
.notice svg { width: 16px; height: 16px; margin-top: 2px; }
.notice.warn { background: rgba(250,178,25,.08); color: #f3c867; border: 1px solid rgba(250,178,25,.2); }
.notice.err { background: rgba(208,59,59,.1); color: #f5a3a3; border: 1px solid rgba(208,59,59,.25); font-family: var(--mono); font-size: 12px; max-height: 220px; overflow: auto; }
.notice.info { background: rgba(57,135,229,.08); color: #a6c9f3; border: 1px solid rgba(57,135,229,.2); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; color: var(--text-2); font-weight: 550; white-space: nowrap; transition: background .15s, color .15s; }
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { color: var(--text); background: var(--surface-3); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 8px rgba(0,0,0,.3); }

/* ---------- console */
.term { background: #07090b; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.term-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.dots { display: flex; gap: 6px; } .dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2f36; } .dots i:nth-child(1) { background: #ec6a5e; } .dots i:nth-child(2) { background: #f4bf4f; } .dots i:nth-child(3) { background: #61c554; }
.term-head .opts { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.term-head label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.term pre { margin: 0; height: 60vh; min-height: 320px; overflow: auto; padding: 14px 16px; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; color: #cfd6dd; }
.term .cmd { color: #7fb5ff; } .term .resp { color: #e6ebf0; } .term .sys { color: var(--muted); font-style: italic; }
.term form { display: flex; align-items: center; border-top: 1px solid var(--border); background: var(--surface); }
.term form .prompt { padding-left: 16px; color: var(--accent); font: 700 14px var(--mono); }
.term input { flex: 1; background: transparent; border: 0; padding: 13px 12px; font-family: var(--mono); font-size: 13px; outline: none; }
.quick { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); flex-wrap: wrap; background: var(--surface); }
.quick .btn { font-family: var(--mono); font-weight: 500; }

/* ---------- panneaux */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; } .panel-head h2 svg { color: var(--muted); width: 16px; height: 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.plist li:last-child { border-bottom: 0; }
.plist li.none { color: var(--muted); justify-content: flex-start; }
.pname { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.avatar { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font: 700 12px var(--mono); color: #0a1a06; flex: none; }
.inline { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- tableaux */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); position: sticky; top: 0; }
tbody tr { transition: background .12s; } tbody tr:hover { background: rgba(255,255,255,.02); }
tbody tr:last-child td { border-bottom: 0; }
tr.off td { opacity: .45; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.file { font: 11.5px var(--mono); color: var(--muted); word-break: break-all; max-width: 260px; }
.modname { font-weight: 600; } .moddesc { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search input { padding-left: 36px; }

/* ---------- formulaires */
input[type=text], input[type=number], input[type=password], select, textarea { background: var(--bg); border: 1px solid var(--border-2); border-radius: 9px; padding: 0 12px; height: 38px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { padding: 10px 12px; height: auto; font-family: var(--mono); font-size: 12.5px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8691' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
.toolbar select { width: auto; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, textarea:disabled { opacity: .5; }
textarea.editor { min-height: 440px; tab-size: 2; background: #07090b; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.createlayout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.createlayout aside { position: sticky; top: 24px; display: grid; gap: 14px; }
.form { display: grid; gap: 16px; }
.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section > h2 .num { width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-size: 12px; font-weight: 750; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; }
.field label, .flabel { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 0; color: var(--text); font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.portrow { display: grid; grid-template-columns: 1fr 1fr 96px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.range { display: flex; align-items: center; gap: 12px; height: 38px; } .range b { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
pre.preview { background: #07090b; border: 1px solid var(--border); border-radius: 10px; padding: 14px; font: 11.5px/1.6 var(--mono); overflow: auto; max-height: 380px; margin: 0; color: #cfd6dd; }
.choice { display: grid; gap: 10px; margin: 14px 0; }
.choice label { display: flex; gap: 12px; padding: 13px 14px; border: 1px solid var(--border-2); border-radius: 11px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice label.danger:has(input:checked) { border-color: var(--critical); background: rgba(208,59,59,.1); }
.choice input { accent-color: var(--accent); margin-top: 3px; } .choice label.danger input { accent-color: var(--critical); }
.choice b { display: block; } .choice small { color: var(--muted); font-size: 12.5px; }

/* ---------- connexion */
.login { max-width: 400px; margin: 10vh auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px; display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login .logo { display: grid; place-items: center; gap: 12px; text-align: center; }
.login .logo img { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 13px; box-shadow: 0 10px 30px rgba(98,201,74,.3); }
.login p { color: var(--muted); margin: 0; text-align: center; font-size: 13.5px; }
.error { color: var(--critical-ink); font-size: 13px; min-height: 18px; }

/* ---------- graphiques */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; }
.ccard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 16px 10px; box-shadow: var(--shadow); min-width: 0; }
.ccard .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.ccard .t { color: var(--text-2); font-size: 13px; font-weight: 600; }
.ccard .v { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ccard .v small { font-size: 13px; color: var(--muted); font-weight: 550; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; } .legend b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 650; }
.key { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.chart { position: relative; height: 170px; touch-action: pan-y; }
.chart svg { width: 100%; height: 100%; display: block; stroke: none; stroke-width: 1; overflow: visible; }
.chart .gl { stroke: var(--grid); stroke-width: 1; } .chart .ax { fill: var(--muted); font: 11px var(--font); stroke: none; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .xh { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: rgba(13,16,20,.96); border: 1px solid var(--border-2); border-radius: 9px; padding: 8px 11px; font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); white-space: nowrap; z-index: 5; transform: translateX(-50%); }
.tip .tt { color: var(--muted); margin-bottom: 4px; } .tip .tr { display: flex; align-items: center; gap: 8px; } .tip .tr b { font-variant-numeric: tabular-nums; font-size: 13px; } .tip .tr span { color: var(--text-2); }
.cores { display: flex; gap: 5px; align-items: stretch; height: 150px; }
.core { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; position: relative; cursor: default; }
.core .bar { width: 100%; max-width: 26px; background: var(--surface-3); border-radius: 5px; flex: 1; display: flex; align-items: flex-end; overflow: hidden; }
.core .bar i { width: 100%; background: var(--s1); border-radius: 4px 4px 0 0; transition: height .5s; min-height: 2px; }
.core:hover .bar i { background: #5fa0ec; }
.core small { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.disk { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.disk:last-child { border-bottom: 0; }
.disk .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.disk .nm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 650; }
.disk .sub { color: var(--muted); font-size: 12.5px; }
.disk .right { text-align: right; font-variant-numeric: tabular-nums; } .disk .right b { display: block; font-size: 15px; }
.hbar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; min-width: 80px; } .hbar i { display: block; height: 100%; background: var(--s1); border-radius: 99px; }

/* ---------- toasts & dialogues */
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: rgba(23,27,33,.97); border: 1px solid var(--border-2); padding: 12px 14px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.55); white-space: pre-wrap; word-break: break-word; animation: slidein .25s cubic-bezier(.2,.8,.2,1); font-size: 13.5px; }
.toast svg { color: var(--good-ink); width: 17px; height: 17px; margin-top: 1px; } .toast.err svg { color: var(--critical-ink); }
@keyframes slidein { from { transform: translateY(12px) scale(.98); opacity: 0; } }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: 18px; padding: 24px; max-width: 480px; width: calc(100vw - 32px); box-shadow: 0 40px 100px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
dialog h2 { font-size: 18px; margin-bottom: 8px; } dialog p { color: var(--text-2); margin: 8px 0; }
dialog .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.ansi-30 { color: #5c6370 } .ansi-31 { color: #ff7b72 } .ansi-32 { color: #8fd16a } .ansi-33 { color: #e5c07b } .ansi-34 { color: #61afef } .ansi-35 { color: #c678dd } .ansi-36 { color: #56b6c2 } .ansi-37 { color: #d0d6dc }
.ansi-90 { color: #7f848e } .ansi-91 { color: #ff8b8b } .ansi-92 { color: #a8e57e } .ansi-93 { color: #ffd480 } .ansi-94 { color: #82c0ff } .ansi-95 { color: #e09aff } .ansi-96 { color: #7fe3ee } .ansi-97 { color: #fff } .ansi-b { font-weight: 700 }
.lv-warn { color: var(--warning); } .lv-err { color: var(--critical-ink); }

/* ---------- responsive */
@media (max-width: 1100px) { .createlayout { grid-template-columns: 1fr; } .createlayout aside { position: static; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .brand { padding: 0 8px 0 0; } .brand small { display: none; }
  .nav { display: flex; } .navlink { width: auto; } .navlink span:not(.count) { display: none; }
  .sidehost { display: none; } .sidefoot { display: flex; border: 0; padding: 0; margin: 0 0 0 auto; } .sidefoot .navlink span { display: none; }
  main { padding: 20px 16px 70px; }
  h1 { font-size: 22px; }
  .charts { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-sm { display: none; }
  .portrow { grid-template-columns: 1fr 1fr 80px 36px; }
}
