/* ===== App shell (mobile-first) ===== */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 520px) {
  .app-shell { min-height: calc(100vh - 32px); margin-top: 16px; margin-bottom: 16px; border-radius: 24px; overflow: hidden; }
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--color-line);
  position: sticky; top: 0; z-index: 20;
}
.app-header__brand { display: flex; align-items: center; gap: 8px; }
.app-header__logo {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.app-header__title { font-weight: 700; font-size: 16px; }
.app-header__logout { margin: 0; }
.app-header__logout-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--color-line);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.app-header__logout-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }

.app-main {
  flex: 1;
  padding: 18px 16px 110px;
  background: var(--color-bg);
}

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 480px; margin: 0 auto;
  background: #fff;
  border-top: 1px solid var(--color-line);
  display: flex; justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}
.bottom-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  font-size: 11px;
  min-width: 0;
}
.bottom-nav__item:hover { text-decoration: none; color: var(--color-primary); }
.bottom-nav__item.is-active { color: var(--color-primary); }
.bottom-nav__icon {
  font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
}
.bottom-nav__item.is-active .bottom-nav__icon { background: #FFE4F1; }
.bottom-nav__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }

/* ===== Tile grid (dashboards) ===== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  background: var(--color-panel-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: transform .1s ease, box-shadow .15s ease;
  min-height: 110px;
}
.tile:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--color-illu); }
.tile__emoji {
  width: 36px; height: 36px;
  background: #fff; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--color-primary);
  border: 1px solid var(--color-illu);
}
.tile__title { font-weight: 700; font-size: 15px; }
.tile__desc { font-size: 13px; color: var(--color-text-muted); }
