# Palette theme sáng hiện tại (backup để khôi phục sau)

Ghi ngày: 2026-10-25. File này nằm NGOÀI project (T:\Xampp\htdocs\) nên không
bị mất khi khôi phục phiên bản lunasoft trước đó. Dùng để áp lại màu sau khi
restore: chỉ cần sửa `assets/css/app.css` (+ 3 chỗ nhỏ liệt kê ở mục 5).

---

## 1. Token theme SÁNG — sửa trong `html.light-theme { ... }` (app.css)

| Token | Mã | Vai trò |
|---|---|---|
| `--bg-color` | `#f8f2cf` | nền trang (vàng kem nhạt) |
| `--base-color` | `#fbf5df` | mặt thẻ / input / nút (kem sáng, không trắng) |
| `--shadow-light` | `#fffce0` | highlight neumorphic |
| `--shadow-dark` | `#cdb26b` | bóng chìm (nâu-vàng) |
| `--text-main` | `#3a3a20` | chữ chính (nâu ô-liu đậm) |
| `--text-muted` | `#6f6a44` | chữ phụ |
| `--cyan` | `#0d7a62` | **mint đậm** — màu nhấn chính |
| `--blue` | `#d9a520` | **gold** — màu nhấn phụ |
| `--text-color` | `#1d2018` | chữ ngoài thẻ |

## 2. Token theme TỐI (giữ nguyên, chỉ để đối chiếu) — `:root`

| Token | Mã |
|---|---|
| `--bg-color` | `#1a1a24` |
| `--base-color` | `#292d32` |
| `--shadow-light` | `#373c43` |
| `--shadow-dark` | `#1b1e21` |
| `--text-main` | `#f0f3f6` |
| `--text-muted` | `#9ba3af` |
| `--cyan` | `#00f3ff` |
| `--blue` | `#2b8cff` |
| `--text-color` | `#ffffff` |

## 3. Màu dẫn xuất của theme sáng (app.css)

| Chỗ | Giá trị |
|---|---|
| `html.light-theme body` background | `linear-gradient(162deg, #fff0ad 0%, #f8f3c8 38%, #c9efe0 100%), var(--bg-color)` |
| `body::before` quầng 1 (vàng) | `rgba(250, 204, 21, .22)` — tại `20% 16% / 48vw 48vw`, fade 74% |
| `body::before` quầng 2 (mint) | `rgba(16, 185, 129, .20)` — tại `82% 84% / 48vw 48vw`, fade 74% |
| `body::after` + `.card-inner::after` lưới | `rgba(70, 66, 40, .06)` (1px, cả 2 chiều) |
| `.toast` nền | `rgba(248, 241, 216, .96)` |
| `.route-link.forgot` | `rgba(29, 32, 24, .72)` |
| `.hint` | `rgba(29, 32, 24, .55)` |
| `.lang-switch button` | `rgba(29, 32, 24, .5)` |
| `.login-card::before` (hint thu gọn) | `rgba(29, 32, 24, .5)` |
| `.brand-main` gradient | `linear-gradient(to right, var(--cyan) 10%, var(--blue) 50%, var(--cyan) 60%)` |
| `.brand-subtitle` gradient | `linear-gradient(to right, var(--cyan) 10%, var(--blue) 50%, var(--cyan) 90%)` |
| `#login .canvas` | `radial-gradient(circle at 30% 30%, rgba(255, 251, 232, .8), rgba(255, 251, 232, .16))` |
| `.btn-signin` (CTA) | `linear-gradient(135deg, var(--cyan), #17b394)`, chữ `#04231d` |
| `keyframes curve-color-light` | `0% #8fa8bd` → `50% #fffbe8` → `100% #d2a52e` |
| `color-scheme` | `html { color-scheme: dark }`, `html.light-theme { color-scheme: light }` |
| Canvas mobile (≤768px) | `html { background-color: var(--bg-color) }` + `html.light-theme { background-image: <gradient mục 3 dòng 1> }` |
| Canvas Android (`html.is-android`) | `background-color: var(--bg-color)` + gradient (trừ `.app-home`) |
| Canvas iOS (`@supports (-webkit-touch-callout: none)`) | `background-color: var(--bg-color)` + gradient |

## 4. Glow/viền mint toàn project (đã thay hàng loạt)

Thay `rgba(0, 151, 185, X)` → **`rgba(15, 122, 99, X)`** (mint) ở 3 file CSS.
Số chỗ hiện tại:

| File | Số chỗ | Dải alpha dùng |
|---|---|---|
| `assets/css/app.css` | 31 | .1, .12, .14, .25, .28, .3, .35, .4, .45, .5, .55 |
| `assets/css/home.css` | 65 | .06, .10, .12, .14, .16, .22, .25, .3, .35, .4, .45, .5, .55, .6 |
| `assets/css/template.css` | 253 | .06, .08, .1, .12, .14, .2, .22, .25, .28, .3, .35, .4, .45, .5, .55, .6 |

Ring `.ring i` lấy màu từ token (ring.js đọc `--cyan`/`--blue`) → theme sáng =
mint/gold, theme tối = cyan/xanh dương.

## 5. theme-color (thanh hệ thống mobile)

| Ngữ cảnh | Sáng | Tối |
|---|---|---|
| Auth (login/forgot/error) | `#f8f2cf` | `#1a1a24` |
| Dashboard (home) | `#fbf5df` | `#292d32` |

Nguồn: inline script trong `index.html` (đặt sớm + watchdog `MutationObserver`)
và `themeColorValue()` trong `assets/js/app.js` (đọc token CSS, không hard-code).

## 6. Sau khi khôi phục bản cũ, cần áp lại

1. `assets/css/app.css`:
   - Thay block `html.light-theme { ... }` bằng token mục 1.
   - Thay `html.light-theme body`, `body::before`, `body::after`, `.brand-*`,
     `keyframes curve-color-light`, `#login .canvas`, `.toast`,
     `.route-link/.hint/.lang-switch/.login-card::before`, `.btn-signin`.
   - Thêm `color-scheme` (mục 3) + canvas mobile/Android/iOS (mục 3).
2. `assets/css/home.css` + `assets/css/template.css`: thay
   `rgba(0, 151, 185, X)` → `rgba(15, 122, 99, X)`.
3. `assets/css/home.css`: logo sidebar
   `html.light-theme .fan-logo .curve2, .curve4 { animation-name: curve-color-light }`.
4. `index.html`: inline `theme-color` + watchdog; `apple-mobile-web-app-*` metas;
   bump `?v=` cho app.css/home.css/template.css/ring.js/app.js.
5. `assets/js/app.js`: `themeColorValue()` đọc token; bump `?v`.
6. `assets/js/ring.js`: đọc màu từ token + MutationObserver; bump `?v`.
7. `sw.js`: bump `CACHE_SHELL`/`CACHE_ASSETS`.
