/* ============ KERNEX app.css — app shell, header, bottom nav, page components ============ */

.layout { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- header ---------- */
.layout header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 15, 23, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 11px 15px; display: flex; align-items: center; justify-content: space-between;
}
.layout header .b { font-weight: 800; font-size: 17px; }
.layout header .b i { color: var(--acc); font-style: normal; }
.chip-acc {
  display: flex; align-items: center; gap: 7px;
  background: var(--card2); border: 1px solid var(--line);
  border-radius: 99px; padding: 5px 11px; font-size: 12.5px; max-width: 46vw;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grn); flex: none; }
.dot.off { background: var(--mut); }

/* ---------- main + bottom nav ---------- */
.main {
  flex: 1; padding: 14px 14px calc(var(--nav) + env(safe-area-inset-bottom) + 18px);
  max-width: 720px; width: 100%; margin: 0 auto;
}
#bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(17, 24, 39, .97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
#bottom-nav button {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px; color: var(--tx2); font-size: 10.5px; font-weight: 600; border-radius: 10px;
}
#bottom-nav button .ic { font-size: 19px; line-height: 1; }
#bottom-nav button.active { color: var(--acc); }
#bottom-nav .badge {
  position: absolute; margin-left: 22px; margin-top: -3px;
  background: var(--red); color: #fff; border-radius: 99px;
  font-size: 9px; padding: 1px 5px; min-width: 15px;
}

/* ---------- stats / device cards ---------- */
.sec { margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); padding: 13px; }
.stat .v { font-size: 21px; font-weight: 800; }
.stat .k { color: var(--tx2); font-size: 12px; margin-top: 1px; }

.dev { background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); padding: 14px; margin-bottom: 12px; }
.dev .nm { font-weight: 700; font-size: 15.5px; }
.dev .st { font-size: 12px; color: var(--tx2); margin-top: 2px; }
.batt { width: 30px; height: 13px; border: 1.5px solid var(--tx2); border-radius: 3.5px; position: relative; flex: none; }
.batt::after { content: ""; position: absolute; right: -5px; top: 3px; width: 2.5px; height: 5px; background: var(--tx2); border-radius: 0 2px 2px 0; }
.batt i { position: absolute; inset: 1.5px; background: var(--grn); border-radius: 1.5px; display: block; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--tx2); white-space: nowrap;
}
.chip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
