/* ==========================================================================
   VoiceNX mockup — app shell
   .app     : fills the screen; topbar / scrollable main / bottom tab bar
   .topbar  : logo, page title, actions
   .main    : scrollable content region; wrap page content in .page
   .tabbar  : five-item bottom navigation (Home · History · Analytics ·
              Products · Settings)
   ========================================================================== */

.app {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--tabbar-h);
  padding-top: var(--statusbar-h);
  background: var(--paper);
}

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding: 0 var(--page-x);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 250, .8);
  backdrop-filter: blur(8px);
}
.topbar__logo {
  display: flex;
  align-items: center;
  padding-right: var(--s-5);
  border-right: 1px solid var(--line);
  height: 40px;
}
.topbar__logo img { width: 118px; height: auto; }
.topbar__heading { flex: 1 1 auto; min-width: 0; }
.topbar__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.topbar__sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; }
.topbar__actions { display: flex; align-items: center; gap: var(--s-2); }
.topbar__actions .avatar { margin-left: var(--s-2); }

/* ---- Scrollable content ---- */
.main {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.page {
  padding: var(--s-8) var(--page-x) var(--s-12);
  max-width: 1100px;
  margin: 0 auto;
}

.section { margin-bottom: var(--s-10); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}

/* ---- Bottom tab bar ---- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  padding: 6px var(--s-16) 0;
  border-top: 1px solid var(--line);
  background: rgba(247, 248, 250, .9);
  backdrop-filter: blur(12px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-3);
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.tab svg {
  width: 24px; height: 24px;
  stroke: currentColor;
  transition: transform var(--t-base) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab:active svg { transform: scale(.92); }

.tab.is-active { color: var(--teal-deep); }
.tab.is-active svg { stroke-width: 2.1; }
.tab.is-active::before {
  content: "";
  position: absolute;
  top: -7px;
  width: 28px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--teal);
}

.tab__badge {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--plum);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--paper-2);
}

/* Real tablet: respect the home-indicator safe area */
@media (hover: none) and (pointer: coarse) and (min-width: 700px) {
  .tabbar { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
