:root {
  --bg-0: #121418;
  --bg-1: #1d2026;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --glass-line: rgba(255, 255, 255, 0.12);
  --text: #f4f5f7;
  --muted: rgba(244, 245, 247, 0.58);
  --faint: rgba(244, 245, 247, 0.32);
  --ink: #17181b;
  --yellow: #f9d85e;
  --orange: #ff9a57;
  --purple: #c9a7ff;
  --green: #9be36d;
  --blue: #8fd3ff;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --idle: #9ca3af;
  --radius: 22px;
  --radius-sm: 14px;
  --blur: blur(28px) saturate(140%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 800px at 20% 10%, #2b2f37 0%, var(--bg-1) 45%, var(--bg-0) 100%) fixed;
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.muted { color: var(--muted); }

/* soft colored light behind the glass */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.32; }
.b1 { width: 520px; height: 520px; left: -120px; top: -140px; background: #6d5bd0; }
.b2 { width: 460px; height: 460px; right: -80px; top: 18%; background: #ff8a4c; opacity: 0.18; }
.b3 { width: 520px; height: 520px; left: 32%; bottom: -260px; background: #3fb8a8; opacity: 0.2; }
.b4 { width: 300px; height: 300px; left: 48%; top: 8%; background: #f2c94c; opacity: 0.12; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* icons */
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[data-icon] { display: inline-flex; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--glass-line);
  background: var(--glass-strong); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: rgba(255, 255, 255, 0.18); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.primary { background: var(--text); color: var(--ink); border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn.danger { color: #ffb4b4; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.12); margin-top: 28px; }
.btn.link { background: none; border: none; color: var(--muted); font-weight: 500; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--glass-line); background: rgba(255, 255, 255, 0.06); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- layout ---------- */
.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}

/* sidebar */
.sidebar {
  position: sticky; top: 24px; align-self: start;
  height: calc(100vh - 48px);
  border-radius: var(--radius);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  overflow: hidden;
}
.me { display: flex; align-items: center; gap: 12px; padding: 0 6px 18px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: var(--ink); background: linear-gradient(135deg, var(--yellow), var(--orange));
}
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.me-text span { font-size: 12px; text-transform: capitalize; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  text-decoration: none; color: var(--muted); font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.nav a.active { background: rgba(255, 255, 255, 0.12); color: var(--text); }

.side-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); padding: 6px 12px;
}
.count { background: rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 2px 8px; color: var(--text); }
.side-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.side-list li a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  text-decoration: none; font-size: 14px;
}
.side-list li a:hover { background: rgba(255, 255, 255, 0.06); }
.side-list .mini {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ink); background: var(--c, var(--blue));
}
.side-list .mini svg { width: 15px; height: 15px; }
.side-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 10px 12px 0; }

/* status dots */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); flex: none; }
.dot.up { background: var(--ok); box-shadow: 0 0 10px rgba(74, 222, 128, 0.7); }
.dot.down { background: var(--bad); box-shadow: 0 0 10px rgba(248, 113, 113, 0.8); animation: pulse 1.6s infinite; }
.dot.degraded { background: var(--warn); box-shadow: 0 0 10px rgba(251, 191, 36, 0.7); }
.dot.stopped, .dot.unknown { background: var(--idle); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* main */
.main { min-width: 0; padding-top: 6px; }
.hero { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.hero-mark {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-line);
}
.hero-mark svg { width: 34px; height: 34px; }
.hero h1 { font-size: 34px; font-weight: 800; }
.hero h1 em { font-weight: 400; font-style: italic; color: var(--muted); }
.hero p { margin: 4px 0 0; }

.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 30px 0 14px; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.section-head p { margin: 0; font-size: 13px; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.t-cpu { grid-column: span 6; }
.t-mem, .t-pi { grid-column: span 3; }
.t-mem.solo { grid-column: span 6; }
.t-disk, .t-net, .t-cert { grid-column: span 4; }
.tile {
  position: relative; border-radius: var(--radius); padding: 16px 18px 18px; color: var(--ink);
  min-height: 150px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--c);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}
.tile .label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tile .chip {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.45);
}
.tile .chip svg { width: 16px; height: 16px; }
.tile .big { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tile .big svg { width: 26px; height: 26px; }
.tile .num { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tile .unit { font-size: 15px; font-weight: 700; opacity: 0.7; }
.tile .sub { font-size: 12px; font-weight: 500; opacity: 0.8; margin-top: auto; padding-top: 10px; }
.tile .sub b { font-weight: 800; }
.bar { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.14); margin-top: 12px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--ink); transition: width 0.6s ease; }
.spark { width: 100%; height: 34px; margin-top: 8px; }
.spark polyline { stroke: var(--ink); stroke-width: 2; fill: none; }
.spark polygon { fill: rgba(0, 0, 0, 0.1); stroke: none; }
.certlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 8px; margin-top: 12px; }
.certlist span {
  height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800;
  background: rgba(255, 255, 255, 0.5);
}
.certlist span.warn { background: var(--ink); color: var(--yellow); }

/* service cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  transition: transform 0.15s, background 0.15s;
}
.card:hover { background: var(--glass-strong); }
.card.is-down { border-color: rgba(248, 113, 113, 0.5); }
.card.is-degraded { border-color: rgba(251, 191, 36, 0.45); }
.card-top { display: flex; align-items: center; gap: 12px; }
.svc-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--ink);
  background: var(--c, var(--blue)); flex: none;
}
.svc-icon svg { width: 21px; height: 21px; }
.card-title { flex: 1; min-width: 0; }
.card-title a, .card-title span.n { font-weight: 700; font-size: 15px; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title a:hover { text-decoration: underline; }
.status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.status b { font-weight: 600; color: var(--text); }
.ms { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--muted); }
.uptime { display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; height: 22px; }
.uptime i { border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.uptime i.g { background: var(--ok); opacity: 0.85; }
.uptime i.y { background: var(--warn); }
.uptime i.r { background: var(--bad); }
.uptime-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: -6px; }
.card-foot { display: flex; align-items: center; gap: 8px; }
.card-foot .res { flex: 1; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note { font-size: 12px; color: var(--warn); }
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; bottom: 40px; min-width: 150px; padding: 6px; border-radius: 14px; z-index: 5;
  background: rgba(36, 39, 46, 0.96); border: 1px solid var(--glass-line); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.menu-pop button {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.menu-pop button:hover { background: rgba(255, 255, 255, 0.1); }
.menu-pop button.danger { color: #ffb4b4; }
.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* activity column (like the reference's comment bubbles) */
.activity { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); display: flex; flex-direction: column; padding-top: 6px; min-width: 0; }
.activity-head { display: flex; flex-direction: column; gap: 12px; padding: 0 4px 14px; }
.activity-title { display: flex; align-items: center; gap: 10px; }
.activity-title h2 { font-size: 19px; }
.seg { display: flex; padding: 4px; border-radius: 14px; gap: 2px; }
.seg button {
  flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 10px; border-radius: 10px; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, 0.16); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }

.feed {
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 6px 24px 2px; position: relative;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}
.day {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
  padding: 10px 6px 0;
}

/* "right now" banner */
.now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; }
.now strong { display: block; font-size: 14px; }
.now span.muted { display: block; font-size: 12px; }
.now-body { flex: 1; min-width: 0; }
.now-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--ink); }
.now-icon svg { width: 17px; height: 17px; }
.now.ok .now-icon { background: var(--ok); }
.now.bad { border-color: rgba(248, 113, 113, 0.45); background: linear-gradient(135deg, rgba(248,113,113,.18), rgba(255,255,255,.05)); }
.now.bad .now-icon { background: var(--bad); animation: pulse 1.6s infinite; }
.now { flex-wrap: wrap; }
.now-actions { display: flex; gap: 6px; width: 100%; padding-left: 46px; }
.chip-btn {
  border: 1px solid var(--glass-line); background: rgba(255,255,255,.08); color: var(--text); font: inherit;
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.chip-btn:hover { background: rgba(255,255,255,.18); }
.chip-btn.solid { background: var(--text); color: var(--ink); border-color: transparent; }

/* bubbles */
.bubble {
  position: relative; display: flex; gap: 12px; padding: 14px 14px 12px 16px; border-radius: 20px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.bubble:hover { background: var(--glass-strong); transform: translateX(-3px); }
.bubble::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 3px;
  background: var(--k); opacity: 0.85;
}
.bubble .av {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--ink); background: var(--c); box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.bubble .av > svg { width: 19px; height: 19px; }
.bubble .badge {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--k); color: var(--ink);
  border: 2px solid #23262d;
}
.bubble .badge svg { width: 11px; height: 11px; stroke-width: 2.6; }
.bubble .body { min-width: 0; flex: 1; }
.bubble .who { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14.5px; }
.bubble .who time { font-weight: 500; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bubble p { margin: 2px 0 0; font-size: 14px; color: rgba(244, 245, 247, 0.88); }
.bubble .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.bubble .tag {
  font-weight: 700; color: var(--k); background: color-mix(in srgb, var(--k) 16%, transparent);
  padding: 2px 8px; border-radius: 999px;
}
.bubble .by { color: var(--text); opacity: 0.75; }
.bubble.k-down, .bubble.k-degraded { background: linear-gradient(135deg, rgba(248,113,113,.10), var(--glass)); }
.empty { color: var(--muted); font-size: 14px; padding: 20px; text-align: center; border-radius: var(--radius); }

/* tables */
.table { border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 1.4fr 1.4fr 0.8fr 1fr 1fr; gap: 12px; padding: 12px 18px; align-items: center; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.row:last-child { border-bottom: 0; }
.row.head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.row .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.row.certs { grid-template-columns: 2fr 1fr 1fr; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.pill.bad { background: rgba(248, 113, 113, 0.18); color: #ffc2c2; }
.pill.warn { background: rgba(251, 191, 36, 0.18); color: #ffe39a; }
.pill.good { background: rgba(74, 222, 128, 0.15); color: #b8f5cd; }

/* logs */
.logs-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
select {
  font: inherit; color: var(--text); background: var(--glass-strong); border: 1px solid var(--glass-line);
  border-radius: 12px; padding: 9px 12px; min-width: 160px;
}
select option { background: #23262d; }
.logs {
  margin: 0; padding: 16px 18px; border-radius: var(--radius); max-height: 60vh; overflow: auto;
  font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #d9dde5; white-space: pre-wrap; word-break: break-word;
}

/* sessions */
.sessions { display: grid; gap: 10px; }
.session { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); }
.session .info { flex: 1; min-width: 0; }
.session .ua { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session .when { font-size: 12px; color: var(--muted); }

/* modals */
.modal {
  border-radius: var(--radius); padding: 22px; color: var(--text); width: min(420px, calc(100vw - 32px));
  background: rgba(30, 33, 40, 0.92);
}
.modal.wide { width: min(900px, calc(100vw - 32px)); padding: 16px; }
.modal::backdrop { background: rgba(8, 9, 12, 0.55); backdrop-filter: blur(4px); }
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.modal-head h3 { flex: 1; margin: 0; }
.modal .logs { background: rgba(0, 0, 0, 0.3); max-height: 65vh; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  background: rgba(36, 39, 46, 0.96); border: 1px solid var(--glass-line); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.toast.bad { border-color: rgba(248, 113, 113, 0.6); }

.tabbar { display: none; }


/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes barGrow { from { width: var(--from, 0%); } to { width: var(--w); } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--fc); } 40% { box-shadow: 0 0 0 6px var(--fc); } 100% { box-shadow: 0 20px 60px rgba(0,0,0,.35); } }
@keyframes glowNew { 0% { box-shadow: 0 0 0 2px var(--k), 0 20px 60px rgba(0,0,0,.35); } 100% { box-shadow: 0 20px 60px rgba(0,0,0,.35); } }
@keyframes drift1 { 50% { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-90px, 120px) scale(0.9); } }
@keyframes drift3 { 50% { transform: translate(80px, -100px) scale(1.1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes fadeView { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.b1 { animation: drift1 26s ease-in-out infinite; }
.b2 { animation: drift2 32s ease-in-out infinite; }
.b3 { animation: drift3 38s ease-in-out infinite; }
.b4 { animation: drift1 30s ease-in-out infinite reverse; }

.tile.enter { animation: rise 0.6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.card.enter { animation: rise 0.55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(250ms + var(--i, 0) * 55ms); }
.bubble.enter { animation: slideIn 0.5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(300ms + var(--i, 0) * 45ms); }
.bubble.new { animation: slideIn 0.5s cubic-bezier(.2,.8,.2,1) both, glowNew 2.4s ease-out 0.3s; }
.card.enter .uptime i { animation: grow 0.4s ease-out both; transform-origin: bottom; animation-delay: calc(500ms + var(--j, 0) * 12ms); }
.bar > i { animation: barGrow 0.8s cubic-bezier(.2,.8,.2,1) both; }
.card.flash.is-down { --fc: rgba(248,113,113,.55); animation: flash 1.6s ease-out; }
.card.flash.is-up { --fc: rgba(74,222,128,.5); animation: flash 1.6s ease-out; }
.card.flash.is-degraded { --fc: rgba(251,191,36,.5); animation: flash 1.6s ease-out; }
.card.working {
  background-image: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.09) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}

.tile { transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s; }
.tile:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 0 22px 50px rgba(0,0,0,.38); }
.tile .chip { transition: transform 0.25s; }
.tile:hover .chip { transform: scale(1.12) rotate(-6deg); }
.card { transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.2s, box-shadow 0.25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(0,0,0,.45); }
.svc-icon { transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
.card:hover .svc-icon { transform: scale(1.08) rotate(-4deg); }
.icon-btn { transition: background 0.15s, transform 0.15s; }
.icon-btn:hover:not(:disabled) { transform: translateY(-1px); }
.icon-btn svg { transition: transform 0.4s; }
.icon-btn[title^="Restart"]:hover:not(:disabled) svg { transform: rotate(180deg); }
.side-list li a, .nav a { transition: background 0.15s, color 0.15s, transform 0.15s; }
.side-list li a:hover, .nav a:hover { transform: translateX(3px); }
.view:not([hidden]) { animation: fadeView 0.35s ease-out; }
.modal[open] { animation: popIn 0.25s cubic-bezier(.2,.8,.2,1); }
.menu-pop { animation: popIn 0.16s ease-out; transform-origin: bottom right; }
.toast:not([hidden]) { animation: popIn 0.25s ease-out; }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: min(420px, 100%); border-radius: 26px; padding: 30px 28px; display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.brand-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); }
.brand-mark svg { width: 26px; height: 26px; }
.brand h1 { font-size: 24px; font-weight: 800; }
.brand p { margin: 2px 0 0; font-size: 14px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step label { font-size: 13px; color: var(--muted); }
.step label strong { color: var(--text); font-weight: 600; }
input[type="email"] {
  font: inherit; font-size: 16px; color: var(--text); padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--glass-line); background: rgba(0, 0, 0, 0.22);
}
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-boxes input {
  font: inherit; font-size: 24px; font-weight: 700; text-align: center; color: var(--text);
  padding: 12px 0; border-radius: 12px; border: 1px solid var(--glass-line); background: rgba(0, 0, 0, 0.22); min-width: 0;
}
.code-boxes input:focus { border-color: var(--yellow); outline: none; }
.error { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(248, 113, 113, 0.14); color: #ffc9c9; font-size: 14px; white-space: pre-wrap; }
.hint { margin: 0; font-size: 12px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .app { grid-template-columns: 230px minmax(0, 1fr); }
  .activity { grid-column: 2; position: static; max-height: none; }
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .t-cpu, .t-mem.solo { grid-column: span 6; }
  .t-disk, .t-net, .t-cert { grid-column: span 2; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 96px; gap: 18px; }
  .sidebar { display: none; }
  .activity { grid-column: 1; }
  .hero-mark { width: 54px; height: 54px; border-radius: 16px; }
  .hero h1 { font-size: 26px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { grid-column: span 1 !important; min-height: 132px; padding: 14px; }
  .tile.t-cpu, .tile.t-cert { grid-column: span 2 !important; }
  /* on phones, service status comes first */
  #view-overview { display: flex; flex-direction: column; }
  #view-overview .tiles { order: 3; margin-top: 26px; }
  #view-overview .section-head { order: 1; margin-top: 0; }
  #view-overview .grid { order: 2; }
  .tile .num { font-size: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 1.2fr 0.9fr 0.9fr; }
  .row .hide-sm { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    border-radius: 20px; padding: 6px; justify-content: space-around; z-index: 20; background: rgba(30, 33, 40, 0.8);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600;
    text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 14px; flex: 1;
  }
  .tabbar a.active { color: var(--text); background: rgba(255, 255, 255, 0.1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
