/* ==========================================================================
   VintedFlow — liquid glass, bleu nuit
   ========================================================================== */

:root {
  --abyss: #050c22;
  --ink: #eef3ff;
  --ink-2: #b2c0e0;
  --ink-3: #7486ad;
  --ice: #8fd3ff;
  --ice-deep: #3d7dff;
  --mint: #72e6c4;
  --amber: #ffc978;
  --coral: #ff8d9e;

  --blur: 28px;
  --dim: .45;

  --glass-fill: linear-gradient(165deg, rgba(255,255,255,.14) 0%, rgba(150,180,255,.06) 45%, rgba(110,140,230,.04) 100%), rgba(6,16,46,.42);
  --glass-fill-strong: linear-gradient(165deg, rgba(255,255,255,.2) 0%, rgba(170,200,255,.1) 60%, rgba(140,170,240,.07) 100%), rgba(6,16,46,.38);
  --glass-edge: rgba(255,255,255,.2);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.32) inset, 0 -1px 0 rgba(255,255,255,.05) inset, 0 30px 60px -30px rgba(0,6,28,.75), 0 8px 24px -12px rgba(0,6,28,.45);

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;

  --display: "Bricolage Grotesque", ui-rounded, -apple-system, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--ink);
  font: 15px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(143,211,255,.35); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

/* -------- fond photo -------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: url(/background) center / cover no-repeat, var(--abyss);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 30%, rgba(3,8,26,.55) 100%),
    rgba(4,10,30,var(--dim));
}

/* -------- verre -------- */
.glass {
  position: relative;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%);
  backdrop-filter: blur(var(--blur)) saturate(170%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
/* reflet spéculaire sur l'arête haute */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(140% 60% at 18% -10%, rgba(255,255,255,.22), transparent 55%);
}
.glass.strong { background: var(--glass-fill-strong); }

/* -------- structure -------- */
.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 20px;
  min-height: 100vh;
  padding: 20px;
}
.rail {
  position: sticky; top: 20px;
  height: calc(100vh - 40px); height: calc(100dvh - 40px);
  border-radius: var(--r-xl);
  padding: 0;
  display: flex; flex-direction: column;
}
/* Le menu défile tout seul quand la souris est dessus : la page ne bouge pas, et inversement. */
.rail-scroll {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 14px;
  overflow-y: auto; overscroll-behavior: contain;
  border-radius: inherit;
  scrollbar-width: thin; scrollbar-color: transparent transparent;
}
.rail-scroll:hover { scrollbar-color: rgba(255,255,255,.28) transparent; }
.rail-scroll::-webkit-scrollbar { width: 6px; }
.rail-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
.rail-scroll:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 18px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font: 650 19px/1 var(--display); letter-spacing: -.01em; }
.brand small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  color: var(--ink-2); font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { text-decoration: none; background: rgba(255,255,255,.06); color: var(--ink); }
.nav a.active {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 6px 18px -8px rgba(0,10,40,.6);
}
.nav .lbl-s { display: none; }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px;
  background: var(--ice); color: #04203d; font: 650 12px/22px var(--text); text-align: center;
}
.rail-foot { margin-top: auto; display: grid; gap: 8px; }

.bridge-card { padding: 12px; border-radius: var(--r-md); background: rgba(0,10,40,.25); border: 1px solid rgba(255,255,255,.08); }
.bridge-card .row { display: flex; align-items: center; gap: 10px; }
.bridge-card b { font-size: 13px; font-weight: 600; }
.bridge-card p { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ink-3); }
.dot.on { background: var(--mint); box-shadow: 0 0 0 4px rgba(114,230,196,.18), 0 0 12px rgba(114,230,196,.7); }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,201,120,.16); }
.dot.off { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,141,158,.16); }

.main { min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 6px 4px 0;
}
.topbar h1 { margin: 0; font: 600 34px/1.1 var(--display); letter-spacing: -.02em; }
.topbar .sub { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.topbar .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.view { display: grid; gap: 20px; animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

/* -------- boutons & champs -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 8px 20px -12px rgba(0,8,30,.8);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: var(--ink); font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, opacity .2s;
}
.btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.1)); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  border-color: rgba(190,230,255,.6); color: #03203f;
  background: linear-gradient(180deg, #c4ebff 0%, #8fd3ff 55%, #6cbcff 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 -2px 6px rgba(40,110,220,.35) inset, 0 10px 26px -10px rgba(80,170,255,.8);
}
.btn.primary:hover { background: linear-gradient(180deg, #d4f1ff 0%, #a0dbff 55%, #79c3ff 100%); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(255,255,255,.07); color: var(--ink); }
.btn.danger { color: #ffd2d9; border-color: rgba(255,141,158,.35); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--ink-2); font-weight: 550; }
.field > small { color: var(--ink-3); font-size: 12px; line-height: 1.45; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 10px 14px; border-radius: var(--r-md);
  background: rgba(2,8,28,.35); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 1px 0 rgba(0,0,0,.25) inset;
  transition: border-color .2s, background .2s;
}
.input:hover { border-color: rgba(255,255,255,.2); }
.input:focus { outline: none; border-color: rgba(143,211,255,.7); background: rgba(2,8,28,.5); box-shadow: 0 0 0 4px rgba(143,211,255,.14); }
textarea.input { resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b2c0e0' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select.input option { background: #0b1636; }
.input.mono, code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 38px; border-radius: 99px; min-width: 240px; }

.segmented {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 99px;
  background: rgba(2,8,28,.35); border: 1px solid rgba(255,255,255,.1);
}
.segmented button {
  white-space: nowrap;
  height: 32px; padding: 0 14px; border: 0; border-radius: 99px; background: transparent; color: var(--ink-2); cursor: pointer; font-weight: 550; font-size: 13.5px;
}
.segmented button[aria-pressed="true"] {
  color: var(--ink); background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.1));
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 4px 12px -6px rgba(0,8,30,.8);
}

.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0; border-radius: 99px; background: rgba(2,8,28,.5); border: 1px solid rgba(255,255,255,.15);
  transition: background .25s var(--ease);
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(180deg, #fff, #dbe6ff); box-shadow: 0 2px 6px rgba(0,0,0,.4);
  transition: transform .25s var(--ease);
}
.switch input:checked + span { background: linear-gradient(180deg, #8fd3ff, #4c95ff); border-color: rgba(190,230,255,.6); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; background: rgba(255,255,255,.08); color: var(--ink-2); border: 1px solid rgba(255,255,255,.1);
  white-space: nowrap;
}
.tag.ok { color: var(--mint); background: rgba(114,230,196,.1); border-color: rgba(114,230,196,.25); }
.tag.warn { color: var(--amber); background: rgba(255,201,120,.1); border-color: rgba(255,201,120,.25); }
.tag.bad { color: var(--coral); background: rgba(255,141,158,.1); border-color: rgba(255,141,158,.25); }
.tag.info { color: var(--ice); background: rgba(143,211,255,.1); border-color: rgba(143,211,255,.25); }

/* -------- panneaux -------- */
.panel { padding: 22px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font: 600 19px/1.2 var(--display); letter-spacing: -.01em; }
.panel-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.panel-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.muted { color: var(--ink-3); }
.empty { padding: 36px 16px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

.notice {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--r-lg);
  background: linear-gradient(90deg, rgba(255,201,120,.16), rgba(255,201,120,.04)); border: 1px solid rgba(255,201,120,.28);
}
.notice svg { width: 20px; height: 20px; color: var(--amber); flex: none; }
.notice p { margin: 0; color: var(--ink-2); font-size: 14px; }
.notice b { color: var(--ink); }
.notice .btn { margin-left: auto; }

/* -------- tableau de bord -------- */
.dash { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 20px; }

.lens {
  padding: 28px 28px 18px; border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.2) 0%, rgba(140,180,255,.08) 40%, rgba(60,110,255,.12) 100%);
  min-height: 360px; display: flex; flex-direction: column;
}
.lens::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 30px 60px -40px rgba(255,255,255,.35), inset 0 -40px 80px -60px rgba(120,190,255,.6);
}
.lens-top { display: flex; align-items: flex-start; gap: 16px; }
.lens-label { color: var(--ink-2); font-size: 14px; font-weight: 550; }
.lens-figure {
  font: 600 clamp(64px, 9vw, 116px)/.92 var(--display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -.045em; margin: 10px 0 6px;
  background: linear-gradient(180deg, #ffffff 20%, #cfe7ff 70%, #9fcfff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 10px 40px rgba(120,190,255,.25);
}
.lens-figure .cur { font-size: .5em; letter-spacing: -.02em; margin-left: .08em; vertical-align: .55em; }
.lens-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; }
.lens-meta b { color: var(--ink); font-weight: 650; }
.delta { font-weight: 650; }
.delta.up { color: var(--mint); }
.delta.down { color: var(--coral); }
.lens .chart { margin-top: auto; padding-top: 16px; }

.chart svg { width: 100%; height: 150px; overflow: visible; }
.chart .axis { fill: var(--ink-3); font-size: 11px; }
.chart .grid { stroke: rgba(255,255,255,.07); }
.chart-tip {
  position: absolute; pointer-events: none; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; white-space: nowrap;
  background: rgba(6,16,44,.85); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: translate(-50%, -120%); opacity: 0; transition: opacity .15s;
}
.chart-tip b { font-weight: 650; }

.todo { padding: 22px; display: flex; flex-direction: column; }
.todo-list { display: grid; gap: 10px; }
.todo-item {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: var(--r-md); background: rgba(2,8,28,.28); border: 1px solid rgba(255,255,255,.07);
}
.todo-item p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.todo-item b { font-size: 14px; font-weight: 600; }

.agent-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  font: 650 15px/1 var(--display); color: #fff;
  background: radial-gradient(120% 120% at 30% 20%, hsl(var(--h) 90% 75%), hsl(var(--h) 75% 45%));
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 16px -6px hsl(var(--h) 80% 40% / .8);
}
.agent-mark.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.metric { padding: 18px 20px; }
.metric span { color: var(--ink-3); font-size: 13px; font-weight: 550; }
.metric b { display: block; font: 600 30px/1.1 var(--display); letter-spacing: -.02em; margin-top: 6px; }
.metric small { color: var(--ink-3); font-size: 12.5px; }

.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }

.feed { display: grid; gap: 2px; max-height: 420px; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.feed-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.feed-row:last-child { border-bottom: 0; }
.feed-row .agent-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.feed-row p { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); }
.feed-row p.error { color: var(--coral); }
.feed-row p.success { color: var(--ink); }
.feed-row time { color: var(--ink-3); font-size: 12px; white-space: nowrap; padding-top: 4px; }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; gap: 6px; }
.bar-row .lbl { display: flex; justify-content: space-between; font-size: 14px; }
.bar-row .lbl span { color: var(--ink-3); }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4c95ff, #8fd3ff); }

/* -------- annonces -------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.item {
  padding: 8px; border-radius: var(--r-lg); cursor: pointer; text-align: left; border: 1px solid var(--glass-edge);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.item:hover { transform: translateY(-3px); }
.thumb {
  position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 100% at 30% 10%, hsl(var(--h, 215) 70% 55% / .55), hsl(var(--h, 215) 60% 20% / .6));
  display: grid; place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .mono-letter { font: 600 64px/1 var(--display); color: rgba(255,255,255,.85); letter-spacing: -.04em; }
.thumb .badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; justify-content: space-between; }
.thumb .badges .tag { background: rgba(5,12,34,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.item-body { padding: 10px 6px 4px; }
.item-body b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-body .meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; color: var(--ink-3); font-size: 13px; }
.item-body .price { font: 600 18px/1 var(--display); color: var(--ink); }
.item-stats { display: flex; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin-top: 8px; }
.item-stats span { display: inline-flex; align-items: center; gap: 4px; }
.item-stats svg { width: 14px; height: 14px; }

/* -------- feuille latérale -------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; background: rgba(2,6,20,.35); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(460px, 100%); height: calc(100% - 24px); margin: 12px; padding: 24px; overflow: auto;
  border-radius: var(--r-xl); background: linear-gradient(165deg, rgba(40,60,110,.72), rgba(10,20,52,.78));
  animation: slideIn .35s var(--ease) both;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.sheet h3 { margin: 0 0 4px; font: 600 24px/1.2 var(--display); letter-spacing: -.01em; }
.sheet .thumb { aspect-ratio: 1; margin: 16px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 16px 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 550; }
.stack { display: grid; gap: 14px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* -------- tableau -------- */
.table-wrap { overflow: auto; margin: 0 -22px -22px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; padding: 10px 14px; position: sticky; top: 0; background: rgba(10,22,58,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
table.data td { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
table.data tr:hover td { background: rgba(255,255,255,.03); }
table.data th:first-child, table.data td:first-child { padding-left: 22px; }
table.data th:last-child, table.data td:last-child { padding-right: 22px; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .cell-title { display: flex; align-items: center; gap: 12px; min-width: 220px; }
table.data .mini { width: 38px; height: 46px; border-radius: 9px; flex: none; }
table.data .mini .mono-letter { font-size: 20px; }
.inline-input { width: 86px; height: 32px; padding: 4px 10px; border-radius: 9px; text-align: right; background: rgba(2,8,28,.3); border: 1px solid rgba(255,255,255,.1); }
.inline-input:focus { outline: none; border-color: var(--ice); }
.totals { display: flex; gap: 28px; flex-wrap: wrap; }
.totals div span { display: block; color: var(--ink-3); font-size: 13px; }
.totals div b { font: 600 26px/1.2 var(--display); letter-spacing: -.02em; }

/* -------- messages -------- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; height: calc(100vh - 150px); min-height: 520px; }
.conv-list { padding: 10px; overflow: auto; }
.conv {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%;
  padding: 10px; border: 0; border-radius: var(--r-md); background: transparent; cursor: pointer; text-align: left;
}
.conv:hover { background: rgba(255,255,255,.05); }
.conv[aria-current="true"] { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07)); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  font: 600 17px/1 var(--display); background: radial-gradient(120% 120% at 30% 20%, hsl(var(--h) 70% 70%), hsl(var(--h) 60% 38%));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv b { font-weight: 600; font-size: 14.5px; }
.conv p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread p { color: var(--ink); }
.conv .side { display: grid; justify-items: end; gap: 4px; font-size: 12px; color: var(--ink-3); }
.conv .pip { width: 9px; height: 9px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 10px var(--ice); }

.thread { display: flex; flex-direction: column; overflow: hidden; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.thread-head b { font-weight: 600; }
@media (min-width: 901px) { .thread-head #back { display: none; } }
.thread-head p { margin: 0; font-size: 13px; color: var(--ink-3); }
.bubbles { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: min(520px, 78%); padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; }
.bubble.them { align-self: flex-start; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: linear-gradient(180deg, rgba(110,180,255,.55), rgba(60,125,255,.5)); border: 1px solid rgba(170,215,255,.35); border-bottom-right-radius: 6px; }
.bubble.offer { align-self: flex-start; background: rgba(255,201,120,.12); border: 1px solid rgba(255,201,120,.3); font-weight: 600; }
.bubble.system { align-self: center; background: none; color: var(--ink-3); font-size: 12.5px; padding: 4px; }
.bubble small { display: block; margin-top: 4px; font-size: 11px; color: rgba(238,243,255,.55); }
.day-sep { align-self: center; color: var(--ink-3); font-size: 12px; margin: 10px 0 4px; }

.draft {
  margin: 0 20px 12px; padding: 14px; border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(143,211,255,.16), rgba(143,211,255,.05)); border: 1px dashed rgba(143,211,255,.45);
}
.draft-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.draft-head .agent-mark { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; }
.composer { display: flex; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.08); align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; border-radius: 22px; padding: 11px 16px; }

/* -------- agents -------- */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.agent-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.agent-card header { display: flex; gap: 14px; align-items: center; }
.agent-card h3 { margin: 0; font: 600 20px/1.15 var(--display); }
.agent-card header p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.agent-card header .switch { margin-left: auto; }
.agent-card .desc { margin: 0; color: var(--ink-2); font-size: 14px; }
.agent-card footer { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: var(--ink-3); }
.agent-card footer .btn { margin-left: auto; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--ice); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.agent-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 480px; overflow: hidden; }
.chat .bubbles { padding: 22px; }
.chat .bubble.assistant { align-self: flex-start; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-bottom-left-radius: 6px; }
.chat .bubble.user { align-self: flex-end; background: linear-gradient(180deg, rgba(110,180,255,.55), rgba(60,125,255,.5)); border: 1px solid rgba(170,215,255,.35); border-bottom-right-radius: 6px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 4px; }
.suggestions button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.suggestions button:hover { color: var(--ink); background: rgba(255,255,255,.1); }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px !important; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; }
.cfg-grid { display: grid; gap: 16px; }
.cfg-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.check span b { display: block; font-weight: 550; font-size: 14px; }
.check span small { color: var(--ink-3); font-size: 12.5px; }

/* -------- validation -------- */
.q-list { display: grid; gap: 14px; }
.q-card { padding: 18px; display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.q-card .agent-mark { width: 40px; height: 40px; border-radius: 13px; font-size: 17px; }
.q-card h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.q-card .ctx { margin: 4px 0 10px; color: var(--ink-3); font-size: 13px; white-space: pre-wrap; }
.q-card textarea { min-height: 76px; }
.q-card .row-actions { margin-top: 10px; align-items: center; }
.q-card .row-actions .muted { margin-left: auto; font-size: 12.5px; }

/* -------- réglages -------- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 14px; color: var(--ink-2); }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--display); background: rgba(143,211,255,.14); color: var(--ice); border: 1px solid rgba(143,211,255,.3); }
.copy { display: flex; gap: 8px; }
.copy .input { flex: 1; }
.range { width: 100%; accent-color: var(--ice); }

/* -------- connexion -------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); padding: 36px 32px 30px; border-radius: var(--r-xl); text-align: center; }
.auth-card svg.logo { width: 56px; height: 56px; margin: 0 auto 18px; }
.auth-card h1 { margin: 0; font: 600 32px/1.1 var(--display); letter-spacing: -.02em; }
.auth-card p { margin: 8px 0 24px; color: var(--ink-2); font-size: 14.5px; }
.auth-card form { display: grid; gap: 12px; text-align: left; }
.auth-card .btn { height: 46px; margin-top: 4px; }
.auth-card .err { color: var(--coral); font-size: 13.5px; min-height: 20px; margin: 0; text-align: center; }

/* -------- notifications -------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; max-width: 380px; font-size: 14px;
  background: linear-gradient(165deg, rgba(50,75,130,.82), rgba(16,28,66,.86)); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--glass-shadow);
  animation: toastIn .35s var(--ease) both;
}
.toast.error { border-color: rgba(255,141,158,.5); }
.toast.leave { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* -------- adaptatif -------- */
@media (max-width: 1180px) {
  .dash, .split, .agent-page { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat { height: 70vh; }
}
@media (max-width: 900px) {
  .settings { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.has-thread .conv-list { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .thread { height: calc(100vh - 210px); min-height: 480px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; padding: 12px 16px 96px; gap: 14px; }
  .rail {
    position: fixed; z-index: 40; top: auto; bottom: 12px; left: 12px; right: 12px; height: auto;
    flex-direction: row; padding: 6px; border-radius: 26px;
  }
  .rail-scroll { display: contents; }
  .brand, .rail-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; padding: 8px 0; font-size: 9.5px; letter-spacing: -.01em; flex: 1; position: relative; min-width: 0; }
  .nav .lbl-l { display: none; }
  .nav .lbl-s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .topbar { align-items: flex-start; }
  .topbar .actions { margin-left: 0; width: 100%; }
  .topbar .actions .btn { height: 36px; font-size: 14px; }
  .notice { flex-wrap: wrap; }
  .notice .btn { margin-left: 0; }
  .lens-meta { gap: 6px 14px; }
  .nav a .count { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; line-height: 18px; font-size: 10.5px; padding: 0 5px; }
  .nav .hide-sm { display: none; }
  .topbar h1 { font-size: 28px; }
  .metrics { gap: 12px; }
  .metric { padding: 14px 16px; }
  .metric b { font-size: 24px; }
  .lens { padding: 22px 20px 14px; min-height: 0; }
  .search .input { min-width: 0; }
  .toolbar .search { flex: 1 1 100%; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cfg-grid .two { grid-template-columns: 1fr; }
  .toasts { left: 16px; right: 16px; bottom: 96px; }
  .sheet { margin: 0; height: 100%; border-radius: 0; }
}

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

/* ==========================================================================
   v3.1 — tableau de bord façon centre de contrôle
   ========================================================================== */
.nav-section { display: block; padding: 16px 12px 6px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nav-section:first-child { padding-top: 0; }
.nav .count.soft { background: transparent; color: var(--ink-3); font-weight: 550; min-width: 0; padding: 0; }
.disk-card { padding: 12px; border-radius: var(--r-md); background: rgba(0,10,40,.25); border: 1px solid rgba(255,255,255,.08); font-size: 12px; color: var(--ink-3); }
.disk-card:empty { display: none; }
.disk-card b { display: block; font: 600 17px/1.3 var(--display); color: var(--ink); margin-top: 2px; }
.disk-card p { margin: 2px 0 8px; }
.disk-card .bar { height: 5px; }
.disk-card .bar i { background: linear-gradient(90deg, #8b7bff, #b9a8ff); }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.kpi { padding: 18px 20px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid rgba(255,255,255,.08); }
.kpi-label { color: var(--ink-2); font-size: 13px; font-weight: 550; }
.kpi > b { font: 600 clamp(24px, 2.4vw, 32px)/1.15 var(--display); letter-spacing: -.02em; margin: 2px 0 2px; white-space: nowrap; }
.kpi.profit > b { color: var(--mint); text-shadow: 0 0 28px rgba(114,230,196,.35); }
.kpi .delta { font-size: 12.5px; }
.kpi-sub { color: var(--ink-3); font-size: 12px; }
.kpi .spark { width: 100%; height: 34px; margin-top: 8px; }
.meta-line { margin: -8px 4px 0; color: var(--ink-3); font-size: 13px; }
.meta-line b { color: var(--ink-2); font-weight: 600; }

.chart svg.bigchart { width: 100%; height: auto; display: block; overflow: visible; }
.bigchart .grid { stroke: rgba(255,255,255,.07); }
.bigchart .axis { fill: var(--ink-3); font-size: 12px; font-family: var(--text); }
.bigchart .peak { fill: var(--ink); font-size: 13px; font-weight: 650; font-family: var(--text); }
.lens.panel { min-height: 0; padding: 22px; }
.lens .chart { margin-top: 4px; padding-top: 0; }
details.figures { margin-top: 10px; }
details.figures summary { cursor: pointer; color: var(--ink-3); font-size: 13px; list-style: none; }
details.figures summary::before { content: "▸ "; }
details.figures[open] summary::before { content: "▾ "; }
details.figures .table-wrap { margin: 8px -22px -22px; max-height: 320px; }
.legend { gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-kpis div { padding: 14px; border-radius: var(--r-md); background: rgba(2,8,28,.28); border: 1px solid rgba(255,255,255,.07); }
.mini-kpis span { display: block; color: var(--ink-3); font-size: 12.5px; }
.mini-kpis b { font: 600 22px/1.3 var(--display); }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpi:nth-child(4) { border-left: 0; } .kpi:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.08); } }
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { border-left: 0 !important; border-top: 1px solid rgba(255,255,255,.08); padding: 14px 16px 10px; }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(even) { border-left: 1px solid rgba(255,255,255,.08) !important; }
  .kpi.profit { grid-column: 1 / -1; border-left: 0 !important; }
  .nav-section { display: none; }
  .nav .count.soft { display: none; }
  .topbar .actions .segmented button { padding: 0 10px; }
}

.lens.panel { background: linear-gradient(160deg, rgba(255,255,255,.16) 0%, rgba(140,180,255,.06) 40%, rgba(60,110,255,.08) 100%), rgba(6,16,46,.45); }

.jobs-card { margin-bottom: 8px; border-color: rgba(143,211,255,.3); }
.jobs-card .spin { width: 12px; height: 12px; }



/* Bordereaux : une carte lisible par article, action principale au premier plan. */
.label-cards { display: grid; gap: 16px; }
.label-card { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--glass-edge); }
.label-card:last-child { border-bottom: 0; }
.label-card-photo { width: 132px; height: 156px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.07); display: grid; place-items: center; }
.label-card-photo img { width: 100%; height: 100%; object-fit: contain; }
.label-card-photo [hidden] { display: none; }
.label-no-photo { padding: 14px; color: var(--ink-3); text-align: center; font-size: 12px; }
.label-card-body { min-width: 0; }
.label-card-body h3 { margin: 0; overflow-wrap: anywhere; }
.label-card-body p { margin: 8px 0 12px; }
.label-card-status { color: var(--mint); font-size: 13px; }
.label-card-note { overflow-wrap: anywhere; }
.label-card details { margin-top: 12px; }
.label-card summary { cursor: pointer; color: var(--ink-2); }
@media(max-width:600px) {
  .label-card { grid-template-columns: 88px minmax(0,1fr); gap: 12px; }
  .label-card-photo { width: 88px; height: 112px; }
  .label-card .row-actions { flex-wrap: wrap; }
  .label-card .btn { white-space: normal; text-align: center; }
}

/* -------- État du PC -------- */
a.disk-card { display: block; color: inherit; text-decoration: none; transition: border-color .2s, background .2s; }
a.disk-card:hover { border-color: rgba(255,255,255,.2); background: rgba(0,10,40,.38); text-decoration: none; }
.sys-verdict { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; padding: 18px 22px; }
.sys-v { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 280px; min-width: 0; }
.sys-v .dot { margin-top: 7px; }
.sys-v b { font: 600 17px/1.3 var(--display); }
.sys-v p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.sys-live { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sys-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: sysPulse 2s ease-in-out infinite; }
@keyframes sysPulse { 50% { opacity: .35; transform: scale(.8); } }

.sys-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sys-gauge { --glow: var(--ice); padding: 18px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.sys-ring { position: relative; width: 128px; height: 128px; flex: none; }
.sys-ring svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 10; stroke-linecap: round; }
.ring-val { fill: none; stroke: var(--glow); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 7px var(--glow));
  transition: stroke-dasharray .9s var(--ease), stroke .6s; }
.sys-ring-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding-top: 4px; }
.sys-ring-mid b { font: 650 34px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sys-ring-mid small { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.sys-gauge-txt { min-width: 0; }
.sys-gauge-txt span { display: flex; justify-content: center; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; }
.sys-gauge-txt span svg { width: 17px; height: 17px; color: var(--glow); }
.sys-gauge-txt p { margin: 4px 0 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }

.sys-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.sys-col { align-content: start; }
.sys-col { display: grid; gap: 20px; }
.sys-legend { gap: 14px !important; font-size: 12.5px; color: var(--ink-2); }
.sys-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sys-legend i, .chart-tip .sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-tip .sw { margin-right: 6px; }

.sys-chart { position: relative; padding-left: 44px; }
.sys-chart svg { width: 100%; display: block; overflow: visible; touch-action: pan-y; }
.sys-yaxis { position: absolute; left: 0; top: 0; width: 40px; height: calc(100% - 22px); pointer-events: none; }
.sys-yaxis span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sys-xaxis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.sys-empty { position: absolute; left: 44px; right: 0; top: 40%; text-align: center; font-size: 13px; }
.sys-empty[hidden] { display: none; }
.sys-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; border: 2px solid #fff; opacity: 0; pointer-events: none; transition: opacity .15s; }

.sys-sensors { display: grid; gap: 8px; margin-top: 16px; }
.sys-sensor { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) 62px; gap: 12px; align-items: center; font-size: 13px; }
.sys-sensor span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-sensor small { color: var(--ink-3); }
.sys-sensor b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.sys-sensor .bar, .sys-core .bar, .sys-proc .bar { height: 6px; }
.sys-sensor .bar i, .sys-core .bar i, .sys-proc .bar i { transition: width .8s var(--ease); }
.chip-soft { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 12.5px; color: var(--ink-2);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); font-variant-numeric: tabular-nums; }
.chip-soft svg { width: 15px; height: 15px; animation: sysSpin 2.4s linear infinite; }
@keyframes sysSpin { to { transform: rotate(360deg); } }

.sys-cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 22px; }
.sys-core { display: grid; grid-template-columns: 58px 1fr 46px 52px; gap: 10px; align-items: center; font-size: 13px; }
.sys-core span, .sys-core small { color: var(--ink-3); }
.sys-core b, .sys-core small { text-align: right; font-variant-numeric: tabular-nums; }

.sys-io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sys-io div { padding: 12px 14px; border-radius: var(--r-md); background: rgba(2,8,28,.28); border: 1px solid rgba(255,255,255,.07); min-width: 0; }
.sys-io span { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; }
.sys-io span svg { width: 14px; height: 14px; }
.sys-io b { display: block; font: 600 21px/1.25 var(--display); letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sys-procs { display: grid; gap: 4px; }
.sys-proc { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(50px, 1fr) 54px 64px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13.5px; }
.sys-proc:last-child { border-bottom: 0; }
.sys-proc-name { min-width: 0; }
.sys-proc-name b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-proc-name small { color: var(--ink-3); font-size: 11.5px; }
.sys-proc .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.sys-battery { display: flex; align-items: center; gap: 16px; }
.sys-bat-shape { position: relative; flex: 1; max-width: 220px; height: 34px; padding: 4px; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); }
.sys-bat-shape::after { content: ''; position: absolute; right: -8px; top: 9px; width: 5px; height: 12px; border-radius: 0 3px 3px 0; background: rgba(255,255,255,.3); }
.sys-bat-shape i { display: block; height: 100%; border-radius: 5px; box-shadow: 0 0 14px currentColor; transition: width .8s var(--ease); }
.sys-battery > b { font: 650 28px/1 var(--display); letter-spacing: -.02em; }

@media (max-width: 1280px) { .sys-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .sys-split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sys-gauges { gap: 12px; }
  .sys-gauge { padding: 14px 10px; }
  .sys-ring { width: 100px; height: 100px; }
  .sys-ring-mid b { font-size: 25px; }
  .sys-live { margin-left: 0; }
  .sys-proc { grid-template-columns: minmax(0, 1fr) 50px 60px; }
  .sys-proc .bar { display: none; }
}
