/* open/chirpstack — design aligné sur OpenGTB (opengtb.com) */

@font-face {
    font-family: "IBM Plex Sans Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 700;
    src: url(fonts/ibm-plex-sans-latin.woff2) format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "IBM Plex Sans Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 700;
    src: url(fonts/ibm-plex-sans-latin-ext.woff2) format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url(fonts/jetbrains-mono-latin.woff2) format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Thèmes ---------- */
:root {
    --font-sans: "IBM Plex Sans Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --bg: #f7f7f5;
    --fg: #0a0d10;
    --card: #fff;
    --primary: #2a8a2a;
    --primary-fg: #f7f7f5;
    --secondary: #efefec;
    --border: #e0e0db;
    --input: #fff;
    --input-border: #d6d6d0;
    --text-soft: #485058;
    --text-dim: #8a8d8a;
    --line-soft: #ebebe6;
    --line-strong: #c0c0b9;
    --accent-dim: #1e6a1e;
    --accent-glow: #2a8a2a1a;
    --amber: #b07418;
    --amber-glow: #b0741814;
    --cyan: #2a8aa3;
    --red: #c0413f;
    --red-glow: #c0413f14;
    --banner: #e3ecdf;
    --chart-1: #2a8a2a;
    --chart-2: #2a8aa3;
    --chart-3: #c98a1f;
    --chart-4: #a04d96;
    --chart-5: #6b6df0;
    --chart-6: #c0413f;
    --chart-7: #3f9e7f;
    --chart-8: #8a6a3a;
    --shadow: 0 10px 30px -12px #0a0d1033;
    --radius: 3px;
    color-scheme: light;
}

:root.dark {
    --bg: #07090a;
    --fg: #eef3f7;
    --card: #0d1113;
    --primary: #6ce26c;
    --primary-fg: #07090a;
    --secondary: #11161a;
    --border: #1a2024;
    --input: #0a0d0f;
    --input-border: #232b30;
    --text-soft: #b3bfc8;
    --text-dim: #6a7682;
    --line-soft: #14181c;
    --line-strong: #2a333a;
    --accent-dim: #4ab048;
    --accent-glow: #6ce26c29;
    --amber: #f5b94a;
    --amber-glow: #f5b94a1f;
    --cyan: #67cae0;
    --red: #f47174;
    --red-glow: #f4717418;
    --banner: #102014;
    --chart-1: #6ce26c;
    --chart-2: #67cae0;
    --chart-3: #f5b94a;
    --chart-4: #d97cd1;
    --chart-5: #a8b3f4;
    --chart-6: #f47174;
    --chart-7: #9be7c4;
    --chart-8: #e0a96c;
    --shadow: 0 16px 40px -12px #000c;
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd, .mono { font-family: var(--font-mono); }
code { font-size: 0.92em; color: var(--text-soft); background: var(--secondary); padding: 0.05em 0.35em; border-radius: 2px; }
kbd {
    font-size: 10.5px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    padding: 0 0.35em;
    border-radius: 3px;
    color: var(--text-soft);
    background: var(--card);
}
::selection { background: var(--accent-glow); color: var(--fg); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dim { color: var(--text-dim); }
.soft { color: var(--text-soft); }
.ok { color: var(--primary); }
.warn { color: var(--amber); }
.err { color: var(--red); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row-wrap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.spacer { flex: 1; }
.mt { margin-top: 1rem; }
.mt-s { margin-top: 0.5rem; }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    min-height: 54px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fg);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo svg { color: var(--primary); }
.logo .slash { color: var(--text-dim); }
.logo .accent { color: var(--primary); }

.context {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
}
.context .sep { color: var(--text-dim); padding: 0 0.15rem; }
.ctx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 260px;
    border: 1px solid transparent;
    background: none;
    color: var(--text-soft);
    font: inherit;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
}
.ctx-chip:hover { border-color: var(--border); color: var(--fg); }
.ctx-chip .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-chip .caret { color: var(--text-dim); width: 12px; height: 12px; flex: none; }
.ctx-chip.app { color: var(--primary); }
.ctx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--accent-glow); flex: none; }
.ctx-dot.demo { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }

.tb-btn {
    border: 1px solid var(--border);
    background: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
    border-radius: 0;
    line-height: 1.2;
}
.tb-btn:hover { color: var(--primary); border-color: var(--primary); }

.theme-switch {
    display: inline-flex;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 10.5px;
}
.theme-switch button {
    border: 0;
    background: none;
    color: var(--text-dim);
    font: inherit;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
}
.theme-switch button + button { border-left: 1px solid var(--border); }
.theme-switch button:hover { color: var(--fg); }
.theme-switch button[aria-checked="true"] { background: var(--accent-glow); color: var(--primary); font-weight: 600; }

/* ---------- Bandeau ---------- */
.banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    background: var(--banner);
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
    font-size: 13px;
}
.banner.amber { background: var(--amber-glow); border-bottom-color: color-mix(in srgb, var(--amber) 40%, var(--border)); }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.amber { color: var(--amber); }

/* ---------- Mise en page ---------- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 55px); }
.sidebar {
    border-right: 1px solid var(--border);
    padding: 1.25rem 0.75rem;
    position: sticky;
    top: 55px;
    height: calc(100vh - 55px);
    overflow-y: auto;
}
.nav-group + .nav-group { margin-top: 1.25rem; }
.nav-title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--amber);
    padding: 0 0.6rem 0.4rem;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 13px;
    border-left: 2px solid transparent;
}
.nav-link:hover { color: var(--primary); text-decoration: none; }
.nav-link svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.nav-link .count { margin-left: auto; font-size: 11px; color: var(--text-dim); }
.nav-link.active { color: var(--primary); background: var(--accent-glow); border-left-color: var(--primary); }
.sidebar-foot { margin-top: 1.5rem; padding: 0.75rem 0.6rem 0; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--text-dim); }
.sidebar-foot p + p { margin-top: 0.35rem; }

.main { padding: 2rem 2.25rem 4rem; min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; }
.page.narrow { max-width: 820px; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.eyebrow::before { content: ""; width: 1.5rem; height: 1px; background: currentColor; }
.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 30px; letter-spacing: -0.02em; }
.page-head h1 em { font-style: normal; color: var(--primary); }
.page-head .lede { color: var(--text-soft); margin-top: 0.4rem; max-width: 62ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.section-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 18px;
    font-weight: 700;
    margin: 2rem 0 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}
.section-title .dim { font-weight: 400; font-size: 15px; }
.section-title .end { margin-left: auto; font-size: 12px; font-weight: 400; }

/* ---------- Cartes ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.25rem;
}
.card + .card { margin-top: 1rem; }
.grid > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head .end { margin-left: auto; }
.tag-line { font-family: var(--font-mono); font-size: 11px; color: var(--amber); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.joined { display: grid; border: 1px solid var(--border); background: var(--card); }
.joined > * { border: 0; }
.joined.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.joined.cols-3 > * + * { border-left: 1px solid var(--border); }

/* Tuiles d'action (style « têtes d'affiche ») */
.tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.25rem 1.4rem;
    color: inherit;
    background: var(--card);
    cursor: pointer;
    text-align: left;
    font: inherit;
    border: 0;
    transition: background 0.15s;
}
.tile:hover { background: var(--accent-glow); text-decoration: none; }
.tile h3 { font-family: var(--font-mono); font-size: 18px; margin: 0.6rem 0 0.35rem; }
.tile h3 span { color: var(--primary); }
.tile p { color: var(--text-soft); font-size: 13px; }
.tile .go { display: inline-block; margin-top: 0.8rem; font-family: var(--font-mono); font-size: 12px; color: var(--primary); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--border); background: var(--card); }
.kpi {
    padding: 1rem 1.1rem;
    border-right: 1px solid var(--border);
    background: none;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    text-align: left;
    color: inherit;
    font: inherit;
    position: relative;
}
.kpi:last-child { border-right: 0; }
button.kpi { cursor: pointer; }
button.kpi:hover { background: var(--accent-glow); }
.kpi .k-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 0.4rem; }
.kpi .k-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--text-dim); }
.kpi.is-ok .k-value { color: var(--primary); }
.kpi.is-warn .k-value { color: var(--amber); }
.kpi.is-err .k-value { color: var(--red); }

.bars { display: flex; flex-direction: column; gap: 0.45rem; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 48px; gap: 0.75rem; align-items: center; font-size: 13px; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.bar-track { height: 8px; background: var(--secondary); }
.bar-fill { height: 100%; background: var(--primary); }
.bar-row .val { text-align: right; font-family: var(--font-mono); font-size: 12px; }
.stackbar { display: flex; height: 10px; background: var(--secondary); overflow: hidden; }
.stackbar > span { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 12px; color: var(--text-soft); margin-top: 0.6rem; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 0.35rem; }

/* ---------- Formulaires ---------- */
label, .label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 0.35rem;
}
.hint { font-size: 12px; color: var(--text-dim); margin-top: 0.35rem; }
.field + .field { margin-top: 1rem; }
.grid > .field, .row > .field { margin-top: 0; }
input[type="text"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], select, textarea {
    width: 100%;
    background: var(--input);
    color: var(--fg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: 0.55rem 0.7rem;
    font: inherit;
    font-size: 13.5px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { font-family: var(--font-mono); font-size: 12.5px; resize: vertical; min-height: 120px; }
input.mono, select.mono { font-family: var(--font-mono); font-size: 12.5px; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-glow); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input.invalid, select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
select {
    appearance: none;
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}
select.sm, input.sm { padding: 0.35rem 0.55rem; font-size: 12.5px; }
select.sm { padding-right: 1.8rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; cursor: pointer; vertical-align: middle; }
.check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 13px; color: var(--text-soft); cursor: pointer; margin: 0; font-weight: 400; }
.input-group { display: flex; }
.input-group > input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-dim); pointer-events: none; }
.search-input input { padding-left: 2.1rem; }
.search-input kbd { position: absolute; right: 0.55rem; top: 50%; transform: translateY(-50%); }

details.more > summary {
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    list-style: none;
    padding: 0.25rem 0;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; color: var(--primary); }
details.more[open] > summary::before { content: "− "; }
details.more[open] > summary { margin-bottom: 0.75rem; }

/* Contrôle segmenté */
.seg { display: inline-flex; border: 1px solid var(--input-border); border-radius: var(--radius); overflow: hidden; background: var(--input); }
.seg button, .seg label {
    border: 0;
    margin: 0;
    background: none;
    font: inherit;
    font-size: 12.5px;
    color: var(--text-soft);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.seg > * + * { border-left: 1px solid var(--input-border) !important; }
.seg input { display: none; }
.seg .on, .seg label:has(input:checked) { background: var(--accent-glow); color: var(--primary); font-weight: 600; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid var(--input-border);
    background: var(--card);
    color: var(--fg);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, filter 0.15s;
    text-decoration: none !important;
}
.btn:hover { border-color: var(--line-strong); background: var(--secondary); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-fg);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12.5px;
}
.btn-primary:hover { background: var(--primary); border-color: var(--primary); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: none; color: var(--text-soft); }
.btn-ghost:hover { background: var(--secondary); border-color: transparent; color: var(--fg); }
.btn-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 12.5px;
    cursor: pointer;
    border-bottom: 1px solid var(--line-strong);
}
.btn-link:hover { color: var(--primary); border-color: var(--primary); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.btn-danger:hover { background: var(--red-glow); border-color: var(--red); }
.btn-danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger.solid:hover { filter: brightness(1.08); }
.btn-sm { padding: 0.32rem 0.6rem; font-size: 12px; }
.btn-xs { padding: 0.12rem 0.4rem; font-size: 11px; }
.btn-icon { padding: 0.35rem; }
.btn-lg { padding: 0.75rem 1.2rem; font-size: 13.5px; }
.btn .kbd-hint { opacity: 0.7; font-size: 10.5px; }
.btn.loading { pointer-events: none; }
.btn.loading::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges / tags ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 0.1rem 0.45rem;
    border-radius: 2px;
    border: 1px solid var(--border);
    color: var(--text-soft);
    white-space: nowrap;
}
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 12.5px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); flex: none; }
.status.active::before { background: var(--primary); box-shadow: 0 0 0 3px var(--accent-glow); }
.status.recent::before { background: var(--cyan); }
.status.inactive::before { background: var(--amber); }
.status.offline::before { background: var(--red); }
.status.never::before { background: transparent; border: 1.5px solid var(--text-dim); width: 5px; height: 5px; }
.c-active { background: var(--primary); }
.c-recent { background: var(--cyan); }
.c-inactive { background: var(--amber); }
.c-offline { background: var(--red); }
.c-never { background: var(--line-strong); }

.tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tag {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid var(--border);
    background: var(--secondary);
    border-radius: 2px;
    overflow: hidden;
}
.tag .k { padding: 0.05rem 0.35rem; color: var(--text-dim); white-space: nowrap; }
.tag .v { padding: 0.05rem 0.35rem; color: var(--fg); background: var(--card); border-left: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag button { border: 0; border-left: 1px solid var(--border); background: var(--card); color: var(--text-dim); cursor: pointer; padding: 0 0.35rem; font: inherit; }
.tag button:hover { color: var(--red); }
.tag.more { padding: 0.05rem 0.35rem; color: var(--text-dim); }

.chip-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    background: var(--input);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: 0.35rem;
    cursor: text;
}
.chip-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-glow); }
.chip-input input { border: 0 !important; box-shadow: none !important; padding: 0.2rem 0.3rem; flex: 1; min-width: 140px; background: none; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 11.5px;
    background: var(--accent-glow);
    color: var(--primary);
    padding: 0.15rem 0.2rem 0.15rem 0.5rem;
    border-radius: 2px;
}
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 0.2rem; }

.battery { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-soft); }
.battery .cell { width: 18px; height: 9px; border: 1px solid var(--line-strong); padding: 1px; position: relative; }
.battery .cell::after { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 3px; background: var(--line-strong); }
.battery .cell i { display: block; height: 100%; background: var(--primary); }
.battery.low .cell i { background: var(--red); }
.battery.mid .cell i { background: var(--amber); }

/* ---------- Tableaux ---------- */
.table-wrap { border: 1px solid var(--border); background: var(--card); overflow: auto; }
.table-wrap.scroll { max-height: 62vh; }
.table-wrap.short { max-height: 320px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--card);
    text-align: left;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    color: var(--text-dim);
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--fg); }
.tbl th .arrow { color: var(--primary); margin-left: 0.25rem; }
.tbl td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.1s; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--accent-glow) 60%, transparent); }
.tbl tbody tr.selected { background: var(--accent-glow); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl .w-check { width: 36px; padding-right: 0; }
.tbl .eui { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }
.tbl .name { font-weight: 500; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .name small { display: block; font-weight: 400; color: var(--text-dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.tbl .tags { flex-wrap: nowrap; overflow: hidden; max-width: 300px; }
.tbl .ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl td.cell-err { background: var(--red-glow); color: var(--red); }
.tbl td.cell-warn { background: var(--amber-glow); }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num .status { margin-right: 0.3rem; }
.tbl td.empty { text-align: center; color: var(--text-dim); padding: 2.5rem 1rem; }
.tbl input[type="text"] { padding: 0.3rem 0.45rem; font-size: 12.5px; }
.tbl .copy { opacity: 0; margin-left: 0.25rem; }
.tbl tr:hover .copy { opacity: 1; }
.table-foot { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-top: 0; background: var(--card); font-size: 12.5px; color: var(--text-dim); }

/* ---------- Barre d'outils / filtres ---------- */
.toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.toolbar .search-input { flex: 1; min-width: 220px; max-width: 420px; }
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.fchip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
    font: inherit;
    font-size: 12.5px;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
}
.fchip:hover { border-color: var(--line-strong); color: var(--fg); }
.fchip .n { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.fchip.on { border-color: var(--primary); color: var(--primary); background: var(--accent-glow); }
.fchip.on .n { color: var(--primary); }

/* Barre de sélection */
.selbar {
    position: sticky;
    bottom: 1rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--fg);
    color: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: rise 0.18s ease-out;
}
.selbar .count { font-family: var(--font-mono); font-size: 12.5px; padding: 0 0.5rem; }
.selbar .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 25%, transparent); }
.selbar .btn:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.selbar .btn-danger { color: #ff8a8c; border-color: #ff8a8c66; }
:root.dark .selbar .btn-danger { color: #c0413f; border-color: #c0413f66; }
.selbar .btn-link { color: color-mix(in srgb, var(--bg) 70%, transparent); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Zone de dépôt ---------- */
.drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 2rem 1rem;
    border: 1.5px dashed var(--line-strong);
    background: var(--card);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { border-color: var(--primary); background: var(--accent-glow); }
.drop svg { width: 30px; height: 30px; color: var(--primary); }
.drop strong { color: var(--primary); }

/* ---------- Étapes (import) ---------- */
.steps { display: flex; gap: 0; border: 1px solid var(--border); background: var(--card); margin-bottom: 1.25rem; overflow-x: auto; }
.steps .st {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    border: 0;
    background: none;
    cursor: default;
}
.steps .st + .st { border-left: 1px solid var(--border); }
.steps .st .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 10.5px; }
.steps .st.done { color: var(--text-soft); cursor: pointer; }
.steps .st.done .n { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.steps .st.cur { color: var(--primary); background: var(--accent-glow); }

/* ---------- Progression / journal ---------- */
.progress { height: 6px; background: var(--secondary); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.2s; }
.progress.indeterminate > i { width: 30%; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.job-stats { display: flex; gap: 1.5rem; font-family: var(--font-mono); font-size: 12.5px; margin: 0.6rem 0; flex-wrap: wrap; }
.log {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    max-height: 260px;
    overflow: auto;
    padding: 0.6rem 0.75rem;
}
.log div { padding: 0.08rem 0; white-space: pre-wrap; word-break: break-word; }
.log .l-ok { color: var(--primary); }
.log .l-err { color: var(--red); }
.log .l-warn { color: var(--amber); }
.log .l-info { color: var(--text-soft); }

.callout {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    background: var(--card);
    font-size: 13px;
    color: var(--text-soft);
}
.callout.warn { border-left-color: var(--amber); background: var(--amber-glow); }
.callout.err { border-left-color: var(--red); background: var(--red-glow); }
.callout.ok { border-left-color: var(--primary); background: var(--accent-glow); }
.callout strong { color: var(--fg); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.empty-state h3 { color: var(--fg); font-size: 16px; margin-bottom: 0.4rem; }
.empty-state p { max-width: 46ch; margin: 0 auto; }
.empty-state .btn { margin-top: 1rem; }

.skeleton { background: linear-gradient(90deg, var(--secondary) 0%, var(--line-soft) 50%, var(--secondary) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; height: 1em; border-radius: 2px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Dialogues, tiroir, palette ---------- */
dialog {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--fg);
    padding: 0;
    width: min(540px, calc(100vw - 2rem));
    max-height: calc(100vh - 3rem);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
dialog.wide { width: min(760px, calc(100vw - 2rem)); }
dialog::backdrop { background: #0a0d1066; backdrop-filter: blur(2px); }
.dlg-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.dlg-head h2 { font-size: 16px; }
.dlg-head .x { margin-left: auto; }
.dlg-body { padding: 1.25rem; overflow: auto; max-height: calc(100vh - 12rem); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.9rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg); }
.dlg-foot .left { margin-right: auto; }

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(560px, 100vw);
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    animation: slidein 0.18s ease-out;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; gap: 0.75rem; align-items: flex-start; }
.drawer-head h2 { font-size: 18px; word-break: break-word; }
.drawer-body { padding: 1.25rem; overflow: auto; flex: 1; }
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: #0a0d1033; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0.45rem 1rem; font-size: 13px; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; word-break: break-word; }
.secret { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; }

.chart { width: 100%; height: 140px; display: block; }
.chart .grid-line { stroke: var(--line-soft); }
.chart .bar { fill: var(--primary); }
.chart .bar.zero { fill: var(--line-strong); }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .area { fill: var(--accent-glow); stroke: none; }
.chart .dot { fill: var(--card); stroke: var(--primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart .dot:hover { fill: var(--primary); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--accent-glow); }
.measure-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.measure-chips .fchip { border-radius: var(--radius); }
.measure-chips .fchip strong { font-family: var(--font-mono); font-size: 12px; color: var(--fg); }
.measure-chips .fchip.on strong { color: var(--primary); }
.sub-title { font-family: var(--font-mono); font-size: 11px; color: var(--amber); margin: 1.25rem 0 0.6rem; }
.chart text { fill: var(--text-dim); font-family: var(--font-mono); font-size: 10px; }
.metric-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); margin-bottom: 1rem; }
.metric-tiles > div { padding: 0.7rem 0.8rem; }
.metric-tiles > div + div { border-left: 1px solid var(--border); }
.metric-tiles .k-label { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.metric-tiles .k-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.palette-dlg { width: min(600px, calc(100vw - 2rem)); margin-top: 12vh; }
.palette-input { display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); }
.palette-input .prompt { color: var(--primary); font-weight: 600; }
.palette-input input { border: 0 !important; box-shadow: none !important; padding: 0; font-family: var(--font-mono); font-size: 14px; background: none; }
.palette-list { max-height: 50vh; overflow: auto; padding: 0.35rem; }
.palette-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 0;
    background: none;
    color: var(--fg);
    text-align: left;
    font: inherit;
    font-size: 13.5px;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius);
    cursor: pointer;
}
.palette-item .cmd { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-left: auto; }
.palette-item.on { background: var(--accent-glow); color: var(--primary); }
.palette-group { font-family: var(--font-mono); font-size: 10.5px; color: var(--amber); padding: 0.6rem 0.7rem 0.25rem; }
.palette-foot { display: flex; gap: 1rem; padding: 0.55rem 1rem; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-dim); }

/* Menu déroulant (contexte, serveurs) */
.menu {
    position: fixed;
    z-index: 70;
    min-width: 240px;
    max-width: 380px;
    max-height: 60vh;
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.3rem;
    border-radius: var(--radius);
}
.menu input { margin-bottom: 0.3rem; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    border: 0;
    background: none;
    color: var(--fg);
    font: inherit;
    font-size: 13px;
    text-align: left;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    border-radius: 2px;
}
.menu-item:hover, .menu-item.on { background: var(--accent-glow); }
.menu-item.current { color: var(--primary); }
.menu-item .meta { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.menu-sep { height: 1px; background: var(--border); margin: 0.3rem 0; }
.menu-title { font-family: var(--font-mono); font-size: 10.5px; color: var(--amber); padding: 0.4rem 0.6rem 0.2rem; }

/* ---------- Historique ---------- */
.h-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.9rem; }
.h-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); font-size: 12.5px; }
.h-chip-main { display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: none; color: var(--fg); font: inherit; padding: 0.3rem 0.55rem; cursor: pointer; }
.h-chip-main i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.h-chip-main .dev { color: var(--text-soft); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-chip-main strong { font-family: var(--font-mono); font-size: 12px; margin-left: 0.2rem; }
.h-chip-x { border: 0; border-left: 1px solid var(--border); background: none; color: var(--text-dim); cursor: pointer; padding: 0 0.35rem; }
.h-chip-x:hover { color: var(--red); }
.h-chip-x svg { width: 12px; height: 12px; }
.h-chip.off { opacity: 0.45; }
.h-chip.off .h-chip-main i { background: var(--line-strong) !important; }
.h-sw { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 0.5rem; vertical-align: middle; }
.h-chart { border: 1px solid var(--border); background: var(--card); }
.tchart-tip {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    min-width: 180px;
    max-width: 340px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 0.45rem 0.6rem;
    font-size: 12px;
}
.tchart-tip-head { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 0.3rem; }
.tchart-tip-row { display: flex; align-items: center; gap: 0.45rem; padding: 0.1rem 0; }
.tchart-tip-row i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.tchart-tip-row span { flex: 1; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tchart-tip-row strong { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; pointer-events: none; }
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(560px, calc(100vw - 2rem));
    padding: 0.6rem 0.9rem;
    background: var(--fg);
    color: var(--bg);
    font-size: 13px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: rise 0.18s ease-out;
}
.toast::before { content: "●"; font-size: 10px; color: var(--primary); }
.toast.err::before { color: #ff8a8c; }
.toast.warn::before { color: #f5b94a; }
.toast button { border: 0; background: none; color: inherit; opacity: 0.7; cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------- Écran de connexion ---------- */
.connect { max-width: 1080px; margin: 0 auto; padding: 4.5rem 1.5rem 3rem; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .lede { margin-top: 1.25rem; font-size: 16px; color: var(--text-soft); max-width: 46ch; }
.hero ul { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.55rem; }
.hero li { display: flex; gap: 0.6rem; color: var(--text-soft); font-size: 14px; }
.hero li::before { content: "→"; font-family: var(--font-mono); color: var(--primary); }
.connect-card { padding: 1.5rem; }
.connect-card .card-head { margin-bottom: 1.25rem; }
.connect-foot { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.saved-servers { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.saved-servers .badge { cursor: pointer; background: var(--card); }
.saved-servers .badge:hover { border-color: var(--primary); color: var(--primary); }
.tenant-list { display: grid; gap: 0.35rem; max-height: 300px; overflow: auto; }
.tenant-list button { justify-content: flex-start; text-align: left; }
.connect-status { margin-top: 1rem; }

/* ---------- Écran HORS ---------- */
.hors {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: #050607;
    color: #e5e5e5;
    text-align: center;
    padding: 2rem;
    font-family: var(--font-mono);
}
.hors .inner { display: grid; gap: 1rem; justify-items: center; max-width: 460px; }
.hors .lamp { width: 14px; height: 14px; border-radius: 50%; background: #f47174; box-shadow: 0 0 18px #f47174; animation: blink 1.4s steps(2) infinite; }
.hors .big { font-family: var(--font-sans); font-size: 28px; font-weight: 600; }
.hors .sub { color: #8b8b8b; font-size: 13px; }
.hors .amber { color: #f5b94a; font-size: 12px; }
.hors .btn { margin-top: 0.75rem; background: #6ce26c; border-color: #6ce26c; color: #07090a; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- Divers ---------- */
.diff-old { color: var(--red); text-decoration: line-through; }
.diff-new { color: var(--primary); }
.mapping { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem 1rem; }
.mapping .req::after { content: " *"; color: var(--red); }
.pager { display: flex; justify-content: center; margin-top: 0.75rem; }

@media (max-width: 1100px) {
    .connect { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.5rem; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0.5rem; display: flex; overflow-x: auto; gap: 0.25rem; }
    .nav-group { display: flex; gap: 0.25rem; margin: 0 !important; }
    .nav-title, .sidebar-foot { display: none; }
    .nav-link { border-left: 0; white-space: nowrap; }
    .main { padding: 1.25rem 1rem 3rem; }
    .grid-2, .grid-3, .joined.cols-3 { grid-template-columns: 1fr; }
    .joined.cols-3 > * + * { border-left: 0; border-top: 1px solid var(--border); }
    .context .ctx-chip { max-width: 140px; }
    .topbar-inner { flex-wrap: wrap; }
    .metric-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
