@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('fonts/Inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400 500; font-display: swap; src: url('fonts/JetBrainsMono-latin.woff2') format('woff2'); }

:root {
  --bg: #0E1014; --panel: #12151B; --card: #161920; --line: #262A33; --line2: #1F232B; --muted: #9AA1AE; --text: #E8EAF0;
  --soft: #C4C9D2; --accent: #F59E0B; --accent-ink: #1A1204; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --live: #5EE6A8; --live-bg: #0F3D2A; --warn: #FCD34D; --warn-bg: #3D2E0A; --bad: #FCA5A5; --bad-bg: #3D1414;
  --idle: #3A3F4B; --in: #9CC3FF; --in-bg: #1F2A3D; --gut: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 Inter, system-ui, sans-serif; }
body { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }
.app { max-width: 1600px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding-inline: 16px;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.mono { font-family: var(--mono); }
.small { font-size: 12px; color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Éléments de base ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kicker { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.h1 { font-size: 24px; font-weight: 700; }
.title { font-size: 20px; font-weight: 700; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.icon-btn { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: #3A3F4B; }
.btn { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn.block { width: 100%; height: 50px; font-size: 15px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary.dirty { box-shadow: 0 0 0 3px rgba(245,158,11,.3); }
.btn.danger { background: #1E1414; color: var(--bad); border-color: #4A2A2A; }
.btn.ghost { background: transparent; color: var(--soft); border: 1px dashed #3A3F4B; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.link { color: var(--accent); background: none; border: none; padding: 0; font-size: 12px; font-weight: 600; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 5px 9px; border-radius: 999px; white-space: nowrap; background: #262A33; color: #B4BAC5; }
.badge.live, .badge.good { background: var(--live-bg); color: var(--live); }
.badge.wait, .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.dot { width: 9px; height: 9px; border-radius: 5px; flex-shrink: 0; background: var(--idle); }
.dot.live, .dot.good { background: var(--live); } .dot.warn, .dot.wait { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.int { background: var(--in); }
.input { height: 42px; width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 10px; font-size: 14px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--bg); border-radius: 10px; padding: 4px; }
.seg button { height: 36px; border-radius: 8px; border: none; font-size: 13px; font-weight: 700; background: transparent; color: var(--soft); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.switch { width: 46px; height: 28px; flex-shrink: 0; border-radius: 14px; border: none; padding: 3px; display: flex; justify-content: flex-start; background: #3A3F4B; }
.switch span { width: 22px; height: 22px; border-radius: 11px; display: block; background: #C4C9D2; }
.switch[aria-checked="true"] { justify-content: flex-end; background: var(--accent); }
.switch[aria-checked="true"] span { background: var(--accent-ink); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: #22262F; border: 1px solid var(--line); color: var(--text); padding: 10px 14px; border-radius: 12px; font-size: 13px; z-index: 10; max-width: calc(100% - 32px); }
.toast.bad { border-color: #4A2A2A; color: var(--bad); }

/* Champs copiables */
.fields { display: flex; flex-direction: column; gap: 6px; }
.frow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.fl { font-size: 12px; color: var(--muted); }
.fv { font-family: var(--mono); font-size: 12px; color: #D1D5DB; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px; overflow-wrap: anywhere; min-height: 36px; display: flex; align-items: center; user-select: all; }
.fv.plain { font-family: inherit; }
.copy { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--line); background: #22262F; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; }
.copy:hover { background: #2A2F3A; }
.copy.ok { color: var(--live); border-color: var(--live-bg); }
code.url { display: block; font-family: var(--mono); font-size: 11px; color: var(--soft); background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; overflow-wrap: anywhere; user-select: all; }

/* Menus déroulants (fermés par défaut) */
details.fold { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 12px; font-size: 13px; font-weight: 600; color: var(--soft); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex-shrink: 0; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > .fold-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
details.plainfold > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
details.plainfold[open] > summary { margin-bottom: 8px; }

/* ---------- Marque ---------- */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .logo { flex-shrink: 0; display: block; filter: drop-shadow(0 4px 14px rgba(245,158,11,.25)); }
.brand .h1 { font-size: 21px; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; }
.brand .sub { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.login .brand { margin-bottom: 8px; }

/* ---------- Écran Routes ---------- */
.top { padding: 20px 0 12px; display: flex; flex-direction: column; gap: 14px; }
.vps { padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; }
.vps-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vps .kpis { grid-column: 1 / -1; }
.vps .chev { grid-column: 2; grid-row: 1; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .l { font-size: 11px; color: var(--muted); white-space: nowrap; }
.kpi .v { font-size: 15px; font-weight: 600; white-space: nowrap; }
.filters { padding: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--soft); }
.chip.on { border-color: var(--accent); background: #2A2010; color: #FCD34D; }
.chip .cnt { display: inline-block; margin-left: 6px; min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #22262F; color: var(--soft); font-size: 11px; }
.chip.on .cnt { background: #3D2E0A; color: #FCD34D; }
/* Filtres de l'accueil : une seule ligne sur mobile */
.home-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; flex-wrap: nowrap; }
.home-filters .chip { padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.home-filters .chip .cnt { margin-left: 4px; min-width: 0; padding: 1px 5px; }
.list { display: flex; flex-direction: column; gap: 12px; flex-grow: 1; padding-bottom: 16px; }
.rcard { transition: border-color .15s; }
.rcard:hover { border-color: #3A3F4B; }
.rhead { display: flex; gap: 12px; align-items: center; }
.rthumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0B0D11; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--idle); color: var(--muted); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rthumb.good { border-color: var(--live); } .rthumb.warn, .rthumb.wait { border-color: var(--warn); } .rthumb.bad { border-color: var(--bad); }
.rname { font-size: 16px; font-weight: 600; }
.rflow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: #22262F; color: #D1D5DB; }
.tag.in { background: var(--in-bg); color: var(--in); }
.rfoot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line2); padding-top: 10px; }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }
.bottom { padding: 8px 0 24px; }

/* ---------- Détail d'une route ---------- */
.page { padding: 16px 0 28px; display: flex; flex-direction: column; gap: 14px; }
.narrow { max-width: 560px; width: 100%; margin: 0 auto; }
.dhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dhead .actions { display: flex; gap: 8px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.btitle { font-size: 15px; font-weight: 700; }
.bsub { font-size: 13px; color: var(--soft); }
.banner.live { border-color: #145C3F; background: #0D1F18; } .banner.live .dot { animation: pulse 1.6s ease-in-out infinite; }
.banner.warn { border-color: #5C4A14; background: #1C170B; }
.banner.bad { border-color: #5C2B2B; background: #1E1414; }
.banner.wait .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Grille : Entrée | liaison | Relais | liaison | Sorties */
.board { display: flex; flex-direction: column; gap: 0; }
.colhead { display: none; }
.gut { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.det { margin-top: 12px; }
.n-in, .n-mid, .n-out { min-height: 100%; }

.node-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nicon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #22262F; color: var(--soft); }
.n-in .nicon, .d-inz .nicon { background: var(--in-bg); color: var(--in); }
.n-out .node-h .nicon { background: var(--live-bg); color: var(--live); }
.ntitle { font-size: 15px; font-weight: 700; }
.nsub { font-size: 12px; color: var(--muted); }
.big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card.s-live { border-color: #145C3F; } .card.s-warn { border-color: #5C4A14; } .card.s-bad { border-color: #5C2B2B; }
.zone-t { display: flex; align-items: center; gap: 10px; }
.znum { width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.d-inz .znum { background: var(--in-bg); color: var(--in); }
.d-outz .znum { background: var(--live-bg); color: var(--live); }
.d-midz .znum { background: #22262F; color: var(--soft); }
.zt { font-size: 15px; font-weight: 700; }
.d-inz { border-top: 3px solid #2F4C7A; }
.d-outz { border-top: 3px solid #145C3F; }
.d-midz { border-top: 3px solid #3A3F4B; }

/* Liaisons animées */
.pipe { width: 4px; height: 24px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--idle) 0 4px, transparent 4px 8px); }
.pipe.live, .pipe.warn, .pipe.bad { background-size: 100% 16px; animation: flowv .9s linear infinite; }
.pipe.live { background-image: repeating-linear-gradient(180deg, var(--live) 0 9px, transparent 9px 16px); }
.pipe.warn { background-image: repeating-linear-gradient(180deg, var(--warn) 0 9px, transparent 9px 16px); }
.pipe.bad { background-image: repeating-linear-gradient(180deg, var(--bad) 0 5px, transparent 5px 16px); }
@keyframes flowv { to { background-position: 0 16px; } }
@keyframes flowh { to { background-position: 16px 0; } }
@media (prefers-reduced-motion: reduce) { .pipe, .banner .dot { animation: none !important; } }
.lat { font-family: var(--mono); font-size: 11px; white-space: nowrap; padding: 2px 7px; border-radius: 999px; background: #22262F; border: 1px solid var(--line); color: var(--text); }

/* Relais : image + chiffres */
.screen { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.screen img, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.screen .placeholder { color: var(--muted); font-size: 13px; }
.ov { position: absolute; z-index: 2; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: rgba(14,16,20,.8); color: var(--soft); }
.ov.tl { top: 8px; left: 8px; } .ov.tr { top: 8px; right: 8px; }
.ov.br { bottom: 8px; right: 8px; border: 1px solid var(--line); color: var(--text); font-size: 12px; padding: 5px 10px; }
.ov.br:disabled { opacity: .7; }
.ovbar { display: flex; gap: 4px; padding: 3px; z-index: 3; }
.ovbar button { border: none; background: transparent; color: var(--text); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.ovbar button:hover { background: #2A2F3A; }
.screen iframe:not([hidden]) ~ .ov.tl { display: none; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .l { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tile .v { font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Sorties */
.olist { display: flex; flex-direction: column; gap: 6px; }
.oitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line2); border-left: 3px solid var(--idle); min-width: 0; }
.oitem.live { border-left-color: var(--live); } .oitem.warn { border-left-color: var(--warn); } .oitem.bad { border-left-color: var(--bad); }
.oitem.off { opacity: .5; }
.oitem .nicon { width: 30px; height: 30px; border-radius: 8px; }
.oname { font-size: 13px; font-weight: 600; }
.ocfg { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.ocfg:last-child { border-bottom: none; padding-bottom: 0; }

/* Délais + santé */
.dbar { display: flex; gap: 3px; height: 34px; border-radius: 8px; overflow: hidden; }
.dseg { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; min-width: 0; font-size: 12px; }
.dseg span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.dseg b { font-family: var(--mono); white-space: nowrap; }
.d-in { background: var(--in-bg); color: var(--in); }
.d-out { background: var(--live-bg); color: var(--live); }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.spark { width: 100%; height: 40px; display: block; }
.reasons { font-size: 12px; color: var(--warn); }

/* Lecteurs */
.readers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.reader { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line2); min-width: 0; }
.dest { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* Connexion & formulaires */
.login { padding: 64px 0; display: flex; flex-direction: column; gap: 16px; }
.note { font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 10px; line-height: 1.5; }
.note b { color: var(--soft); }
.confirm { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.desk-only { display: none !important; }

/* Statut bien visible dans le bandeau */
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 800;
  letter-spacing: .06em; white-space: nowrap; background: #262A33; color: #B4BAC5; flex-shrink: 0; }
.status-pill .pdot { width: 10px; height: 10px; border-radius: 5px; background: currentColor; }
.status-pill.live { background: var(--live); color: #062417; }
.status-pill.live .pdot { background: #062417; animation: pulse 1.6s ease-in-out infinite; }
.status-pill.wait { background: var(--warn-bg); color: var(--warn); }
.status-pill.wait .pdot { animation: pulse 1.6s ease-in-out infinite; }
.banner { flex-wrap: wrap; }
.banner .btn { flex-shrink: 0; }

/* Paramètres de la route */
.params .znum { background: #22262F; color: var(--soft); }
.params .znum svg { width: 15px; height: 15px; }
.params { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pcol { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.pcol:last-child { border-color: #3A2222; }
.prow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line2); }

/* ---------- Statistiques ---------- */
.statbtn { width: 36px; height: 36px; color: var(--accent); border-color: #3D2E0A; background: #1C170B; }
.statbtn:hover { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kpi-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kpi-row .tile { padding: 10px 12px; }
.charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.chart-card { gap: 8px; padding: 12px 14px; }
.ctitle { font-size: 14px; font-weight: 700; }
.plot { position: relative; width: 100%; min-height: 170px; }
.chart { display: block; }
.chart .grid { stroke: #22262F; stroke-width: 1; }
.chart .ylab { fill: var(--muted); font-size: 11px; text-anchor: end; font-variant-numeric: tabular-nums; }
.chart .xlab { fill: var(--muted); font-size: 11px; }
.chart .cross { stroke: #6B7280; stroke-width: 1; stroke-dasharray: 3 3; }
.nodata { height: 170px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.tip { position: absolute; top: 6px; z-index: 5; pointer-events: none; background: #0B0D11; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; min-width: 150px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.tip .tt { color: var(--muted); margin-bottom: 4px; }
.tip .tr { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tip .tr b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.events { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.ev { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line2); }
.evt { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tablewrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
table.sess { width: 100%; border-collapse: collapse; font-size: 12px; }
table.sess th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--card); }
table.sess td { padding: 7px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.sess .dot { display: inline-block; vertical-align: middle; }

/* ---------- Page Serveur ---------- */
a.vps { color: inherit; transition: border-color .15s; }
a.vps:hover { border-color: #3A3F4B; }
.vps-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.chev { font-size: 20px; line-height: 1; color: var(--muted); }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts:empty { display: none; }
.alert { font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); line-height: 1.5; }
.alert.warn { border-color: #5C4A14; background: #1C170B; color: #F5E6B8; }
.alert.bad { border-color: #5C2B2B; background: #1E1414; color: #F9D0D0; }
.alert b { color: #fff; }
.kv2 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 13px; align-items: baseline; }
.kv2 > span { color: var(--muted); }
.kv2 > b { font-weight: 600; overflow-wrap: anywhere; }
.meter { height: 10px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line2); overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); border-radius: 5px; }
.chip.ok { border-color: #145C3F; background: #0D1F18; color: var(--live); height: auto; padding: 6px 10px; }
.chip.ko { border-color: #5C2B2B; background: #1E1414; color: var(--bad); height: auto; padding: 6px 10px; }
table.sess tr.hl td { background: #1C170B; }

/* ---------- PC ---------- */
@media (min-width: 1000px) {
  .app { padding-inline: 32px; }
  html, body { font-size: 15px; }
  .desk-only { display: inline-flex !important; }
  .mob-only { display: none !important; }
  .top { padding: 28px 0 18px; display: flex; flex-direction: column; gap: 18px; }
  .vps { grid-template-columns: minmax(240px, 1fr) minmax(0, 2.4fr) auto; padding: 14px 20px; column-gap: 32px; }
  .vps .kpis { grid-column: 2; grid-row: 1; gap: 24px; }
  .vps .chev { grid-column: 3; }
  .vps .kpi { padding-left: 24px; border-left: 1px solid var(--line); }
  .vps .kpi .v { font-size: 18px; }
  .h1 { font-size: 28px; }
  .brand .h1 { font-size: 28px; }
  .brand .sub { font-size: 13px; }
  .home-filters { display: flex; gap: 8px; }
  .home-filters .chip { padding: 0 14px; }
  .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); align-items: start; gap: 16px; }
  .list .empty { grid-column: 1 / -1; }
  .rthumb { width: 128px; }
  .page { padding: 24px 0 40px; gap: 16px; }
  .title { font-size: 24px; }

  .board { display: grid; grid-template-columns: minmax(0, 1fr) var(--gut) minmax(0, 1.25fr) var(--gut) minmax(0, 1fr);
    grid-template-rows: auto auto auto; row-gap: 10px; align-items: stretch; }
  .colhead { display: block; grid-row: 1; padding-left: 2px; }
  .ch-in { grid-column: 1; color: var(--in); } .ch-mid { grid-column: 3; } .ch-out { grid-column: 5; color: var(--live); }
  .n-in { grid-column: 1; grid-row: 2; } .g1 { grid-column: 2; grid-row: 2; } .n-mid { grid-column: 3; grid-row: 2; }
  .g2 { grid-column: 4; grid-row: 2; } .n-out { grid-column: 5; grid-row: 2; }
  .d-inz { grid-column: 1; grid-row: 3; } .d-midz { grid-column: 3; grid-row: 3; } .d-outz { grid-column: 5; grid-row: 3; }
  .det { margin-top: 0; align-self: start; }
  .gut { justify-content: center; padding: 0; gap: 6px; }
  .gut .pipe { width: 100%; height: 4px; background: repeating-linear-gradient(90deg, var(--idle) 0 4px, transparent 4px 8px); }
  .gut .pipe.live, .gut .pipe.warn, .gut .pipe.bad { background-size: 16px 100%; animation-name: flowh; }
  .gut .pipe.live { background-image: repeating-linear-gradient(90deg, var(--live) 0 9px, transparent 9px 16px); }
  .gut .pipe.warn { background-image: repeating-linear-gradient(90deg, var(--warn) 0 9px, transparent 9px 16px); }
  .gut .pipe.bad { background-image: repeating-linear-gradient(90deg, var(--bad) 0 5px, transparent 5px 16px); }
  .readers { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .kpi-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
  .two.eq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sv-charts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pgrid { grid-template-columns: minmax(0, 1fr) var(--gut) minmax(0, 1.25fr) var(--gut) minmax(0, 1fr); gap: 0; align-items: stretch; }
  .pcol:nth-child(1) { grid-column: 1; } .pcol:nth-child(2) { grid-column: 3; } .pcol:nth-child(3) { grid-column: 5; }
  .login { padding-top: 120px; }
}
@media (min-width: 1400px) {
  .tile .v { font-size: 18px; }
  .big { font-size: 26px; }
}
