:root {
  color-scheme: dark;
  --bg: #0c0d0b;
  --panel: #151712;
  --fg: #e9e4d8;
  --muted: #8f9286;
  --accent: #b7c4a8;
  --border: #2a2c26;
  --danger: #d98973;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --top-h: 56px;
  --side-w: 240px;
  --content-max: 960px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}
a { color: var(--accent); }
button, input { font: inherit; }
.muted { color: var(--muted); }
.center { text-align: center; }
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: var(--top-h) 1fr;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  height: var(--top-h);
  padding: 0 1rem 0 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #10120e;
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-start {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
}
.brand { font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }
.hamburger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger:hover { background: #1b1e18; }
.hamburger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }
.shell.nav-open .hamburger span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.shell.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.shell.nav-open .hamburger span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}
.ghost, .primary, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #1b1e18;
  color: var(--fg);
  cursor: pointer;
}
.primary { background: var(--accent); color: #12140f; border-color: transparent; font-weight: 700; }
.danger { background: rgba(217, 137, 115, 0.14); color: var(--danger); border-color: rgba(217, 137, 115, 0.35); }
.ghost:disabled,
.primary:disabled,
.danger:disabled {
  color: #4d5048;
  background: #0e100c;
  border-color: #1a1c17;
  border-style: dashed;
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
  box-shadow: none;
}
.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: calc(100dvh - var(--top-h));
}
.nav-scrim {
  display: none;
}
.side {
  border-right: 1px solid var(--border);
  background: #10120e;
  padding: 1rem 0.75rem 1.5rem;
}
.side nav {
  display: grid;
  align-content: start;
  gap: 0.2rem;
}
.side a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  display: block;
}
.side a.active,
.side a:hover { background: #1b1e18; color: var(--fg); }
.nav-group { display: grid; gap: 0.15rem; }
.nav-label {
  padding: 0.95rem 0.75rem 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-sub a { padding-left: 1.35rem; }
.content {
  min-width: 0;
  background: var(--bg);
}
.main {
  max-width: var(--content-max);
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 1.6rem 1.4rem 2.5rem;
}
.profile {
  position: relative;
  flex-shrink: 0;
  z-index: 41;
}
.avatar {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgba(183, 196, 168, 0.45);
  background: #1f261c;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.avatar:hover,
.avatar[aria-expanded="true"] {
  border-color: var(--accent);
}
.avatar:focus-visible,
.hamburger:focus-visible,
.side a:focus-visible,
.profile-action:focus-visible,
.kebab-toggle:focus-visible,
.kebab-item:focus-visible,
.app-accessed-date:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: min(280px, calc(100vw - 1rem));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  z-index: 50;
}
.profile-email {
  padding: 0.55rem 0.75rem 0.7rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
  word-break: break-all;
}
.profile-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.profile-action {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
}
.profile-action:hover { background: #1b1e18; }
.hero {
  max-width: 28rem;
  margin: 12vh auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero-mark {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: block;
  margin: 0 auto 1.1rem;
}
h1 { font-family: Georgia, ui-serif, serif; font-weight: 400; margin: 0 0 0.6rem; }
h2 { margin: 0 0 0.8rem; font-size: 1.15rem; }
.cards { display: grid; gap: 1rem; min-width: 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}
.metrics { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; color: var(--muted); font-size: 0.92rem; }
.metrics b { color: var(--fg); }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.35rem;
}
.card-actions .primary,
.card-actions .danger {
  min-height: 40px;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--border); }
.pager { display: flex; gap: 0.6rem; align-items: center; margin-top: 1rem; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 60;
}
.modal .card { width: min(420px, 100%); }
.hidden { display: none !important; }

.boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #070806;
  color: var(--accent);
  overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.boot-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(183, 196, 168, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 196, 168, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: perspective(700px) rotateX(62deg) translateY(-8%);
  transform-origin: center 70%;
  mask-image: linear-gradient(to top, transparent 8%, #000 55%);
  animation: boot-grid 18s linear infinite;
}
.boot-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(to bottom, transparent, rgba(183, 196, 168, 0.09), transparent);
  animation: boot-scan 3.4s ease-in-out infinite;
  pointer-events: none;
}
.boot-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px);
}
.boot-frame {
  position: relative;
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.6rem 1.5rem 1.35rem;
  border: 1px solid rgba(183, 196, 168, 0.28);
  background: rgba(12, 14, 11, 0.82);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.45);
}
.boot-frame::before,
.boot-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
}
.boot-frame::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}
.boot-frame::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}
.boot-kicker {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.boot-hex {
  text-transform: none;
  color: var(--accent);
}
.boot-hex::after {
  content: "0x7A14";
  animation: boot-hex 1.6s steps(4) infinite;
}
.boot-headline {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: var(--fg);
}
.boot-sub {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.boot-bar {
  position: relative;
  height: 6px;
  margin-bottom: 1.15rem;
  border: 1px solid rgba(183, 196, 168, 0.28);
  background: #10120e;
  overflow: hidden;
}
.boot-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: boot-bar 1.35s ease-in-out infinite;
}
.boot-log {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
}
.boot-log > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0.28;
  animation: boot-line 4.8s ease-in-out infinite;
}
.boot-log > div:nth-child(2) { animation-delay: 0.7s; }
.boot-log > div:nth-child(3) { animation-delay: 1.4s; }
.boot-log > div:nth-child(4) { animation-delay: 2.1s; }
.boot-log dt { margin: 0; color: var(--muted); }
.boot-log dd { margin: 0; color: var(--accent); }
.boot-wait::after {
  content: "_";
  animation: boot-cursor 0.9s steps(1) infinite;
}
.boot-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.boot-cursor {
  color: var(--accent);
  animation: boot-cursor 0.9s steps(1) infinite;
}
@keyframes boot-grid {
  to { background-position: 28px 28px; }
}
@keyframes boot-scan {
  0% { transform: translateY(-120%); }
  100% { transform: translateY(280%); }
}
@keyframes boot-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@keyframes boot-line {
  0%, 100% { opacity: 0.28; }
  18%, 42% { opacity: 1; }
}
@keyframes boot-hex {
  0% { content: "0x7A14"; }
  25% { content: "0x9C22"; }
  50% { content: "0xB30E"; }
  75% { content: "0x4F91"; }
}
@keyframes boot-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.app-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1.1fr) auto minmax(0, 1.5fr) 2.35rem;
  align-items: center;
  gap: 0.55rem 0.9rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.7rem 0.65rem 0.7rem 1.05rem;
  min-width: 0;
}
.app-row-id,
.app-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.app-heading {
  margin: 0 0 0.8rem;
}
.app-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #1b1e18;
  flex-shrink: 0;
}
.app-icon-fallback {
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
}
.app-row-name {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-row-count {
  color: var(--fg);
  font-size: 0.92rem;
  white-space: nowrap;
}
.app-row-accessed {
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.app-accessed-full,
.app-accessed-date {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  color: var(--muted);
  font: inherit;
}
.app-accessed-date {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.kebab {
  position: relative;
  justify-self: end;
}
.kebab-toggle {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.kebab-toggle:hover,
.kebab-toggle[aria-expanded="true"] {
  background: #1b1e18;
  color: var(--fg);
}
.kebab-dots {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}
.kebab-dots span {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: currentColor;
}
.kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.35rem;
  z-index: 50;
}
.kebab-item {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.kebab-item:hover { background: #1b1e18; }
.kebab-danger { color: var(--danger); }
@media (min-width: 801px) {
  .app-accessed-date { display: none; }
}
@media (max-width: 800px) {
  .app-accessed-full { display: none; }
  .app-row {
    grid-template-columns: auto auto minmax(0, 1fr) 2.25rem;
    gap: 0.4rem 0.55rem;
    padding: 0.65rem 0.45rem 0.65rem 0.85rem;
  }
  .app-row-name {
    max-width: 6.5rem;
    font-size: 0.9rem;
  }
  .app-icon {
    width: 28px;
    height: 28px;
  }
  .app-row-count, .app-row-accessed { font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-grid, .boot-scan, .boot-bar span, .boot-log > div, .boot-hex::after, .boot-cursor, .boot-wait::after {
    animation: none;
  }
  .boot-log > div { opacity: 1; }
  .boot-bar span { width: 100%; transform: none; opacity: 0.55; }
}
@media (max-width: 800px) {
  .hamburger { display: block; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed;
    top: var(--top-h);
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    border-right: 1px solid var(--border);
    box-shadow: none;
  }
  .shell.nav-open .side {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: var(--top-h) 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .shell.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  body:has(.shell.nav-open) { overflow: hidden; }
}
@media (min-width: 801px) {
  .nav-scrim { display: none !important; }
  .side {
    position: static;
    transform: none;
    width: auto;
    box-shadow: none;
  }
}

.main-wide { max-width: 1120px; }
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.page-head h1 { margin-bottom: 0.2rem; }
.crumb { margin: 0 0 0.7rem; }
.section-title {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.05rem;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.95rem 1rem;
}
.kpi-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kpi-value {
  font-family: Georgia, ui-serif, serif;
  font-size: 1.7rem;
  margin-top: 0.25rem;
}
.kpi-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}
.chart-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1rem 0.85rem;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.chart-head h2 { margin: 0; }
.chart-controls { display: grid; gap: 0.65rem; margin: 0.85rem 0 0.4rem; }
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.pill {
  appearance: none;
  min-height: 32px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #12140f;
  color: var(--muted);
  cursor: pointer;
}
.pill.active, .pill:hover {
  color: var(--fg);
  border-color: rgba(183, 196, 168, 0.45);
  background: #1b1e18;
}
.pill.active {
  color: #12140f;
  background: var(--accent);
  border-color: transparent;
  font-weight: 650;
}
.date-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.date-field input {
  background: #12140f;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.28rem 0.45rem;
}
.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: rgba(183, 196, 168, 0.12); }
.chart-axis { stroke: rgba(183, 196, 168, 0.28); }
.chart-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { opacity: 0.16; }
.chart-tick { fill: var(--muted); font-size: 11px; }
.chart-rule { stroke: var(--accent); stroke-dasharray: 3 4; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  padding: 0.35rem 0.2rem 0.2rem;
}
.chart-key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.chart-key i {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  display: inline-block;
}
.chart-tooltip {
  position: absolute;
  min-width: 140px;
  background: #10120e;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: 0.82rem;
  z-index: 3;
}
.chart-tooltip strong { display: block; margin-bottom: 0.3rem; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
}
.search, .toolbar select {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
}
.search { flex: 1; min-width: 16rem; }
.user-email {
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
}
.user-email:hover { color: var(--accent); }
.user-id {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.12rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 0.45rem;
  margin: 0.1rem 0.2rem 0.1rem 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #12140f;
  color: var(--muted);
  font-size: 0.75rem;
}
.check-cell { width: 2.2rem; }
.check-cell input { width: 16px; height: 16px; accent-color: var(--accent); }
.table.compact th, .table.compact td { padding: 0.45rem 0.4rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.2rem;
}
.meter { display: grid; gap: 0.28rem; margin-bottom: 0.7rem; }
.meter-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
.meter-track {
  height: 8px;
  border-radius: 99px;
  background: #1b1e18;
  overflow: hidden;
}
.meter-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}
.selection-bar {
  position: sticky;
  bottom: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.2rem;
  padding: 0.7rem 0.9rem;
  background: #151712;
  border: 1px solid rgba(183, 196, 168, 0.35);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 5;
}
.app-stat .metrics { margin-top: 0.15rem; }
@media (max-width: 900px) {
  .kpi-grid, .insights-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .kpi-grid, .insights-grid { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
}
