:root {
  --bg: #080d1c;
  --card: rgba(18, 27, 56, 0.75);
  --border: rgba(167, 191, 255, 0.2);
  --text: #f5f7ff;
  --soft: #b7c4ea;
  --ok: #16c784;
  --mid: #f4b740;
  --high: #ff6b6b;
  --brand: #3b82f6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(100% 150% at 70% 0%, #1a2d62 0%, #0b1023 38%, var(--bg) 100%);
}

.bg-blobs .blob { position: fixed; border-radius: 999px; filter: blur(64px); opacity: 0.28; z-index: -1; }
.blob-a { width: 240px; height: 240px; background: #2dd4bf; left: -40px; top: -60px; }
.blob-b { width: 280px; height: 280px; background: #60a5fa; right: -80px; top: 180px; }

.topbar, .app-main { width: min(760px, calc(100% - 24px)); margin-inline: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, #2dd4bf, #3b82f6); }

button { cursor: pointer; border: 0; font: inherit; }
.ghost-btn, .solid-btn { border-radius: 12px; padding: 9px 12px; }
.ghost-btn { color: var(--text); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); }
.solid-btn { color: #07132a; font-weight: 800; background: linear-gradient(135deg, #2dd4bf, #3b82f6); }

.app-main { padding: 0 0 124px; display: grid; gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: "Bebas Neue", sans-serif; font-size: clamp(2rem, 9vw, 2.8rem); letter-spacing: 0.02em; font-weight: 400; }
h2 { font-size: 1.08rem; }
.sub { color: var(--soft); font-size: 0.9rem; margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 10px; }
.stat strong { font-size: 1rem; }
.stat span { display: block; font-size: 0.8rem; color: var(--soft); margin-top: 4px; }

.list { display: grid; gap: 10px; }
.card { border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 12px; background: rgba(255,255,255,0.03); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.meta { color: var(--soft); font-size: 0.82rem; }
.tag { border-radius: 999px; font-size: 0.74rem; padding: 4px 8px; font-weight: 700; }
.tag.low { background: rgba(22,199,132,0.18); color: #9ff3d4; }
.tag.mid { background: rgba(244,183,64,0.2); color: #ffe8b0; }
.tag.high { background: rgba(255,107,107,0.2); color: #ffc6c6; }

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(10px, env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 24px));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(8,13,28,0.92);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  z-index: 30;
}
.nav-btn {
  color: var(--soft);
  background: transparent;
  min-height: 36px;
  padding: 6px 4px;
  border-radius: 10px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.nav-btn.active { color: var(--text); background: rgba(59,130,246,0.25); }
.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-label {
  line-height: 1;
}

.kv { display: grid; gap: 8px; }
.kv-row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,0.15); padding-bottom: 6px; }

input, textarea {
  width: 100%; padding: 10px; color: var(--text); border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.03);
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .app-main { padding-bottom: 110px; }
}
