.app-shell {
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(16, 35, 31, 0.05), 0 0 60px rgba(16, 35, 31, 0.04);
}

.app-header {
  min-height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  border: 1.5px solid var(--line);
}

.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

.app-header h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

.app-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.auth-header span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.app-content {
  padding: 20px 18px calc(var(--nav-height) + 28px);
  min-height: calc(100vh - var(--header-height));
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 20;
  width: min(720px, 100%);
  min-height: var(--nav-height);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 68px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav-item:active { transform: scale(0.92); }
.nav-item svg { width: 26px; height: 26px; transition: color var(--transition); }
.nav-item span { font-size: 12px; font-weight: 700; line-height: 1; }

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-2);
}

.nav-primary {
  background: linear-gradient(145deg, var(--primary), #0b4f4a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
}
.nav-primary.active { background: linear-gradient(145deg, var(--primary-2), #093b37); color: #fff; }
.nav-primary:not(.active):hover { box-shadow: 0 6px 18px rgba(15, 118, 110, 0.5); }

.view { animation: fadeIn 180ms ease-out; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
