:root {
  --bg: #e9ece9;
  --shell: #fbfbfa;
  --card: #ffffff;
  --panel: #ffffff;
  --soft: #f3f5f3;
  --ink: #101612;
  --mute: #7b857e;
  --line: #e3e8e4;
  --g1: #0f4d2f;
  --g2: #1f7a4d;
  --g3: #5fbb8d;
  --g4: #0b3320;
  --accent: #1a6b43;
  --bad: #d9534f;
  --warn: #d99a2b;
  --shadow: 0 1px 2px rgba(16, 22, 18, .04), 0 12px 32px -16px rgba(16, 22, 18, .12);
  --stripe: #9aa89f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f0d; --shell: #101512; --card: #141a16; --panel: #171e19; --soft: #1d2520;
    --ink: #eef3ef; --mute: #8a958e; --line: #25302a; --accent: #4cc38a;
    --shadow: 0 12px 32px -16px rgba(0, 0, 0, .6); --stripe: #4b5a51;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.shell {
  display: grid; grid-template-columns: 250px 1fr; gap: 16px;
  max-width: 1500px; margin: 0 auto; padding: 24px; min-height: 100vh;
}
.card { background: var(--shell); border-radius: 28px; }
.side { padding: 28px 18px; position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; padding: 0 10px 22px; letter-spacing: -.02em; }
.logo { width: 32px; height: 32px; border-radius: 50%; border: 5px solid var(--g2); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 3px solid var(--g3); }
.side h6 { margin: 18px 10px 6px; font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--mute); text-transform: uppercase; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px;
  color: var(--mute); text-decoration: none; font-weight: 500; position: relative;
}
.side a:hover { background: var(--soft); color: var(--ink); }
.side a.on { color: var(--ink); font-weight: 600; }
.side a.on::before { content: ""; position: absolute; left: -18px; top: 6px; bottom: 6px; width: 5px; border-radius: 0 6px 6px 0; background: var(--g2); }
.side img, .ico { width: 22px; height: 22px; object-fit: contain; flex: none; border-radius: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); margin-left: auto; flex: none; }
.dot.up { background: #2fb36f; } .dot.down { background: var(--bad); }

.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 999px;
  padding: 0 14px; height: 52px; width: min(420px, 100%); color: var(--mute);
}
.search input { flex: 1; border: 0; background: none; outline: none; font: inherit; color: var(--ink); min-width: 0; }
kbd { background: var(--line); border-radius: 8px; padding: 2px 8px; font: 12px inherit; color: var(--mute); }
.chips { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  background: var(--soft); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 500; white-space: nowrap;
}
.chip b { font-weight: 700; margin-left: 4px; }

.page { padding: 28px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
h1 { margin: 0; font-size: 44px; letter-spacing: -.03em; line-height: 1.1; }
.head p { margin: 6px 0 0; color: var(--mute); }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 1.5px solid var(--g2); color: var(--accent);
}
.btn.solid { background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; border-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tiles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tile, .panel { background: var(--panel); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); position: relative; min-width: 0; }
.span2 { grid-column: span 2; }
.tile h3, .panel h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tile .arrow {
  position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: var(--ink); text-decoration: none;
}
.tile .big { font-size: 56px; font-weight: 600; letter-spacing: -.04em; line-height: 1; margin: 22px 0 14px; }
.tile .unit { font-size: 16px; font-weight: 500; letter-spacing: 0; margin-left: 8px; opacity: .75; }
.tile .sub { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--accent); min-height: 22px; flex-wrap: wrap; }
.tile .pill { border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; font-size: 12px; font-weight: 600; opacity: .9; }
.tile { transition: transform .15s, box-shadow .15s; }
.tile:hover { background: linear-gradient(145deg, var(--g2) 0%, var(--g1) 100%); color: #fff; transform: translateY(-2px); }
.tile:hover .arrow { background: #fff; color: var(--g1); border-color: #fff; }
.tile:hover .sub, .tile.off:hover .sub { color: #b9f1d3; }
.tile:hover .big { color: #fff; }
.tile.off .big { color: var(--mute); }
.tile.off .sub { color: var(--bad); }

.panel h3 + * { margin-top: 14px; }
.pills { display: flex; align-items: flex-end; justify-content: space-between; height: 190px; gap: 8px; padding-top: 24px; }
.pills .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; position: relative; }
.pills .bar {
  width: 100%; max-width: 64px; border-radius: 999px; min-height: 36px; position: relative;
  background: repeating-linear-gradient(135deg, var(--stripe) 0 2px, transparent 2px 7px);
  border: 1px solid var(--stripe); opacity: .85; transition: height .5s;
}
.pills .bar.has { background: var(--g2); border-color: transparent; opacity: 1; }
.pills .bar.max { background: var(--g4); }
.pills .bar.mid { background: var(--g3); }
.pills .col span { font-size: 13px; color: var(--mute); }
.pills .tag {
  position: absolute; top: -26px; font-size: 11px; font-weight: 600; background: var(--soft); border-radius: 8px; padding: 1px 6px; white-space: nowrap;
}
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--mute); margin-top: 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.up-title { color: var(--accent); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 14px 0 6px; }
.panel .meta { color: var(--mute); font-size: 14px; }
.panel .btn { margin-top: 18px; width: 100%; justify-content: center; }
.list { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.row .ico { width: 36px; height: 36px; padding: 6px; background: var(--soft); border-radius: 12px; }
.row .t { min-width: 0; }
.row .t b { display: block; font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t small { color: var(--mute); font-size: 12px; }
.empty { color: var(--mute); font-size: 14px; padding: 12px 0; }

.kv { display: flex; flex-direction: column; gap: 12px; }
.kv div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.kv div:last-child { border: 0; }
.kv span { color: var(--mute); }
.kv b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }

.donut { position: relative; width: 180px; margin: 6px auto 0; }
.donut svg { width: 100%; display: block; }
.donut .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .c b { font-size: 36px; letter-spacing: -.04em; font-weight: 600; line-height: 1; }
.donut .c span { font-size: 12px; color: var(--mute); }

.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.app {
  aspect-ratio: 1; border-radius: 16px; background: var(--soft); display: grid; place-items: center;
  position: relative; text-decoration: none; color: var(--ink); transition: transform .15s, background .15s;
}
.app:hover { transform: translateY(-2px); background: var(--line); }
.app img { width: 56%; height: 56%; object-fit: contain; }
.app .dot { position: absolute; top: 7px; right: 7px; margin: 0; }
.app em {
  position: absolute; bottom: 3px; right: 5px; font-style: normal; font-size: 10px; font-weight: 700;
  background: var(--g2); color: #fff; border-radius: 8px; padding: 0 5px;
}
.app em.warn { background: var(--warn); }
.fallback { font-weight: 700; font-size: 18px; color: var(--accent); }

.feature {
  color: #fff; background:
    radial-gradient(120% 90% at 100% 0%, rgba(95, 187, 141, .35), transparent 55%),
    repeating-radial-gradient(circle at 20% 120%, rgba(255, 255, 255, .05) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #0f4d2f, #072416);
}
.feature .big { font-size: 46px; font-weight: 600; letter-spacing: -.03em; line-height: 1; margin: 18px 0 8px; }
.feature .meta { color: #a9d7bf; }
.feature .bubbles { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.feature .bubble { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 500; }
.feature .bubble.ok { background: #fff; color: var(--g1); }
.feature .bubble.bad { background: #ff6b66; color: #fff; }
.foot { text-align: right; color: var(--mute); font-size: 12px; margin: 16px 4px 0; }
.hide { display: none !important; }

@media (max-width: 1180px) { .grid, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .side { position: static; max-height: none; padding: 16px 14px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 2px 6px; }
  .side h6 { width: 100%; margin-top: 8px; }
  .side a.on::before { display: none; }
  .page { padding: 18px; }
  h1 { font-size: 32px; }
  .top { padding: 12px; flex-wrap: wrap; }
  .chips { margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .grid, .tiles { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .tile .big { font-size: 46px; }
}
.mdi { filter: none; }
@media (prefers-color-scheme: dark) { .mdi { filter: invert(1); } }

.copy-pop {
  position: fixed; z-index: 50; width: 280px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; box-shadow: var(--shadow), 0 8px 28px rgba(0, 0, 0, .18);
}
.copy-pop h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.copy-t { flex: 1; min-width: 0; }
.copy-t b { display: block; font-size: 13px; }
.copy-t small { display: block; color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
  border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; min-width: 76px;
}

.pie { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pie .donut { margin: 0; flex: none; }
.pie .donut circle.seg { transition: opacity .15s; }
.pie .donut svg:hover circle.seg { opacity: .55; }
.pie .donut svg circle.seg:hover { opacity: 1; }
.pie-legend { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 12px; }
.pie-legend div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pie-legend i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pie-legend span { flex: 1; color: var(--mute); }
.pie-legend b { font-weight: 600; }
.pie-legend small { color: var(--mute); min-width: 38px; text-align: right; }
.tile.link { cursor: pointer; }

#p-recent { grid-row: span 2; }
.rsec { margin-top: 16px; }
.rsec h5 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.rsec .empty { padding: 4px 0; }
@media (max-width: 1180px) { #p-recent { grid-row: auto; } }
.linechart { width: 100%; height: auto; display: block; }
.linechart .ax { font-size: 12px; fill: var(--mute); }

.spot-bg { position: fixed; inset: 0; z-index: 90; background: rgba(8, 12, 10, .38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.search.spot {
  position: fixed; z-index: 100; top: 24vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  height: 60px; background: color-mix(in srgb, var(--shell) 72%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 20px;
}
.search.spot input { font-size: 18px; color: var(--ink); }
.spot-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 20px; background: color-mix(in srgb, var(--shell) 72%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.spot-results:empty { display: none; }
.spot-row { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--ink); font: inherit; padding: 10px 12px; border-radius: 14px; cursor: pointer; text-align: left; }
.spot-row img { width: 22px; height: 22px; object-fit: contain; }
.spot-row:hover, .spot-row.first { background: var(--soft); }

.side h6.grp { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; border-radius: 8px; }
.side h6.grp:hover { color: var(--ink); }
.side h6.grp:focus-visible { outline: 2px solid var(--g3); outline-offset: 2px; }
.chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.side h6.grp[aria-expanded="false"] .chev { transform: rotate(-45deg); }
#nav:not(.searching) a.collapsed { display: none; }
