:root {
  --bg: #0a0e16;
  --panel: #111725;
  --panel-2: #151c2c;
  --panel-3: #1a2336;
  --border: #1e283b;
  --border-2: #29354d;
  --text: #e6ebf4;
  --muted: #8b97ae;
  --dim: #5b6780;
  --green: #4ade80;
  --green-2: #22c55e;
  --amber: #fbbf24;
  --orange: #fb923c;
  --red: #f87171;
  --red-2: #ef4444;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #f472b6;
  --radius: 16px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 14px/1.45 var(--font);
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(74, 222, 128, .09), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(96, 165, 250, .08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.num, .table td.n, .kpi .val { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px;
  background: rgba(10, 14, 22, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.srv-icon { width: 46px; height: 46px; flex: none; border-radius: 10px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--border-2); display: grid; place-items: center; }
.srv-icon img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: cover; }
#srvIconFallback { width: 70%; height: 70%; }
.brand-text { min-width: 0; }
.title { font-size: 18px; font-weight: 650; letter-spacing: .1px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#srvName { overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--panel-3); border: 1px solid var(--border-2); padding: 1px 7px; border-radius: 999px; }
.motd { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; }

.status { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border-2); white-space: nowrap; flex: none; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 0 currentColor; }
.status .label { font-weight: 650; }
.status .since { color: var(--muted); font-size: 12px; }
.status.s-online { border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.status.s-online .dot { background: var(--green); color: rgba(74, 222, 128, .55); animation: pulse 2s infinite; }
.status.s-lagging, .status.s-stopping { border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.status.s-lagging .dot, .status.s-stopping .dot { background: var(--amber); color: rgba(251, 191, 36, .5); animation: pulse 1.4s infinite; }
.status.s-starting { border-color: rgba(96, 165, 250, .4); background: rgba(96, 165, 250, .08); }
.status.s-starting .dot { background: transparent; border: 2px solid var(--blue); border-right-color: transparent; animation: spin .9s linear infinite; }
.status.s-not_responding, .status.s-frozen { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .1); }
.status.s-not_responding .dot, .status.s-frozen .dot { background: var(--red); color: rgba(248, 113, 113, .6); animation: pulse 1s infinite; }
.status.s-offline .dot { background: var(--dim); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }

.top-right { display: flex; align-items: center; gap: 12px; flex: none; }
.clock { text-align: right; line-height: 1.15; }
#clock { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.clock .sub { font-size: 11.5px; color: var(--muted); }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--green); opacity: .7; }
.conn.bad { background: var(--red); opacity: 1; animation: pulse 1s infinite; color: rgba(248, 113, 113, .6); }
.season { background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 6px 10px; max-width: 220px; }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border-2); cursor: pointer; color: var(--muted); transition: .15s; padding: 0; }
.icon-btn:hover { color: var(--text); border-color: #3a4866; background: var(--panel-3); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 18px; line-height: 1; }
.icon-btn.on { color: var(--amber); border-color: rgba(251, 191, 36, .45); }

/* ------------------------------------------------------------------ layout */
.wrap { max-width: 1560px; margin: 0 auto; padding: 18px 24px 40px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, 0) 120px), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .22);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; min-height: 30px; }
.card h2 { margin: 0; font-size: 12.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------ alerts */
.alerts { display: grid; gap: 10px; margin-bottom: 16px; }
.alerts:empty { display: none; }
.alert { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--panel-2); }
.alert .a-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; }
.alert .a-body { flex: 1; min-width: 0; }
.alert .a-title { font-weight: 650; margin-bottom: 2px; }
.alert .a-text { color: var(--muted); font-size: 13px; }
.alert .a-since { color: var(--dim); font-size: 12px; margin-top: 3px; }
.alert.error { border-color: rgba(248, 113, 113, .55); background: linear-gradient(90deg, rgba(239, 68, 68, .16), rgba(239, 68, 68, .04)); }
.alert.error .a-ico { background: rgba(248, 113, 113, .2); color: var(--red); }
.alert.warn { border-color: rgba(251, 191, 36, .4); background: linear-gradient(90deg, rgba(251, 191, 36, .1), rgba(251, 191, 36, .02)); }
.alert.warn .a-ico { background: rgba(251, 191, 36, .16); color: var(--amber); }
.alert.info { border-color: rgba(96, 165, 250, .35); }
.alert.info .a-ico { background: rgba(96, 165, 250, .14); color: var(--blue); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--panel-3); cursor: pointer; font-weight: 600; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: #3d4c6b; }
.btn.primary { background: var(--green-2); border-color: var(--green-2); color: #04210f; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: rgba(239, 68, 68, .16); border-color: rgba(239, 68, 68, .5); color: #fecaca; }
.btn.big { padding: 11px 20px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
.archive-note { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--border-2); color: var(--muted); }

/* ------------------------------------------------------------------ KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; padding: 14px 16px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); min-width: 0; }
.kpi .lbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .lbl i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.kpi .val { font-size: 28px; font-weight: 650; letter-spacing: -.3px; margin-top: 2px; white-space: nowrap; line-height: 1.2; }
.kpi .val small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; opacity: .55; pointer-events: none; }
.kpi .bar { height: 6px; border-radius: 6px; background: var(--panel-3); margin-top: 8px; overflow: hidden; }
.kpi .bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--blue)); }
.kpi .heads { display: flex; margin-top: 6px; height: 22px; }
.kpi .heads canvas { margin-right: -5px; border: 2px solid var(--panel); border-radius: 5px; }
.good { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); }

/* ------------------------------------------------------------------ heads */
canvas.head { image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 6px; flex: none; background: var(--panel-3); }

/* ------------------------------------------------------------------ online */
.online-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.pcard { display: flex; gap: 14px; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border-2); cursor: pointer; transition: .15s; position: relative; }
.pcard:hover { border-color: #3a4866; transform: translateY(-1px); }
.pcard .head { width: 58px; height: 58px; border-radius: 9px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.pcard .pc-main { min-width: 0; flex: 1; }
.pcard .pc-name { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.pcard .pc-name .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); color: rgba(74, 222, 128, .5); animation: pulse 2s infinite; }
.pcard .pc-timer { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 2px 0 2px; }
.pcard .pc-line { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .vitals { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.vital { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.vital .vbar { width: 54px; height: 6px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.vital .vbar span { display: block; height: 100%; border-radius: 4px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted); background: var(--panel-3); white-space: nowrap; }
.tag.green { color: var(--green); border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .07); }
.tag.amber { color: var(--amber); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .07); }
.tag.red { color: var(--red); border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); }
.tag.blue { color: var(--blue); border-color: rgba(96, 165, 250, .35); background: rgba(96, 165, 250, .07); }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); }
.empty .big { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.lastseen { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.lastseen .ls { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border-2); cursor: pointer; font-size: 12.5px; }

/* ------------------------------------------------------------------ server info */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; align-items: baseline; }
.kv .k { color: var(--muted); white-space: nowrap; }
.kv .v { min-width: 0; overflow-wrap: anywhere; }
.kv .v .copy { cursor: pointer; border-bottom: 1px dashed var(--dim); }
.kv .sep { grid-column: 1 / -1; height: 1px; background: var(--border); margin: 2px 0; }
.ok-i { color: var(--green); } .warn-i { color: var(--amber); } .bad-i { color: var(--red); }
.kv a { color: inherit; }
.dims { display: grid; gap: 5px; }
.dim { display: grid; grid-template-columns: minmax(0, 1fr) 56px 62px; gap: 8px; align-items: center; font-size: 12.5px; }
.dim .dn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim .dbar { height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.dim .dbar i { display: block; height: 100%; border-radius: 3px; }
.dim .dv { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

/* ------------------------------------------------------------------ tabs, chips */
.tabs { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border-2); }
.tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs button.active { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips button { border: 1px solid var(--border-2); background: transparent; padding: 3px 10px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 12px; }
.chips button.active { color: var(--text); background: var(--panel-3); border-color: #3a4866; }

/* ------------------------------------------------------------------ charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: -4px 0 8px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-online { background: linear-gradient(180deg, rgba(74, 222, 128, .7), rgba(74, 222, 128, .2)); border-top: 2px solid var(--green); }
.sw-tps { height: 2px; background: var(--amber); }
.sw-boot { background: rgba(96, 165, 250, .25); }
.sw-down { background: repeating-linear-gradient(135deg, rgba(139, 151, 174, .28) 0 2px, transparent 2px 5px); border: 1px solid rgba(139, 151, 174, .25); }
.sw-bad { background: rgba(248, 113, 113, .35); }
.sw-lag { width: 3px; height: 10px; background: var(--orange); border-radius: 1px; }
.chart { position: relative; width: 100%; min-height: 120px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.axis text, .chart text { fill: var(--dim); font-size: 11px; font-family: var(--font); }
.grid-line { stroke: rgba(139, 151, 174, .1); stroke-width: 1; }
.cross { stroke: rgba(230, 235, 244, .35); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }

/* gantt */
.gantt { position: relative; }
.g-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; min-height: 40px; }
.g-row + .g-row { border-top: 1px solid rgba(30, 40, 59, .6); }
.g-who { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
.g-who .head { width: 26px; height: 26px; border-radius: 5px; }
.g-who .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.g-who .tt { font-size: 11.5px; color: var(--muted); }
.g-track { position: relative; height: 26px; border-radius: 7px; background: rgba(21, 28, 44, .7); }
.g-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; min-width: 3px; cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25) inset; transition: filter .15s; }
.g-bar:hover { filter: brightness(1.2); }
.g-bar.open { background-image: linear-gradient(90deg, transparent 80%, rgba(255, 255, 255, .35)); animation: grow 2s ease-in-out infinite; }
@keyframes grow { 50% { filter: brightness(1.18); } }
.g-mark { position: absolute; top: -3px; width: 14px; height: 14px; margin-left: -7px; font-size: 11px; line-height: 14px; text-align: center; pointer-events: auto; cursor: default; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.g-axis { display: grid; grid-template-columns: 150px 1fr; gap: 10px; height: 22px; }
.g-axis .ticks { position: relative; font-size: 11px; color: var(--dim); }
.g-axis .ticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.g-server { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }
.g-server .lbl { font-size: 12px; color: var(--muted); }
.g-strip { position: relative; height: 10px; border-radius: 5px; background: repeating-linear-gradient(135deg, rgba(139, 151, 174, .22) 0 2px, transparent 2px 5px); overflow: hidden; }
.g-strip i { position: absolute; top: 0; bottom: 0; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(139, 151, 174, .08); pointer-events: none; }
.g-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); border-radius: 2px; box-shadow: 0 0 8px rgba(248, 113, 113, .8); pointer-events: none; z-index: 2; }
.g-overlay { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.daynav { display: flex; align-items: center; gap: 6px; }
.daylabel { position: relative; min-width: 150px; text-align: center; padding: 4px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border-2); cursor: pointer; font-weight: 600; font-size: 13px; }
.daylabel input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.daylabel input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

/* heatmap */
.heatmap { display: grid; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 10.5px; color: var(--dim); }
.heatmap .hc { aspect-ratio: 1 / 1; border-radius: 3px; background: rgba(139, 151, 174, .07); min-height: 9px; }
.heatmap .hl { display: flex; align-items: center; }
.heatmap .hh { text-align: center; }
.heat-legend { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--dim); }
.heat-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

/* feed: spans the gantt + days rows; the list is absolutely positioned so it never stretches them */
.feed-card { display: flex; flex-direction: column; grid-row: span 2; }
.feed-wrap { position: relative; flex: 1 1 auto; min-height: 320px; margin: 0 -8px; }
.feed-wrap .feed { position: absolute; inset: 0; padding: 0 8px; }
.feed { overflow-y: auto; scrollbar-width: thin; }
.ev { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(30, 40, 59, .55); align-items: start; }
.ev.new { animation: fadein .5s ease; }
.ev:last-child { border-bottom: 0; }
.ev .ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; }
.ev .ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ev .txt { font-size: 13px; min-width: 0; overflow-wrap: anywhere; padding-top: 4px; }
.ev .txt .meta { display: block; font-size: 11.5px; color: var(--dim); }
.ev .when { font-size: 11.5px; color: var(--dim); white-space: nowrap; padding-top: 5px; text-align: right; font-variant-numeric: tabular-nums; }
.ev .pl { font-weight: 650; cursor: pointer; }
.ev .pl:hover { text-decoration: underline; }
.ev .chat { color: #cdd5e3; }
.daysep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 10px 0 4px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }
.more { margin-top: 10px; width: 100%; padding: 8px; border-radius: 10px; border: 1px dashed var(--border-2); background: transparent; color: var(--muted); cursor: pointer; }
.more:hover { color: var(--text); }
.i-green { background: rgba(74, 222, 128, .13); color: var(--green); }
.i-gray { background: rgba(139, 151, 174, .12); color: var(--muted); }
.i-red { background: rgba(248, 113, 113, .15); color: var(--red); }
.i-amber { background: rgba(251, 191, 36, .14); color: var(--amber); }
.i-blue { background: rgba(96, 165, 250, .14); color: var(--blue); }
.i-violet { background: rgba(167, 139, 250, .15); color: var(--violet); }
.i-cyan { background: rgba(34, 211, 238, .13); color: var(--cyan); }
.i-orange { background: rgba(251, 146, 60, .14); color: var(--orange); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; scrollbar-width: thin; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--border-2); white-space: nowrap; cursor: pointer; user-select: none; }
.table th.n, .table td.n { text-align: right; }
.table th.sorted { color: var(--text); }
.table th.sorted::after { content: " ▾"; }
.table th.sorted.asc::after { content: " ▴"; }
.table td { padding: 9px 10px; border-bottom: 1px solid rgba(30, 40, 59, .6); white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.who { display: flex; align-items: center; gap: 10px; }
.who .head { width: 30px; height: 30px; }
.who .nm { font-weight: 650; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--dim); }
.st-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, .7); }
.mini-bar { display: inline-block; width: 56px; height: 5px; border-radius: 3px; background: var(--panel-3); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--violet); }
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.record { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); }
.record .rl { font-size: 11.5px; color: var(--muted); }
.record .rv { font-size: 16px; font-weight: 650; margin-top: 1px; }
.record .rs { font-size: 11.5px; color: var(--dim); }
.avail { display: flex; gap: 8px; flex-wrap: wrap; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 7, 12, .72); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; overflow-x: hidden; background: var(--panel); border: 1px solid var(--border-2); border-radius: 20px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(6px); } }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.pm { display: grid; grid-template-columns: 210px 1fr; gap: 24px; }
.pm-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.pm-side canvas.body { width: 128px; height: 256px; image-rendering: pixelated; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .5)); }
.pm-name { font-size: 22px; font-weight: 700; }
.pm-uuid { font-size: 10.5px; color: var(--dim); font-family: Consolas, ui-monospace, monospace; overflow-wrap: anywhere; }
.chips-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ck { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); }
.ck .l { font-size: 11.5px; color: var(--muted); }
.ck .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec { margin-top: 18px; }
.sec h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.box { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); }
.list { display: grid; gap: 6px; font-size: 13px; }
.list .li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.list .li span:first-child { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .li span:last-child { min-width: 0; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.progress { height: 8px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--pink)); }
pre.crash { white-space: pre-wrap; font: 12px/1.45 Consolas, ui-monospace, monospace; color: #cfd6e4; background: #0b0f18; border: 1px solid var(--border); border-radius: 12px; padding: 14px; max-height: 65vh; overflow: auto; margin: 0; }

/* settings */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field .fl { font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.input { width: 100%; padding: 9px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border-2); outline: none; }
.input:focus { border-color: var(--blue); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.radio { display: flex; gap: 8px; flex-wrap: wrap; }
.radio label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--panel-2); cursor: pointer; }
.radio input { accent-color: var(--green-2); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); }
.switch .sw-t { font-weight: 600; } .switch .sw-d { font-size: 12px; color: var(--muted); }
.toggle { position: relative; width: 42px; height: 24px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--border-2); transition: .2s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .2s; }
.toggle input:checked + span { background: var(--green-2); border-color: var(--green-2); }
.toggle input:checked + span::after { left: 21px; background: #fff; }
.toggle input:disabled + span { opacity: .5; cursor: default; }
.check-res { font-size: 12.5px; }

/* tooltip, toast */
.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 320px; padding: 10px 12px; border-radius: 12px; background: rgba(17, 23, 37, .97); border: 1px solid var(--border-2); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font-size: 12.5px; }
.tip .t-h { font-weight: 650; margin-bottom: 4px; }
.tip .t-r { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.tip .t-r b { color: var(--text); font-weight: 600; }
.tip .t-p { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.tip .t-p i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 70; padding: 10px 16px; border-radius: 12px; background: var(--panel-3); border: 1px solid var(--border-2); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }

.foot { margin-top: 22px; text-align: center; color: var(--dim); font-size: 12px; }
.foot a { color: var(--muted); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .span-4, .span-8 { grid-column: span 12; }
  .feed-card { grid-row: auto; }
  .feed-wrap { min-height: 0; }
  .feed-wrap .feed { position: static; max-height: 440px; }
}
@media (max-width: 760px) {
  .top { position: static; flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .brand { order: 1; flex: 1 1 0; }
  .srv-icon { width: 40px; height: 40px; }
  .title { font-size: 16px; }
  .title .badge { display: none; }
  .top-right { order: 2; margin-left: auto; gap: 8px; }
  .status { order: 3; width: 100%; justify-content: center; padding: 6px 12px; }
  .clock .sub { display: none; }
  #clock { font-size: 16px; }
  .alert { flex-wrap: wrap; }
  .alert .row { width: 100%; padding-left: 48px; }
  .kpi .sub { white-space: normal; }
  .wrap { padding: 14px 16px 30px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .val { font-size: 23px; }
  .grid { gap: 12px; }
  .card { padding: 14px 14px 16px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .g-row, .g-axis, .g-server { grid-template-columns: 96px 1fr; gap: 8px; }
  .g-who .tt { display: none; }
  .pm { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
  .modal-box { padding: 16px; max-height: calc(100vh - 20px); border-radius: 16px; }
  .online-list { grid-template-columns: 1fr; }
  .season { max-width: 130px; }
}
