/* Floating app navigation (Home · GSSCoop), shared by every page except index, login and apply.
   Self-contained colours so pages without app.css (verify, payment) can use it too. */
:root {
  --tb-h: 4.25rem;
  --tb-safe-b: env(safe-area-inset-bottom, 0px);
  --tb-bg: #FFFFFF;
  --tb-line: rgba(12, 34, 64, 0.06);
  --tb-shadow: 0 1px 2px rgba(12, 34, 64, 0.04), 0 8px 24px -12px rgba(12, 34, 64, 0.12);
  --tb-text: #64748B;
  --tb-pill: #E7EDF4;
  --tb-active: var(--color-sapphire, #0C2240);
}
html.dark {
  --tb-bg: #0E1626;
  --tb-line: rgba(255, 255, 255, 0.06);
  --tb-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 28px -16px rgba(0, 0, 0, 0.7);
  --tb-text: #7C8BA1;
  --tb-pill: #111C2E;
  --tb-active: var(--color-accent, #38BDF8);
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  max-width: 34rem;
  height: calc(var(--tb-h) + var(--tb-safe-b));
  padding: 0.375rem 0.5rem var(--tb-safe-b);
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--tb-bg) 86%, transparent);
  border-top: 1px solid var(--tb-line);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--tb-text);
  text-decoration: none;
  transition: color 150ms ease;
}
.tabbar__item .icon { width: 1.375rem; height: 1.375rem; }
.tabbar__item.is-active { color: var(--tb-active); }
.tabbar__item:focus-visible { outline: 2px solid var(--tb-active); outline-offset: 2px; }

/* Pages that were not built around the bar keep their content clear of it */
body.has-tabbar { padding-bottom: calc(var(--tb-h) + var(--tb-safe-b) + 1rem); }

@media (min-width: 960px) {
  .tabbar {
    bottom: 1rem;
    width: auto;
    min-width: 18rem;
    height: auto;
    padding: 0.375rem;
    border: 1px solid var(--tb-line);
    border-radius: 999px;
    box-shadow: var(--tb-shadow);
  }
  .tabbar__item { flex-direction: row; gap: 0.5rem; padding: 0.625rem 1rem; border-radius: 999px; font-size: 0.8125rem; }
  .tabbar__item.is-active { background: var(--tb-pill); }
}
