<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->

# Repo Workflow

- After finishing a requested change, stage the relevant files, create a commit, and push it to the remote repository.

# Repository Boundary

- Work only in `D:\works\kscompany\official-mail` for this project.
- Do not read, edit, commit, push, or otherwise operate on `D:\works\kscompany\officialsite`.
- If a task appears to require `officialsite`, stop and ask for explicit confirmation instead of touching that repository.

# Local Dev Runbook

- Do not assume plain `npm run dev` is enough for local verification.
- For local browser testing, load environment variables from `.env.production` first, then override only these public URLs:
  - `NEXT_PUBLIC_APP_URL=http://127.0.0.1:3000`
  - `NEXT_PUBLIC_MAIL_APP_URL=http://127.0.0.1:3000`
- Start the app with `npm run dev -- --hostname 127.0.0.1 --port 3000`.
- Prefer `127.0.0.1` over `localhost` so local host/origin handling stays consistent with the app's auth and mail URL logic.
- This local run mode is a local Next.js server connected to the external services configured in `.env.production`; it is not a fully isolated mock environment.
- When the task is to verify login, mailbox access, or other real mail flows in the in-app browser, use the run mode above first instead of trying alternate ad hoc launch methods.
