/* CamTrust layout — mobile bottom tab bar, page hero band, main column, footer. Loaded after shell.css. */

/* ---------- Bottom tab bar (mobile) ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--ink-900);
  border-top: 1px solid var(--ink-700);
}

.tabbar__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 6px 4px;
  color: var(--on-dark-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
}
.tabbar__item-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar__item .icon { width: 22px; height: 22px; }
.tabbar__item.is-active { color: #fff; }
.tabbar__item.is-active .icon { color: var(--green-400); }
.tabbar__item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--green-400);
}
.tabbar__item.is-disabled { opacity: 0.45; }
.tabbar__item .nav-chip { display: none; }

body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }

/* ---------- Page hero band ---------- */

.page-hero {
  background-color: var(--ink-800);
  /* Ndop-inspired diamond lattice, kept very faint. */
  background-image:
    radial-gradient(ellipse at 85% -20%, rgba(43, 182, 115, 0.22), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1.5'%3E%3Cpath d='M24 2 46 24 24 46 2 24z'/%3E%3Cpath d='M24 14 34 24 24 34 14 24z'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--on-dark);
  padding: 28px 16px 64px;
}

.page-hero__inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: rgba(43, 182, 115, 0.15);
  color: var(--green-400);
  border: 1px solid rgba(43, 182, 115, 0.35);
}
.page-hero__icon .icon { width: 28px; height: 28px; }

.page-hero__eyebrow { margin: 0 0 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green-400); font-weight: 700; }
.page-hero__title { margin: 0; color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.page-hero__subtitle { margin: 8px 0 0; max-width: 680px; color: var(--on-dark-muted); font-size: 1rem; }

/* Content overlaps the band's bottom edge for depth. */
.page-hero + .app-main { margin-top: -44px; position: relative; }

/* ---------- Main + footer ---------- */

.app-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 32px; }

.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 24px 16px 32px;
}

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
  .topnav, .topnav__secondary { display: flex; }
  .account-menu { display: block; }
  .nav-toggle, .nav-panel, .nav-scrim, .tabbar { display: none !important; }
  body { padding-bottom: 0; }
  .page-hero { padding: 40px 24px 72px; }
  .app-main { padding: 24px 24px 40px; }
}

/* Mid-width: hide secondary text links' labels before the bar overflows. */
@media (min-width: 900px) and (max-width: 1180px) {
  .topnav__item.is-disabled .nav-chip { display: none; }
  .topnav__link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .account-menu__name { display: none; }
}
