/* ==========================================================================
   ATLAS V3 — hệ giao diện duy nhất của Capstone AI (thay mosaic.css + app.css + theme-v2.css).
   Thông số: .webby/v3/a2-thong-so.md (+ sửa đổi trong b2-chot.md). Không trang nào tự viết CSS riêng.
   Mục lục: 1 Phông · 2 Biến · 3 Nền tảng · 4 Khung trang · 5 Nút · 6 Form · 7 Bề mặt · 8 Số liệu
            9 Bảng & danh sách · 10 Nhãn, chip, tab, phân trang · 11 Hành trình & trạng thái đợt
            12 Điểm AI · 13 Ngăn kéo, hộp thoại, thông báo · 14 Trạng thái rỗng, biểu đồ · 15 Tiện ích · 16 Chuyển động
   ========================================================================== */

/* 1. PHÔNG — tự lưu, không gọi CDN ------------------------------------------------ */
@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-vietnamese-400.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-vietnamese-500.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-vietnamese-600.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-vietnamese-700.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/be-vietnam-pro-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* 2. BIẾN — ATLAS V3.5 "Academic Portal" (.webby/v3/truong/g4-chot.md) ------------------ */
:root, [data-bs-theme="light"] {
  color-scheme: light;
  --at-canvas: #F2F5FB; --at-surface: #FFFFFF; --at-surface-2: #F5F8FE; --at-surface-hover: #EAF1FF;
  --at-ink: #212529; --at-ink-muted: #596579; --at-line: #DDE4EF; --at-line-strong: #747F93;
  --at-header: #142B4B; --at-sidebar: #17385B; --at-sidebar-active: #294E79; --at-active-indicator: #F5BA6E;
  --at-chrome-ink: #FFFFFF; --at-chrome-ink-muted: #C9D6EA;
  --at-brand: #2454B8; --at-brand-hover: #1D4496; --at-brand-pressed: #173879; --at-on-brand: #FFFFFF; --at-brand-soft: #EAF1FF;
  --at-ai: #176B60; --at-ai-soft: #E6F4F0;
  --at-success: #176B50; --at-success-soft: #E7F5ED; --at-warning: #925A31; --at-warning-soft: #FFF4E5;
  --at-danger: #B42332; --at-danger-hover: #931C29; --at-danger-soft: #FFF1F2; --at-on-danger: #FFFFFF;
  --at-info: #315D91; --at-info-soft: #EAF1FF;
  --at-chart-1: #2454B8; --at-chart-2: #176B50; --at-chart-3: #91603A; --at-chart-4: #77539C; --at-chart-5: #357A92; --at-chart-6: #777B43;
  --at-focus: #2454B8; --at-focus-ring: #2454B84D; --at-overlay: #0B1424A6; --at-shadow-color: 20, 43, 75;
}
[data-bs-theme="dark"] {
  color-scheme: dark;
  --at-canvas: #121D32; --at-surface: #1B2A45; --at-surface-2: #243653; --at-surface-hover: #30466B;
  --at-ink: #EAF1FF; --at-ink-muted: #CAD4E4; --at-line: #344564; --at-line-strong: #90A1B9;
  --at-header: #101C31; --at-sidebar: #15223A; --at-sidebar-active: #213C81; --at-active-indicator: #F5BA6E;
  --at-chrome-ink: #EAF1FF; --at-chrome-ink-muted: #B3C2DA;
  --at-brand: #B5D4FF; --at-brand-hover: #D2E4FF; --at-brand-pressed: #E3EEFF; --at-on-brand: #121D32; --at-brand-soft: #243B61;
  --at-ai: #84D0BD; --at-ai-soft: #233D3B;
  --at-success: #A6D2B8; --at-success-soft: #233D30; --at-warning: #F0C58A; --at-warning-soft: #493827;
  --at-danger: #F4A9A2; --at-danger-hover: #FFC6BF; --at-danger-soft: #4C2C2B; --at-on-danger: #121D32;
  --at-info: #A9C7ED; --at-info-soft: #243B61;
  --at-chart-1: #8AB4FF; --at-chart-2: #86CDAE; --at-chart-3: #E0AF80; --at-chart-4: #C4A5E0; --at-chart-5: #8DC8DB; --at-chart-6: #C4C987;
  --at-focus: #B5D4FF; --at-focus-ring: #B5D4FF59; --at-overlay: #000000B8; --at-shadow-color: 0, 0, 0;
}
:root {
  --at-font: "Be Vietnam Pro", Arial, sans-serif;
  --at-radius-xs: 3px; --at-radius-sm: 4px; --at-radius-ctl: 6px; --at-radius-md: 6px; --at-radius-lg: 10px; --at-radius-pill: 999px;
  --at-shadow-sm: 0 2px 8px rgba(var(--at-shadow-color), .08); --at-shadow-md: 0 12px 32px rgba(var(--at-shadow-color), .18);
  --at-fast: 120ms; --at-normal: 180ms; --at-overlay-t: 220ms; --at-ease: cubic-bezier(.2, .7, .2, 1);
  --at-topbar-h: 56px; --at-side-w: 216px; --at-gutter: 24px; --at-bottomnav-h: 64px; --at-ctl-h: 38px;
}
/* Nối sang biến Bootstrap để mọi thành phần Bootstrap còn sót cũng đúng bảng màu */
:root, [data-bs-theme="light"], [data-bs-theme="dark"] {
  --bs-body-font-family: var(--at-font); --bs-body-font-size: 14px; --bs-body-line-height: 1.643; --bs-body-font-weight: 400;
  --bs-body-bg: var(--at-canvas); --bs-body-color: var(--at-ink); --bs-emphasis-color: var(--at-ink);
  --bs-secondary-color: var(--at-ink-muted); --bs-tertiary-color: var(--at-ink-muted);
  --bs-secondary-bg: var(--at-surface-2); --bs-tertiary-bg: var(--at-surface-2);
  --bs-border-color: var(--at-line); --bs-border-color-translucent: var(--at-line); --bs-border-radius: var(--at-radius-ctl);
  --bs-primary: var(--at-brand); --bs-link-color: var(--at-brand); --bs-link-hover-color: var(--at-brand-hover); --bs-heading-color: var(--at-ink);
  --bs-success: var(--at-success); --bs-danger: var(--at-danger); --bs-warning: var(--at-warning); --bs-info: var(--at-info);
  --bs-focus-ring-color: var(--at-focus-ring); --bs-form-invalid-color: var(--at-danger); --bs-form-invalid-border-color: var(--at-danger);
  --bs-form-valid-color: var(--at-success); --bs-form-valid-border-color: var(--at-line-strong);
}
:root, [data-bs-theme="light"] { --bs-primary-rgb: 36, 84, 184; --bs-link-color-rgb: 36, 84, 184; --bs-link-hover-color-rgb: 29, 68, 150; }
[data-bs-theme="dark"] { --bs-primary-rgb: 181, 212, 255; --bs-link-color-rgb: 181, 212, 255; --bs-link-hover-color-rgb: 210, 228, 255; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--at-ink); --bs-table-border-color: var(--at-line); --bs-table-hover-bg: var(--at-surface-hover); --bs-table-hover-color: var(--at-ink); --bs-table-striped-bg: var(--at-surface-2); }
.progress { --bs-progress-bg: var(--at-surface-2); --bs-progress-bar-bg: var(--at-brand); --bs-progress-height: 7px; --bs-progress-border-radius: 3px; }
.nav-link { color: var(--at-ink-muted); } .nav-link:hover, .nav-link.active { color: var(--at-ink); }

/* 3. NỀN TẢNG — chữ gọn kiểu cổng học vụ ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--at-font); font-size: 14px; line-height: 23px; color: var(--at-ink); background: var(--at-canvas); overflow-wrap: break-word; }
h1, .h1 { font-size: 24px; line-height: 34px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h2, .h2 { font-size: 18px; line-height: 28px; font-weight: 600; margin: 0; }
h3, .h3 { font-size: 16px; line-height: 25px; font-weight: 600; margin: 0; }
h4, .h4 { font-size: 14px; line-height: 22px; font-weight: 600; margin: 0; }
p { margin: 0 0 12px; } p:last-child { margin-bottom: 0; }
small, .small { font-size: 13px; line-height: 21px; }
a { color: var(--at-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--at-brand-hover); }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--at-line); opacity: 1; margin: 16px 0; }
code { font-family: var(--at-font); font-size: 13px; font-weight: 600; color: var(--at-ink); background: var(--at-surface-2); padding: 2px 6px; border-radius: var(--at-radius-xs); }
:focus-visible { outline: 2px solid var(--at-focus); outline-offset: 2px; }
::selection { background: var(--at-brand-soft); color: var(--at-ink); }
.text-muted, .at-muted { color: var(--at-ink-muted) !important; }
.at-label { font-size: 12px; line-height: 19px; font-weight: 600; color: var(--at-ink-muted); }
.at-secondary { font-size: 13px; line-height: 21px; color: var(--at-ink-muted); }
.at-num { font-variant-numeric: tabular-nums; }
.at-icon { display: inline-block; flex: none; width: var(--s, 18px); height: var(--s, 18px); background: currentColor; vertical-align: -3px;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
@media (max-width: 767.98px) { h1, .h1 { font-size: 22px; line-height: 32px; } }

/* 4. KHUNG TRANG: menu trái navy 216 suốt chiều cao · thanh trên navy 56 bên phải · nội dung · thanh đáy điện thoại */
.at-skip { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--at-surface); color: var(--at-ink); padding: 10px 14px; border: 1px solid var(--at-line-strong); border-radius: var(--at-radius-ctl); }
.at-skip:focus { top: 12px; }
.at-brand { display: flex; align-items: center; gap: 10px; color: var(--at-ink); text-decoration: none; font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.at-brand:hover { color: inherit; }
.at-brand img { width: 32px; height: 32px; }
.at-logo--dark, .at-illus--dark { display: none; }
[data-bs-theme="dark"] .at-logo--light, [data-bs-theme="dark"] .at-illus--light { display: none; }
[data-bs-theme="dark"] .at-logo--dark, [data-bs-theme="dark"] .at-illus--dark { display: inline-block; }
/* Trên nền navy luôn dùng logo nét sáng */
.at-sidebar .at-logo--light, .at-topbar .at-logo--light, .at-auth-brand .at-logo--light { display: none; }
.at-sidebar .at-logo--dark, .at-topbar .at-logo--dark, .at-auth-brand .at-logo--dark { display: inline-block; }

.at-sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 1035; width: var(--at-side-w); display: flex; flex-direction: column; background: var(--at-sidebar); color: var(--at-chrome-ink); }
.at-sidebar > .at-brand { flex: none; height: 64px; padding: 0 16px; gap: 10px; font-size: 18px; color: var(--at-chrome-ink); background: var(--at-header); border-bottom: 1px solid #FFFFFF1A; }
.at-sidebar nav { flex: 1 1 auto; overflow-y: auto; padding: 12px 0; display: flex; flex-direction: column; gap: 2px; }
.at-side-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px 0 17px; color: var(--at-chrome-ink-muted); text-decoration: none; font-size: 13px; line-height: 20px; font-weight: 500;
  transition: background-color var(--at-fast) var(--at-ease), color var(--at-fast) var(--at-ease); }
.at-side-link .at-icon { --s: 18px; }
.at-side-link:hover { color: var(--at-chrome-ink); background: #FFFFFF14; }
.at-side-link.active { color: var(--at-chrome-ink); background: var(--at-sidebar-active); font-weight: 600; }
.at-side-link.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--at-active-indicator); }
.at-side-link:focus-visible { outline: 2px solid var(--at-active-indicator); outline-offset: -2px; }
.at-side-foot { flex: none; padding: 12px 16px; font-size: 12px; line-height: 18px; color: var(--at-chrome-ink-muted); border-top: 1px solid #FFFFFF1A; }

.at-topbar { position: sticky; top: 0; z-index: 1030; height: var(--at-topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--at-header); color: var(--at-chrome-ink); }
.at-topbar .at-brand { display: none; color: var(--at-chrome-ink); }
.at-topbar-context { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.at-topbar-context strong { font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-topbar-context span { font-size: 12px; line-height: 18px; color: var(--at-chrome-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.at-topbar .btn-chrome { min-height: 38px; color: var(--at-chrome-ink); background: transparent; border: 1px solid #FFFFFF40; }
.at-topbar .btn-chrome:hover { background: #FFFFFF1A; color: var(--at-chrome-ink); }
.at-account { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px 4px 4px; background: #FFFFFF14; border: 1px solid transparent; border-radius: var(--at-radius-pill); color: var(--at-chrome-ink); text-align: left; }
.at-account:hover, .at-account[aria-expanded="true"] { background: #FFFFFF26; }
.at-account-name { font-size: 13px; line-height: 19px; font-weight: 600; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-account-role { font-size: 12px; line-height: 17px; color: var(--at-chrome-ink-muted); }
.at-avatar { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--at-brand-soft); color: var(--at-brand); font-size: 12px; font-weight: 600; }
.at-topbar .at-avatar { background: #FFFFFF; color: var(--at-header); }
.at-avatar--lg { width: 48px; height: 48px; font-size: 17px; }

.at-main { margin-left: var(--at-side-w); min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; }
.at-main--plain { margin-left: 0; }
.at-canvas { width: 100%; max-width: 1600px; margin: 0 auto; padding: 20px var(--at-gutter) 32px; flex: 1 0 auto; }
.at-canvas--read { max-width: calc(960px + 2 * var(--at-gutter)); }
.at-canvas--narrow { max-width: calc(560px + 2 * var(--at-gutter)); }
.at-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; min-height: 40px; align-items: center; padding: 8px var(--at-gutter); border-top: 1px solid var(--at-line); font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.at-stack { display: flex; flex-direction: column; gap: 16px; }
.at-stack--tight { gap: 12px; }

.at-page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.at-page-header > div:first-child { min-width: 0; flex: 1 1 420px; }
.at-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 4px; font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.at-breadcrumb a { color: var(--at-ink-muted); text-decoration: none; } .at-breadcrumb a:hover { color: var(--at-brand); text-decoration: underline; }
.at-breadcrumb > * + *::before { content: "›"; margin-right: 8px; color: var(--at-line-strong); font-size: 14px; }
.at-page-desc { margin-top: 2px; max-width: 760px; font-size: 13px; line-height: 21px; color: var(--at-ink-muted); }
.at-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.at-bottomnav { display: none; }
.at-topbar .at-menu-btn { display: none; }
@media (max-width: 1199.98px) { :root { --at-gutter: 20px; } }
@media (min-width: 992px) and (max-width: 1199.98px) {   /* menu trái thu gọn 60px: chỉ icon, tên hiện khi rê chuột (title) */
  :root { --at-side-w: 60px; }
  .at-sidebar > .at-brand { padding: 0; justify-content: center; } .at-sidebar > .at-brand span, .at-side-foot { display: none; }
  .at-side-link { justify-content: center; padding: 0; } .at-side-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 991.98px) {   /* 768–991: bỏ menu trái, mở menu bằng nút ở thanh trên */
  .at-sidebar { display: none; } .at-main { margin-left: 0; }
  .at-topbar .at-brand { display: flex; } .at-topbar .at-menu-btn { display: inline-flex; }
}
@media (max-width: 767.98px) {   /* điện thoại: thanh trên 56 + thanh đáy 64 */
  :root { --at-gutter: 16px; --at-ctl-h: 44px; }
  .at-topbar-context, .at-account-meta, .at-topbar .at-menu-btn { display: none; }
  .at-topbar .at-brand img { width: 28px; height: 28px; } .at-topbar .at-brand { font-size: 16px; }
  .at-canvas { padding: 16px var(--at-gutter) 24px; }
  .at-main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body:has(.at-actionbar) .at-bottomnav { display: none; }
  .at-page-actions { width: 100%; } .at-page-actions .btn { flex: 1 1 auto; }
  .at-breadcrumb > :not(:nth-last-child(2)) { display: none; } .at-breadcrumb > *::before { content: "‹" !important; margin-right: 6px; }
  .at-bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; height: calc(var(--at-bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--at-surface); border-top: 1px solid var(--at-line); }
  .at-bottomnav a, .at-bottomnav button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px; background: none; border: 0; color: var(--at-ink-muted); text-decoration: none; font-size: 12px; line-height: 16px; font-weight: 600; }
  .at-bottomnav .active { color: var(--at-brand); box-shadow: inset 0 2px 0 var(--at-brand); }
  .at-footer { flex-direction: column; align-items: flex-start; }
}

/* Trang không khung (đăng nhập) */
.at-auth { min-height: 100dvh; display: grid; grid-template-columns: 5fr 7fr; background: var(--at-surface); }
.at-auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px; background: var(--at-header); color: #FFFFFF; }
.at-auth-brand .at-brand { color: #FFFFFF; font-size: 24px; line-height: 32px; } .at-auth-brand .at-brand img { width: 48px; height: 48px; }
.at-auth-brand h1 { color: #FFFFFF; font-size: 30px; line-height: 42px; max-width: 460px; } .at-auth-brand p { color: #C9D6EA; max-width: 440px; }
.at-auth-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; color: #E6EEFA; }
.at-auth-points li { display: flex; gap: 10px; align-items: flex-start; } .at-auth-points .at-icon { color: var(--at-active-indicator); }
.at-auth-brand .at-auth-foot { font-size: 12px; line-height: 19px; color: #C9D6EA; }
.at-auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; }
.at-auth-form > div { width: 100%; max-width: 400px; margin: 0 auto; }
.at-auth-mobile-brand { display: none; }
@media (max-width: 991.98px) { .at-auth { grid-template-columns: 1fr; } .at-auth-brand { display: none; } .at-auth-form { justify-content: flex-start; padding: 32px 24px; } .at-auth-form > div { max-width: 440px; } .at-auth-mobile-brand { display: flex; margin-bottom: 32px; font-size: 21px; } .at-auth-mobile-brand img { width: 40px; height: 40px; } }

/* 5. NÚT ------------------------------------------------------------------------ */
.btn { --bs-btn-font-family: var(--at-font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--at-ctl-h); min-width: 80px; padding: 0 14px; font-size: 14px; line-height: 20px; font-weight: 600; border: 1px solid transparent; border-radius: var(--at-radius-ctl); white-space: nowrap; text-decoration: none; box-shadow: none !important;
  transition: background-color var(--at-fast) var(--at-ease), border-color var(--at-fast) var(--at-ease), color var(--at-fast) var(--at-ease); }
.btn-sm { min-height: 36px; min-width: 72px; padding: 0 12px; gap: 6px; font-size: 13px; }
.btn .at-icon { --s: 18px; } .btn-sm .at-icon { --s: 16px; }
.btn-icon { min-width: var(--at-ctl-h); width: var(--at-ctl-h); padding: 0; } .btn-icon.btn-sm { min-width: 36px; width: 36px; }
.btn:focus-visible { outline: 2px solid var(--at-focus); outline-offset: 2px; }
.btn-primary { background: var(--at-brand); border-color: var(--at-brand); color: var(--at-on-brand); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--at-brand-hover); border-color: var(--at-brand-hover); color: var(--at-on-brand); }
.btn-primary:active, .btn-primary.active { background: var(--at-brand-pressed) !important; border-color: var(--at-brand-pressed) !important; color: var(--at-on-brand) !important; }
.btn-secondary, .btn-outline-secondary, .btn-outline-primary, .btn-light { background: var(--at-surface); border-color: var(--at-line-strong); color: var(--at-ink); }
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover, .btn-light:hover, .btn-secondary:focus-visible { background: var(--at-surface-hover); border-color: var(--at-line-strong); color: var(--at-ink); }
.btn-secondary:active, .btn-outline-secondary:active, .btn-outline-primary:active { background: var(--at-surface-2) !important; border-color: var(--at-line-strong) !important; color: var(--at-ink) !important; }
.btn-danger { background: var(--at-danger); border-color: var(--at-danger); color: var(--at-on-danger); }
.btn-danger:hover, .btn-danger:focus-visible { background: var(--at-danger-hover); border-color: var(--at-danger-hover); color: var(--at-on-danger); }
.btn-outline-danger { background: var(--at-surface); border-color: var(--at-line-strong); color: var(--at-danger); }
.btn-outline-danger:hover { background: var(--at-danger-soft); border-color: var(--at-danger); color: var(--at-danger); }
.btn-text, .btn-link { min-width: 0; background: transparent; border-color: transparent; color: var(--at-brand); text-decoration: none; }
.btn-text:hover, .btn-link:hover { background: var(--at-brand-soft); color: var(--at-brand); }
.btn:disabled, .btn.disabled, fieldset:disabled .btn { background: var(--at-surface-2); border-color: var(--at-line); color: var(--at-ink-muted); opacity: 1; cursor: not-allowed; pointer-events: auto; }
.btn[aria-busy="true"] { cursor: progress; }
.at-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: at-spin .7s linear infinite; }
@keyframes at-spin { to { transform: rotate(360deg); } }

/* 6. FORM ----------------------------------------------------------------------- */
.form-label, label.at-field-label { display: block; margin-bottom: 6px; font-size: 13px; line-height: 21px; font-weight: 600; color: var(--at-ink); }
.form-control, .form-select { min-height: var(--at-ctl-h); padding: 0 12px; font-family: var(--at-font); font-size: 14px; line-height: 22px; color: var(--at-ink); background-color: var(--at-surface); border: 1px solid var(--at-line-strong); border-radius: var(--at-radius-ctl); box-shadow: none;
  transition: border-color var(--at-fast) var(--at-ease), box-shadow var(--at-fast) var(--at-ease); }
.form-control-sm, .form-select-sm { min-height: 36px; font-size: 13px; }
textarea.form-control { min-height: 112px; padding: 12px; line-height: 23px; }
.form-control::placeholder { color: var(--at-ink-muted); opacity: 1; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--at-focus); box-shadow: 0 0 0 3px var(--at-focus-ring); outline: 0; background-color: var(--at-surface); color: var(--at-ink); }
.form-control:disabled, .form-select:disabled { background-color: var(--at-surface-2); color: var(--at-ink-muted); border-color: var(--at-line); }
.form-control[readonly] { background-color: var(--at-surface-2); }
.form-select { padding-right: 36px; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626D65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
[data-bs-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8B4AB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e"); }
.form-text, .at-help { margin-top: 6px; font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.invalid-feedback, .at-error { display: block; margin-top: 6px; font-size: 12px; line-height: 19px; color: var(--at-danger); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--at-danger); background-image: none; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px var(--at-focus-ring); }
.form-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; margin: 0; }
.form-check-input { flex: none; float: none; width: 18px; height: 18px; margin: 0; background-color: var(--at-surface); border: 1px solid var(--at-line-strong); }
.form-check-input:checked { background-color: var(--at-brand); border-color: var(--at-brand); }
[data-bs-theme="dark"] .form-check-input:checked { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23151B19' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
.form-check-label { font-size: 14px; line-height: 22px; color: var(--at-ink); }
.at-field { margin-bottom: 16px; } .at-field:last-child { margin-bottom: 0; }
.at-required::after { content: " (bắt buộc)"; font-weight: 400; color: var(--at-ink-muted); }
.at-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--at-line); }
.at-input-icon { position: relative; } .at-input-icon > .at-icon { position: absolute; left: 12px; top: calc(var(--at-ctl-h) / 2 - 9px); color: var(--at-ink-muted); pointer-events: none; } .at-input-icon > .form-control { padding-left: 38px; }
.at-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.at-check-grid ul, .at-check-grid > div { display: contents; list-style: none; margin: 0; padding: 0; }
.at-check-grid label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.at-check-grid input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--at-brand); flex: none; }
.at-repeat-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px 44px; gap: 12px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--at-line); }
.at-repeat-row--wide { grid-template-columns: minmax(0, 1fr) 180px 110px 130px 44px; }
@media (max-width: 767.98px) { .at-form-actions .btn { flex: 1 1 auto; } .at-repeat-row, .at-repeat-row--wide { grid-template-columns: 1fr 1fr; } .at-repeat-row > :first-child { grid-column: 1 / -1; } }

/* 7. BỀ MẶT — khối trắng viền 1px, đầu đề thanh 42px, không bóng, không lồng quá một cấp -- */
.at-panel { background: var(--at-surface); border: 1px solid var(--at-line); border-radius: var(--at-radius-md); padding: 16px; min-width: 0; }
.at-panel--flush { padding: 0; overflow: hidden; }
/* Đầu đề khối kiểu cổng học vụ: thanh 42px nền phụ, vạch xanh trái */
.at-panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.at-panel > .at-panel-header { min-height: 42px; margin: -16px -16px 16px; padding: 8px 16px; background: var(--at-surface-2); border-bottom: 1px solid var(--at-line); border-radius: var(--at-radius-md) var(--at-radius-md) 0 0; }
.at-panel-header h2, .at-panel-header .h2, .at-panel-header h3, .at-panel-header .h3 { font-size: 15px; line-height: 24px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.at-panel-header h2::before, .at-panel-header h3::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--at-brand); }
.at-panel--flush > .at-panel-header { margin: 0 0 16px; }
.at-panel--flush > .at-panel-body { padding: 0 16px 16px; }
.at-panel-header p { margin: 0; font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.at-item { display: block; background: var(--at-surface); border: 1px solid var(--at-line); border-radius: var(--at-radius-md); padding: 16px; min-width: 0; color: inherit; text-decoration: none; }
a.at-item { transition: border-color var(--at-fast) var(--at-ease); } a.at-item:hover { border-color: var(--at-line-strong); color: inherit; }
.at-inset { background: var(--at-surface-2); border-radius: var(--at-radius-ctl); padding: 16px; }
.at-section-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 16px; }
.at-divider { border-top: 1px solid var(--at-line); margin: 20px 0; }
.at-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.at-col-8 { grid-column: span 8; } .at-col-7 { grid-column: span 7; } .at-col-6 { grid-column: span 6; } .at-col-5 { grid-column: span 5; } .at-col-4 { grid-column: span 4; } .at-col-12 { grid-column: 1 / -1; }
.at-list { display: grid; gap: 12px; }
.at-kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; line-height: 21px; }
.at-kv dt { font-weight: 400; color: var(--at-ink-muted); } .at-kv dd { margin: 0; font-weight: 500; }
.at-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; line-height: 21px; color: var(--at-ink-muted); }
.at-meta strong { color: var(--at-ink); font-weight: 600; }
.at-title-link { color: var(--at-ink); text-decoration: none; font-weight: 600; } .at-title-link:hover { color: var(--at-brand); text-decoration: underline; }
@media (max-width: 1199.98px) { .at-grid { gap: 20px; } }
@media (max-width: 991.98px) { .at-grid > * { grid-column: 1 / -1; } }


/* 8. SỐ LIỆU — Metric Ledger: một dải phẳng, vạch chia dọc, không thẻ, không icon ------ */
.at-ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--at-surface); border: 1px solid var(--at-line); border-radius: var(--at-radius-md); overflow: hidden; }
.at-ledger-item { padding: 14px 18px; border-right: 1px solid var(--at-line); margin-right: -1px; border-bottom: 1px solid var(--at-line); margin-bottom: -1px; min-width: 0; }
.at-ledger-label { font-size: 12px; line-height: 19px; font-weight: 600; color: var(--at-ink-muted); }
.at-ledger-value { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; color: var(--at-ink); }
.at-ledger-value small { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--at-ink-muted); letter-spacing: 0; }
.at-ledger-note { font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.at-ledger-item--warn .at-ledger-value { color: var(--at-warning); } .at-ledger-item--ai .at-ledger-value { color: var(--at-ai); }
@media (max-width: 767.98px) { .at-ledger { grid-template-columns: 1fr 1fr; } .at-ledger-item { padding: 16px; } .at-ledger-value { font-size: 30px; line-height: 38px; } }

/* 9. BẢNG (≥768: <table class="at-table d-none d-md-table">) · DANH SÁCH THẺ (<768: <div class="at-list d-md-none">) --- */
.at-table-wrap { overflow-x: auto; }
.at-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 21px; }
.at-table th { height: 40px; padding: 8px 12px; font-size: 12px; line-height: 19px; font-weight: 600; color: var(--at-ink); text-align: left; white-space: nowrap; background: var(--at-surface-2); border-bottom: 1px solid var(--at-line-strong); }
.at-table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; } .at-table th a:hover, .at-table th a.active { color: var(--at-ink); }
.at-table td { height: 44px; padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--at-line); }
.at-table tbody tr:last-child td { border-bottom: 0; }
.at-table tbody tr { transition: background-color var(--at-fast) var(--at-ease); } .at-table tbody tr:hover { background: var(--at-surface-hover); }
.at-table tr.is-selected { background: var(--at-brand-soft); box-shadow: inset 3px 0 0 var(--at-brand); }
.at-table .at-td-num, .at-table .at-th-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-table .at-td-actions { text-align: right; white-space: nowrap; } .at-td-actions > * + * { margin-left: 6px; }
.at-table .at-td-main { font-weight: 600; min-width: 180px; } .at-td-main small { display: block; font-weight: 400; color: var(--at-ink-muted); }
.at-table .at-td-empty { height: auto; padding: 0; }
/* 10. NHÃN TRẠNG THÁI · CHIP LỌC · TAB · THANH CÔNG CỤ · PHÂN TRANG ---------------------- */
.at-badge, .badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 8px; font-family: var(--at-font); font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; border: 1px solid var(--at-line); border-radius: var(--at-radius-sm); background: var(--at-surface-2); color: var(--at-ink); vertical-align: middle; }
.at-badge .at-icon { --s: 14px; }
.at-badge--success { background: var(--at-success-soft); color: var(--at-success); border-color: transparent; }
.at-badge--warning { background: var(--at-warning-soft); color: var(--at-warning); border-color: transparent; }
.at-badge--danger { background: var(--at-danger-soft); color: var(--at-danger); border-color: transparent; }
.at-badge--info { background: var(--at-info-soft); color: var(--at-info); border-color: transparent; }
.at-badge--ai { background: var(--at-ai-soft); color: var(--at-ai); border-color: transparent; }
.at-rank { display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--at-line-strong); border-radius: var(--at-radius-sm); color: var(--at-ink); background: var(--at-surface); }
.at-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.at-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--at-ink); background: var(--at-surface); border: 1px solid var(--at-line-strong); border-radius: var(--at-radius-pill); text-decoration: none; white-space: nowrap; transition: background-color var(--at-fast) var(--at-ease); }
.at-chip:hover { background: var(--at-surface-hover); color: var(--at-ink); }
.at-chip.active { background: var(--at-brand); border-color: var(--at-brand); color: var(--at-on-brand); }
.at-chip-count { font-variant-numeric: tabular-nums; font-weight: 600; opacity: .85; }
.at-tag { display: inline-block; padding: 1px 8px; font-size: 12px; line-height: 20px; font-weight: 500; color: var(--at-ink-muted); background: var(--at-surface-2); border-radius: var(--at-radius-xs); }
.at-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--at-line); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.at-tab { flex: none; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 13px; font-weight: 600; color: var(--at-ink-muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.at-tab:hover { color: var(--at-ink); } .at-tab.active { color: var(--at-ink); border-bottom-color: var(--at-brand); }
.at-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.at-toolbar .at-search { flex: 1 1 280px; max-width: 360px; } .at-toolbar .at-filter { flex: 0 1 200px; min-width: 160px; }
.at-toolbar-end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.at-count { font-size: 13px; line-height: 21px; color: var(--at-ink-muted); }
.at-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 24px; border-top: 1px solid var(--at-line); font-size: 13px; color: var(--at-ink-muted); }
.at-pagination nav { display: flex; align-items: center; gap: 4px; }
.at-page { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--at-ink); background: transparent; border: 1px solid transparent; border-radius: var(--at-radius-sm); text-decoration: none; }
a.at-page:hover { background: var(--at-surface-hover); color: var(--at-ink); }
.at-page.active { background: var(--at-brand); color: var(--at-on-brand); }
.at-page.disabled { color: var(--at-ink-muted); cursor: not-allowed; }
.at-page--gap { min-width: 20px; padding: 0; color: var(--at-ink-muted); }
.at-pagination .at-page-mobile { display: none; }
.pagination { gap: 4px; margin: 0; } .page-link { min-width: 36px; height: 36px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--at-ink); background: transparent; border: 0; border-radius: var(--at-radius-sm) !important; }
.page-link:hover { background: var(--at-surface-hover); color: var(--at-ink); } .page-item.active .page-link { background: var(--at-brand); color: var(--at-on-brand); } .page-item.disabled .page-link { background: transparent; color: var(--at-ink-muted); }
@media (max-width: 767.98px) {
  .at-toolbar .at-search { max-width: none; flex-basis: 100%; } .at-toolbar .at-filter { flex: 1 1 140px; } .at-toolbar-end { margin-left: 0; width: 100%; }
  .at-pagination { padding: 16px; } .at-pagination .at-page-num, .at-pagination .at-page--gap, .at-pagination .at-per-page { display: none; } .at-pagination .at-page-mobile { display: inline; } .at-page { height: 40px; }
  .at-pagination nav { width: 100%; justify-content: space-between; }
}

/* 11. HÀNH TRÌNH SINH VIÊN · DẢI TRẠNG THÁI ĐỢT -------------------------------------- */
.at-journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.at-journey-step { position: relative; display: block; padding-top: 36px; color: var(--at-ink); text-decoration: none; }
.at-journey-step::before { content: ""; position: absolute; top: 12px; left: 30px; right: -24px; border-top: 1px solid var(--at-line-strong); }
li:last-child > .at-journey-step::before { content: none; }
.at-journey-mark { position: absolute; top: 0; left: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--at-line-strong); background: var(--at-surface); color: var(--at-ink-muted); }
.at-journey-mark .at-icon { --s: 14px; }
.at-journey-label { display: block; font-size: 13px; line-height: 21px; font-weight: 600; }
.at-journey-note { display: block; font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.at-journey-step[data-state="done"] .at-journey-mark { background: var(--at-brand); border-color: var(--at-brand); color: var(--at-on-brand); }
.at-journey-step[data-state="current"] .at-journey-mark { border-color: var(--at-brand); color: var(--at-brand); }
.at-journey-step[data-state="current"] .at-journey-note { color: var(--at-brand); font-weight: 600; }
.at-journey-step[data-state="missed"] .at-journey-mark { border-color: var(--at-warning); color: var(--at-warning); }
.at-journey-step[data-state="missed"] .at-journey-note { color: var(--at-warning); }
a.at-journey-step:hover .at-journey-label { color: var(--at-brand); text-decoration: underline; }
.at-steps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.at-steps li { display: flex; align-items: center; gap: 8px; color: var(--at-ink-muted); } .at-steps li[data-state="done"], .at-steps li[data-state="current"] { color: var(--at-ink); font-weight: 600; }
.at-steps li[data-state="done"] .at-icon { color: var(--at-success); } .at-steps li[data-state="current"] .at-icon { color: var(--at-brand); }
@media (max-width: 767.98px) {
  .at-journey { grid-template-columns: 1fr; gap: 0; }
  .at-journey-step { padding: 0 0 16px 40px; min-height: 44px; } .at-journey-step::before { top: 26px; bottom: 0; left: 12px; right: auto; border-top: 0; border-left: 1px solid var(--at-line-strong); }
}

/* 12. ĐIỂM AI — điểm tổng bằng chữ số lớn + dải chứng cứ M1–M5 + ghi chú giải thích ------ */
.at-score { display: inline-flex; flex-direction: column; min-width: 96px; }
.at-score-value { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; color: var(--at-ai); }
.at-score-value small { font-size: 14px; line-height: 22px; font-weight: 400; letter-spacing: 0; color: var(--at-ink-muted); }
.at-score-label { font-size: 13px; line-height: 21px; color: var(--at-ink-muted); }
.at-score--md .at-score-value { font-size: 28px; line-height: 36px; } .at-score--sm .at-score-value { font-size: 19px; line-height: 28px; } .at-score--sm { min-width: 0; }
.at-score--none .at-score-value { font-size: 14px; line-height: 22px; font-weight: 500; letter-spacing: 0; color: var(--at-ink-muted); }
.at-evidence { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.at-evidence li { display: grid; grid-template-columns: 30px minmax(110px, max-content) minmax(60px, 1fr) auto; align-items: center; gap: 8px 12px; font-size: 13px; line-height: 21px; }
.at-evidence-code { font-weight: 600; color: var(--at-ink-muted); } .at-evidence-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.at-evidence-value--none { font-weight: 400; color: var(--at-ink-muted); }
.at-evidence-weight { font-weight: 400; color: var(--at-ink-muted); }
.at-track { display: block; height: 7px; background: var(--at-surface-2); border-radius: var(--at-radius-xs); overflow: hidden; }
.at-track > span { display: block; height: 100%; width: var(--v, 0%); background: var(--at-brand); border-radius: var(--at-radius-xs); }
.at-track--ai > span { background: var(--at-ai); } .at-track--warn > span { background: var(--at-warning); }
.at-note { display: flex; gap: 12px; padding: 20px; background: var(--at-ai-soft); border-left: 3px solid var(--at-ai); border-radius: var(--at-radius-ctl); font-size: 13px; line-height: 21px; }
.at-note > .at-icon { color: var(--at-ai); margin-top: 2px; } .at-note > div { min-width: 0; }
.at-note-title { font-size: 14px; line-height: 22px; font-weight: 600; margin-bottom: 4px; }
.at-note ul { margin: 0; padding-left: 18px; } .at-note li + li { margin-top: 4px; }
.at-note--warning { background: var(--at-warning-soft); border-left-color: var(--at-warning); } .at-note--warning > .at-icon { color: var(--at-warning); }
.at-note--danger { background: var(--at-danger-soft); border-left-color: var(--at-danger); } .at-note--danger > .at-icon { color: var(--at-danger); }
.at-note--success { background: var(--at-success-soft); border-left-color: var(--at-success); } .at-note--success > .at-icon { color: var(--at-success); }
.at-note--neutral { background: var(--at-surface-2); border-left-color: var(--at-line-strong); } .at-note--neutral > .at-icon { color: var(--at-ink-muted); }
.at-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.at-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.at-topic { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: start; }
.at-topic-title { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--at-ink); text-decoration: none; } a.at-topic-title:hover { color: var(--at-brand); text-decoration: underline; }
.at-topic-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
.at-topic-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--at-line); }
@media (max-width: 767.98px) {
  .at-score-value { font-size: 40px; line-height: 48px; } .at-note { padding: 16px; }
  .at-evidence { gap: 14px; } .at-evidence li { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 10px; } .at-evidence li .at-track { grid-column: 1 / -1; grid-row: 2; }
  .at-topic { grid-template-columns: 1fr; } .at-topic-side { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .at-topic-foot .btn { flex: 1 1 auto; }
}

/* 13. NGĂN KÉO · HỘP THOẠI · MENU · THÔNG BÁO ----------------------------------------- */
.offcanvas, .offcanvas-end, .offcanvas-start, .offcanvas-bottom { --bs-offcanvas-width: min(440px, 100vw); --bs-offcanvas-bg: var(--at-surface); --bs-offcanvas-color: var(--at-ink); --bs-offcanvas-border-color: var(--at-line); --bs-offcanvas-transition: transform var(--at-overlay-t) var(--at-ease); box-shadow: var(--at-shadow-md); }
.offcanvas-header { min-height: 64px; padding: 16px 24px; border-bottom: 1px solid var(--at-line); align-items: flex-start; gap: 12px; }
.offcanvas-title { font-size: 19px; line-height: 28px; font-weight: 600; } .offcanvas-body { padding: 24px; }
.at-drawer-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--at-line); background: var(--at-surface); }
.offcanvas-backdrop, .modal-backdrop { --bs-backdrop-bg: #111A17; --bs-backdrop-opacity: .65; }
.offcanvas-bottom { --bs-offcanvas-height: auto; max-height: 85dvh; border-radius: var(--at-radius-lg) var(--at-radius-lg) 0 0; }
.modal { --bs-modal-width: 480px; --bs-modal-bg: var(--at-surface); --bs-modal-color: var(--at-ink); --bs-modal-border-color: var(--at-line); --bs-modal-border-radius: var(--at-radius-lg); --bs-modal-padding: 24px; --bs-modal-header-padding: 24px 24px 0; --bs-modal-header-border-width: 0; --bs-modal-footer-border-width: 0; --bs-modal-footer-gap: 8px; --bs-modal-box-shadow: var(--at-shadow-md); --bs-modal-margin: 16px; }
.modal-content { box-shadow: var(--at-shadow-md); } .modal-title { font-size: 19px; line-height: 28px; font-weight: 600; }
.modal-body { display: grid; gap: 16px; } .modal-footer { padding: 0 24px 24px; } .modal-footer > * { margin: 0; }
.modal.fade .modal-dialog { transform: translateY(8px); transition: transform var(--at-overlay-t) var(--at-ease); } .modal.show .modal-dialog { transform: none; }
.fade { transition: opacity var(--at-normal) var(--at-ease); }
.btn-close { width: 36px; height: 36px; padding: 0; margin: -4px -8px 0 auto; border-radius: var(--at-radius-ctl); opacity: .8; background-size: 12px; } .btn-close:hover { opacity: 1; background-color: var(--at-surface-hover); } .btn-close:focus { box-shadow: none; outline: 2px solid var(--at-focus); outline-offset: 2px; }
.dropdown-menu { --bs-dropdown-bg: var(--at-surface); --bs-dropdown-color: var(--at-ink); --bs-dropdown-border-color: var(--at-line); --bs-dropdown-border-radius: var(--at-radius-md); --bs-dropdown-padding-y: 6px; --bs-dropdown-link-color: var(--at-ink); --bs-dropdown-link-hover-color: var(--at-ink); --bs-dropdown-link-hover-bg: var(--at-surface-hover); --bs-dropdown-link-active-bg: var(--at-brand-soft); --bs-dropdown-link-active-color: var(--at-ink); --bs-dropdown-font-size: 14px; --bs-dropdown-min-width: 240px; box-shadow: var(--at-shadow-sm); }
.dropdown-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px; } .dropdown-item .at-icon { color: var(--at-ink-muted); }
.dropdown-item[aria-checked="true"] { font-weight: 600; } .dropdown-item[aria-checked="true"]::after { content: ""; margin-left: auto; width: 16px; height: 16px; background: var(--at-brand); -webkit-mask: url("../icons/check.svg") center / contain no-repeat; mask: url("../icons/check.svg") center / contain no-repeat; }
.dropdown-header { padding: 8px 14px 4px; font-size: 12px; line-height: 19px; font-weight: 600; color: var(--at-ink-muted); } .dropdown-divider { border-color: var(--at-line); margin: 6px 0; opacity: 1; }
.tooltip { --bs-tooltip-bg: var(--at-ink); --bs-tooltip-color: var(--at-surface); --bs-tooltip-font-size: 12px; --bs-tooltip-border-radius: var(--at-radius-sm); --bs-tooltip-opacity: 1; font-family: var(--at-font); }
.at-banner, .alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin: 0; font-size: 13px; line-height: 21px; color: var(--at-ink); background: var(--at-info-soft); border: 0; border-left: 3px solid var(--at-info); border-radius: var(--at-radius-ctl); }
.at-banner > .at-icon { color: var(--at-info); margin-top: 1px; } .at-banner > div { min-width: 0; flex: 1 1 auto; } .at-banner-title { font-weight: 600; }
.at-banner--success, .alert-success { background: var(--at-success-soft); border-left-color: var(--at-success); } .at-banner--success > .at-icon { color: var(--at-success); }
.at-banner--warning, .alert-warning { background: var(--at-warning-soft); border-left-color: var(--at-warning); } .at-banner--warning > .at-icon { color: var(--at-warning); }
.at-banner--danger, .at-banner--error, .alert-danger { background: var(--at-danger-soft); border-left-color: var(--at-danger); } .at-banner--danger > .at-icon, .at-banner--error > .at-icon { color: var(--at-danger); }
.at-banner--neutral { background: var(--at-surface-2); border-left-color: var(--at-line-strong); } .at-banner--neutral > .at-icon { color: var(--at-ink-muted); }
.at-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 1090; display: grid; gap: 8px; width: min(400px, calc(100vw - 32px)); }
.at-toast { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 12px 8px 12px 16px; font-size: 13px; line-height: 21px; color: var(--at-ink); background: var(--at-surface); border: 1px solid var(--at-line); border-left: 3px solid var(--at-info); border-radius: var(--at-radius-md); box-shadow: var(--at-shadow-sm); animation: at-rise var(--at-normal) var(--at-ease); }
.at-toast > .at-icon { color: var(--at-info); margin-top: 1px; } .at-toast > div { flex: 1 1 auto; min-width: 0; font-weight: 500; }
.at-toast--success { border-left-color: var(--at-success); } .at-toast--success > .at-icon { color: var(--at-success); }
.at-toast--warning { border-left-color: var(--at-warning); } .at-toast--warning > .at-icon { color: var(--at-warning); }
.at-toast--error, .at-toast--danger { border-left-color: var(--at-danger); } .at-toast--error > .at-icon, .at-toast--danger > .at-icon { color: var(--at-danger); }
.at-toast .btn-close { margin: -4px 0 0; flex: none; }
@keyframes at-rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 767.98px) { .at-toasts { right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); } .offcanvas-end, .offcanvas-start { --bs-offcanvas-width: 100vw; height: 100dvh; } .modal { --bs-modal-padding: 20px; --bs-modal-header-padding: 20px 20px 0; } .modal-footer { padding: 0 20px 20px; } .modal-footer .btn { flex: 1 1 auto; } .at-drawer-footer .btn { flex: 1 1 auto; } }

/* 14. TRẠNG THÁI RỖNG · BIỂU ĐỒ -------------------------------------------------------- */
.at-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; padding: 24px; text-align: center; }
.at-empty img { width: 144px; height: 96px; margin-bottom: 12px; } .at-empty-title { font-size: 16px; line-height: 24px; font-weight: 600; }
.at-empty-desc { max-width: 380px; margin-top: 8px; font-size: 13px; line-height: 21px; color: var(--at-ink-muted); } .at-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.at-empty--page { min-height: calc(100dvh - 260px); } .at-empty--page img { width: 240px; height: 160px; } .at-empty--page .at-empty-title { font-size: 24px; line-height: 34px; } .at-empty--page .at-empty-desc { max-width: 520px; font-size: 14px; line-height: 23px; }
.at-chart { position: relative; height: 300px; } .at-chart--sm { height: 240px; }
.at-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; line-height: 19px; font-weight: 500; }
.at-legend span { display: inline-flex; align-items: center; gap: 6px; } .at-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--at-chart-1)); }
@media (max-width: 767.98px) { .at-empty { min-height: 200px; padding: 24px 16px; } .at-empty img { width: 128px; height: 85px; } .at-chart { height: 240px; } .at-chart--sm { height: 220px; } }

/* 15. TIỆN ÍCH -------------------------------------------------------------------- */
.at-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } .at-row--between { justify-content: space-between; } .at-row--top { align-items: flex-start; }
.at-grow { flex: 1 1 auto; min-width: 0; } .at-nowrap { white-space: nowrap; } .at-anywhere { overflow-wrap: anywhere; } .at-pre { white-space: pre-line; }
.at-mt-0 { margin-top: 0 !important; } .at-mt-2 { margin-top: 8px; } .at-mt-3 { margin-top: 12px; } .at-mt-4 { margin-top: 16px; } .at-mt-5 { margin-top: 20px; } .at-mt-6 { margin-top: 24px; } .at-mt-8 { margin-top: 32px; }
.at-mb-0 { margin-bottom: 0 !important; } .at-mb-2 { margin-bottom: 8px; } .at-mb-4 { margin-bottom: 16px; } .at-mb-6 { margin-bottom: 24px; }
.at-w-100 { width: 100%; } .at-text-right { text-align: right; } .at-text-center { text-align: center; }
.at-ink { color: var(--at-ink); } .at-brand-ink { color: var(--at-brand); } .at-ai-ink { color: var(--at-ai); } .at-success-ink { color: var(--at-success); } .at-warning-ink { color: var(--at-warning); } .at-danger-ink { color: var(--at-danger); }
.at-only-desktop { } .at-only-mobile { display: none !important; }
@media (max-width: 767.98px) { .at-only-desktop { display: none !important; } .at-only-mobile { display: revert !important; } }
.at-actionbar { display: none; }
@media (max-width: 767.98px) { .at-actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; gap: 8px; min-height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom) !important; align-items: center; padding: 12px 16px; background: var(--at-surface); border-top: 1px solid var(--at-line); } .at-actionbar .btn { flex: 1 1 auto; } }

/* 16. CHUYỂN ĐỘNG — Quiet Precision: chỉ xác nhận trạng thái, tôn trọng giảm chuyển động ---- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .at-sidebar, .at-topbar, .at-bottomnav, .at-toasts, .at-page-actions, .at-actionbar { display: none !important; } .at-main { margin: 0; padding: 0; } body { background: #fff; } }
/* Bảng nhiều cột ở 768–1199px: cuộn ngang TRONG khối chứa, không làm tràn cả trang (thông số 2.2) */
.at-panel:has(.at-table), .at-table-wrap { overflow-x: auto; position: relative; }  /* relative: chữ ẩn position:absolute trong bảng không thoát khỏi vùng cuộn */
.at-table th, .at-table td.at-td-actions, .at-table td.at-td-num { white-space: nowrap; }
/* Đăng nhập V3.5 (spec-chung 01): khối thương hiệu đệm 64px, ô icon cho lợi ích */
.at-auth-brand { padding: 64px; }
.at-auth-points li { gap: 16px; } .at-auth-points li div { display: grid; gap: 2px; } .at-auth-points li span:not(.at-auth-tile) { color: #C9D6EA; font-size: 13px; line-height: 21px; }
.at-auth-points strong { color: #FFFFFF; font-size: 16px; line-height: 24px; }
.at-auth-tile { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: #FFFFFF14; color: #8EC5FF; }
.at-auth-points .at-auth-tile .at-icon { color: #8EC5FF; }
.at-auth .at-panel .at-list .at-row { padding: 10px 12px; border: 1px solid var(--at-line); border-radius: 6px; }
@media (max-width: 991.98px) { .at-auth-brand { padding: 48px; } }
/* Trang lỗi V3.5 (spec-chung 04–06) */
.at-error-layout { min-height: calc(100dvh - 56px - 120px); display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.at-error-panel { width: 100%; max-width: 560px; padding: 32px; text-align: center; }
.at-error-illustration { position: relative; width: 112px; height: 112px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--at-brand-soft); color: var(--at-brand); }
.at-error-badge { position: absolute; right: 14px; bottom: 16px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--at-surface); color: var(--at-danger); box-shadow: 0 0 0 3px var(--at-brand-soft); }
.at-error-code { font-size: 64px; line-height: 72px; font-weight: 700; letter-spacing: -.02em; color: var(--at-ink); }
.at-error-copy { max-width: 360px; margin: 12px auto 24px; color: var(--at-ink-muted); }
@media (max-width: 767.98px) { .at-error-illustration { width: 96px; height: 96px; } .at-error-code { font-size: 48px; line-height: 56px; } .at-error-panel .btn { flex: 1 1 100%; } }
/* Đổi mật khẩu (spec-chung 02) + hồ sơ chưa hoàn tất (spec-chung 03) */
.at-form-480 { max-width: 480px; } .at-form-480 .at-field { margin-bottom: 20px; }
.at-pw-rules ul { margin: 0; padding-left: 18px; font-size: 12px; line-height: 19px; color: var(--at-ink-muted); }
.at-missing-item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--at-line); border-radius: 6px; }
.at-next-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.at-next-steps li { display: flex; gap: 12px; align-items: flex-start; }
.at-next-step-number { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--at-info-soft); color: var(--at-info); font-size: 14px; font-weight: 600; }
/* Trang chủ SV (ảnh duyệt 07): đề tài #1 ba cột trên một hàng; #2–#5 hàng gọn */
.at-best { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; padding: 16px; background: var(--at-surface-2); border-radius: 6px; }
.at-best-score .at-score { padding: 12px; background: var(--at-surface); border: 1px solid var(--at-line); border-radius: 6px; }
.at-best-reason { font-size: 13px; line-height: 21px; }
.at-rec-rows { border: 1px solid var(--at-line); border-radius: 6px; overflow: hidden; }
.at-rec-row { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; min-height: 48px; padding: 8px 14px; color: var(--at-ink); text-decoration: none; border-top: 1px solid var(--at-line); }
.at-rec-row:first-child { border-top: 0; } .at-rec-row:hover { background: var(--at-surface-hover); color: var(--at-ink); }
.at-rec-title { font-weight: 600; } .at-rec-score strong { font-size: 17px; color: var(--at-ai); } .at-rec-score { color: var(--at-ink-muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 1399.98px) { .at-best { grid-template-columns: 150px minmax(0, 1fr); } .at-best-evidence { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .at-best { grid-template-columns: 1fr; } .at-rec-row { grid-template-columns: auto minmax(0, 1fr) auto; } .at-rec-gv, .at-rec-row > .at-icon { display: none; } }
.at-evidence-value { white-space: nowrap; }
.at-best-evidence .at-evidence-value--none { white-space: normal; text-align: right; }
.at-best-evidence .at-evidence li { grid-template-columns: 26px minmax(70px, max-content) minmax(40px, 1fr) auto; gap: 6px 10px; }

/* Thẻ đợt đăng ký V3.7 (ảnh duyệt 09/12/13/14/16/18/19): trái = tên + thời gian, phải = câu giải thích sau vạch ngăn */
.at-period { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 16px 24px; padding: 14px 20px; background: var(--at-surface); border: 1px solid var(--at-line); border-radius: var(--at-radius-md); }
.at-period-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.at-period-tile { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: var(--at-brand-soft, #EAF1FD); color: var(--at-brand); }
.at-period-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.at-period-name { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--at-ink); }
.at-period-time { margin-top: 2px; font-size: 13px; line-height: 20px; color: var(--at-ink-muted); }
.at-period-aside { margin: 0; padding: 0 8px 0 24px; border-left: 1px solid var(--at-line); font-size: 13px; line-height: 21px; color: var(--at-ink-muted); }
@media (max-width: 767.98px) { .at-period { grid-template-columns: 1fr; padding: 12px 16px; } .at-period-aside { padding: 12px 8px 0 0; border-left: 0; border-top: 1px solid var(--at-line); } }
