/* =================================================================================================
   tien-do.css — màn Tiến độ học của cổng học sinh (06/09/2026, thay bản đồ đảo bay lo-trinh.css)
   =================================================================================================
   Đi cùng assets/js/tien-do.e4a27979.js. Nền giấy như phần còn lại của site; khối navy DUY NHẤT là khối tổng
   quan ở đầu (chép nhịp .nd-tong của noi-dung-khoa.css: thanh N đốt, số to màu vàng).

   Màu chép đúng từ tailwind.config.js (xem lý do ở đầu lich-tuan.css): file này không đi qua Tailwind
   nên class ghép động 'tt-' + trangThai phải có sẵn ở đây, và biến màu khai lại tại chỗ.
   ============================================================================================== */

.vp-td {
    --td-navy-900: #0D1F33;
    --td-navy-700: #16324F;
    --td-navy-300: #8FA3B8;
    --td-navy-100: #DCE4EC;
    --td-navy-50: #EEF2F6;
    --td-gold-700: #8A5F19;
    --td-gold-500: #C08A2E;
    --td-gold-400: #D1A544;
    --td-paper: #FAF6EE;
    --td-paper-dim: #F2EBDC;
    --td-vien: #E8E6E1;
    --td-vien-nhat: #EFEDE8;
    --td-stone-200: #E7E5E4;
    --td-chu: #3F4A56;
    --td-chu-nhat: #6B7684;
    --td-xanh: #1D9A6C;
    --td-xanh-nen: #E9F7F1;
    --td-xanh-vien: #CFEADD;
    --td-do: #B4232C;
    --td-cam: #B4630F;
    --td-cam-nen: #FDF3E7;
    --td-cam-vien: #F0DCC0;
    --td-bong: 0 1px 2px rgba(13, 31, 51, .05);
    --td-bong-cao: 0 8px 16px rgba(13, 31, 51, .07), 0 24px 48px rgba(13, 31, 51, .13);
    position: relative;
}

/* ---- A. Đầu khối ---- */
.vp-td-dau { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---- B. Tổng quan (khối navy) ---- */
.vp-td-tong {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; flex-wrap: wrap;
    background: var(--td-navy-900); border-radius: 2px; padding: 22px 26px 24px; margin-bottom: 16px;
}
.vp-td-tong-trai { flex: 1 1 280px; min-width: 0; }
/* Thanh chia đúng N ĐỐT, mỗi đốt một buổi: thanh liền chỉ nói một phần trăm, N đốt nói được còn mấy
   buổi nữa mà không phải đọc chữ. Không transition: đốt đổi màu theo dữ liệu, không theo tay người. */
.vp-td-dot { display: flex; gap: 3px; }
.vp-td-dot-o { flex: 1 1 0; height: 9px; background: rgba(255, 255, 255, .14); border-radius: 1px; min-width: 3px; }
.vp-td-dot-o.tt-da-hoc { background: var(--td-gold-400); }
.vp-td-dot-o.tt-dang-toi-gio { background: var(--td-gold-400); opacity: .42; }
.vp-td-dot-o.tt-chua-ke-hoach { outline: 1px dashed rgba(255, 255, 255, .45); outline-offset: -1px; }
.vp-td-tong-chu { font-size: 13.5px; line-height: 1.5; color: #E7E5E4; margin: 10px 0 0; }
.vp-td-tong-chu b { color: #fff; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.vp-td-tong-phu { font-size: 11.5px; color: #A8A29E; font-variant-numeric: tabular-nums; }
.vp-td-tong-ke { font-size: 13px; line-height: 1.5; color: #E7E5E4; margin: 6px 0 0; }
.vp-td-tong-ke i { color: var(--td-gold-400); margin-right: 7px; }
.vp-td-tong-ke b { color: #fff; font-weight: 800; }

.vp-td-so-ds { display: flex; gap: 26px; flex: 0 0 auto; }
.vp-td-so { text-align: right; }
.vp-td-so-nhan { font-size: 10px; font-weight: 600; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: #A8A29E; margin: 0; }
.vp-td-so-muc { font-size: 32px; font-weight: 800; line-height: 1; color: var(--td-gold-400); margin: 5px 0 0; font-variant-numeric: tabular-nums; }
.vp-td-so-phu { font-size: 11.5px; line-height: 1.4; color: #A8A29E; margin: 4px 0 0; font-variant-numeric: tabular-nums; }

/* ---- C. Ngữ cảnh ---- */
.vp-td-muc-tieu {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 12.5px; line-height: 1.6; color: var(--td-chu);
    background: #fff; border: 1px solid var(--td-vien); border-left: 3px solid var(--td-gold-500);
    padding: 10px 14px; margin-bottom: 12px;
}
.vp-td-muc-tieu i { color: var(--td-navy-700); margin-top: 3px; }
.vp-td-muc-tieu b { color: var(--td-navy-900); }
.vp-td-de-xuat { background: #fff; border: 1px solid var(--td-vien); padding: 12px 14px; margin-bottom: 12px; }
.vp-td-de-xuat-dong {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--td-chu); padding: 6px 0; border-top: 1px solid var(--td-vien-nhat);
}
.vp-td-de-xuat-dong:first-of-type { border-top: 0; }
.vp-td-de-xuat-dong b { color: var(--td-navy-900); }
.vp-td-de-xuat-phu { font-size: 12px; color: var(--td-chu-nhat); flex-basis: 100%; }
.vp-td-cat-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Chip trạng thái ---- */
.vp-td-chip {
    display: inline-flex; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em;
    line-height: 1.4; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--td-vien);
    background: var(--td-navy-50); color: var(--td-navy-700); white-space: nowrap;
}
.vp-td-chip.tt-da-hoc { background: var(--td-xanh-nen); border-color: var(--td-xanh-vien); color: var(--td-xanh); }
.vp-td-chip.tt-dang-toi-gio { background: #fff; border-color: var(--td-gold-400); color: var(--td-gold-700); }
.vp-td-chip.tt-co-ke-hoach { background: var(--td-navy-50); border-color: var(--td-navy-100); color: var(--td-navy-700); }
.vp-td-chip.tt-chua-ke-hoach, .vp-td-chip.tt-cho { background: var(--td-cam-nen); border-color: var(--td-cam-vien); color: var(--td-cam); }
.vp-td-chip.tt-huy { background: var(--td-paper-dim); border-color: var(--td-vien); color: var(--td-chu-nhat); }
.vp-td-chip.tt-khoa { background: var(--td-paper-dim); border-color: var(--td-vien); color: var(--td-chu-nhat); padding: 4px 10px; }

/* ---- D. Dòng thời gian ---- */
.vp-td-truc { background: #fff; border: 1px solid var(--td-vien); border-radius: 2px; padding: 4px 20px 4px; }
.vp-td-truc ol { list-style: none; margin: 0; padding: 12px 0 8px; }
.vp-td-muc {
    position: relative; display: grid; grid-template-columns: 96px 28px minmax(0, 1fr);
    column-gap: 12px; align-items: start; padding: 6px 0;
}
/* Trục: một đường 2px chạy dọc qua tâm cột giữa, vẽ bằng ::before của <li> để không đứt giữa hai mục. */
.vp-td-muc::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: calc(96px + 12px + 13px); width: 2px;
    background: var(--td-stone-200);
}
.vp-td-muc.la-gap::before { top: 50%; }
.vp-td-muc.la-cuoi::before { bottom: 50%; }
.vp-td-muc:first-child::before { top: 50%; }
.vp-td-muc.la-hom-nay::before { display: none; }

.vp-td-cot-ngay { display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding-top: 8px; min-width: 0; }
.vp-td-ngay { font-size: 14px; font-weight: 800; color: var(--td-navy-900); line-height: 1.25; font-variant-numeric: tabular-nums; }
.vp-td-gio { font-size: 11px; color: var(--td-chu-nhat); line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-td-cot-truc { position: relative; display: flex; justify-content: center; padding-top: 12px; }

/* Nốt trục 14px: phân biệt trạng thái bằng CẢ hình lẫn màu (tick, dấu x, viền đứt), không chỉ màu. */
.vp-td-not {
    position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--td-navy-700);
    color: #fff; font-size: 8px; line-height: 1; box-sizing: border-box;
}
.vp-td-not.tt-da-hoc { background: var(--td-xanh); border-color: var(--td-xanh); }
.vp-td-not.tt-dang-toi-gio { border-color: var(--td-gold-500); box-shadow: 0 0 0 3px rgba(192, 138, 46, .25); }
.vp-td-not.tt-dang-toi-gio::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--td-gold-500); }
.vp-td-not.tt-co-ke-hoach { border-color: var(--td-navy-700); }
.vp-td-not.tt-chua-ke-hoach { border-color: var(--td-cam); border-style: dashed; }
.vp-td-not.tt-huy { background: var(--td-paper-dim); border-color: var(--td-do); color: var(--td-do); }
.vp-td-not--test { border-radius: 2px; transform: rotate(45deg); background: var(--td-navy-900); border-color: var(--td-navy-900); color: var(--td-gold-400); }
.vp-td-not--test > i { transform: rotate(-45deg); font-size: 7px; }
.vp-td-not--test.tt-da-cham { background: var(--td-xanh); border-color: var(--td-xanh); color: #fff; }
.vp-td-not--test.tt-cho-cham { background: #fff; border-color: var(--td-cam); border-style: dashed; color: var(--td-cam); }
.vp-td-not--cuoi { background: #fff; border: 2px dashed #D6D3D1; }

/* Mốc hôm nay: đường vàng ngang cả ba cột, nốt vuông xoay 45 độ. */
.vp-td-muc.la-hom-nay { padding: 10px 0; align-items: center; }
.vp-td-muc.la-hom-nay .vp-td-cot-ngay { padding-top: 0; }
.vp-td-muc.la-hom-nay .vp-td-cot-truc { padding-top: 0; }
.vp-td-moc { position: relative; z-index: 1; display: block; width: 10px; height: 10px; background: var(--td-gold-500); transform: rotate(45deg); }
.vp-td-ke-hom-nay { display: block; height: 2px; background: var(--td-gold-500); align-self: center; }
.vp-td-muc.la-hom-nay .vp-td-cot-truc::before {
    content: ""; position: absolute; left: -12px; right: -12px; top: 50%; height: 2px; margin-top: -1px; background: var(--td-gold-500);
}

.vp-td-gap-o { padding: 2px 0 6px; }
.vp-td-chevron { transition: transform var(--ao-nhanh, 150ms) var(--ao-ease, ease); display: inline-block; }
.vp-td-chevron.xoay { transform: rotate(180deg); }
.vp-td-cuoi-chu { font-size: 12px; color: var(--td-chu-nhat); padding-top: 10px; margin: 0; }

/* ---- Thẻ buổi ---- */
.vp-td-the {
    position: relative; display: flex; align-items: stretch; gap: 10px;
    background: #fff; border: 1px solid var(--td-vien); border-left: 3px solid var(--td-navy-700); border-radius: 8px;
    box-shadow: var(--td-bong); min-width: 0;
    transition: box-shadow var(--ao-nhanh, 150ms) var(--ao-ease, ease), border-color var(--ao-nhanh, 150ms) var(--ao-ease, ease);
}
.vp-td-the-bam {
    flex: 1 1 auto; min-width: 0; display: block; text-align: left; background: transparent; border: 0;
    padding: 8px 12px; cursor: pointer; color: inherit; font: inherit; border-radius: 8px;
}
.vp-td-the-bam:focus-visible { outline: 2px solid var(--td-gold-500); outline-offset: -2px; }
.vp-td-the--gon .vp-td-the-bam { min-height: 44px; }
.vp-td-the--day .vp-td-the-bam { padding: 12px 14px; }
.vp-td-the.dang-mo, .vp-td-the:hover { box-shadow: var(--td-bong-cao); }
.vp-td-the.la-hien-tai { outline: 1px solid var(--td-navy-300); outline-offset: 2px; }
.vp-td-hanh-dong { align-self: center; margin-right: 10px; flex: none; }
.vp-td-ngay-gon { display: none; }

.vp-td-the-dong { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.vp-td-ten { font-size: 14px; font-weight: 700; color: var(--td-navy-900); line-height: 1.35; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-td-the--day .vp-td-ten { white-space: normal; }
.vp-td-ten--cam { color: var(--td-cam); font-weight: 600; }
.vp-td-phu { font-size: 11.5px; color: var(--td-chu); }
.vp-td-dau-hieu { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--td-chu); }
.vp-td-dau-hieu > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.vp-td-dau-hieu i { font-size: 11px; color: var(--td-navy-700); }
.vp-td-dau-hieu .text-gold-700 i { color: var(--td-gold-700); }
.vp-td-mo-nhat { color: var(--td-chu-nhat); }
.vp-td-topics { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.vp-td-topic {
    display: inline-block; font-size: 11px; font-weight: 600; line-height: 1.4; margin: 0 5px 5px 0;
    padding: 2px 8px; border-radius: 999px; background: var(--td-navy-50);
    border: 1px solid var(--td-navy-100); color: var(--td-navy-700);
}
.vp-td-topics .vp-td-topic { margin: 0; }
.vp-td-topic--them { background: transparent; }
.vp-td-the-chan { margin-top: 8px; font-size: 11px; }

/* Năm trạng thái của thẻ: viền trái, nền, viền. Thẻ huỷ gạch ngang tên và ngày giờ. */
.vp-td-the.tt-da-hoc { border-left-color: var(--td-xanh); background: var(--td-xanh-nen); border-color: var(--td-xanh-vien); border-left-color: var(--td-xanh); }
.vp-td-the.tt-dang-toi-gio {
    border-color: var(--td-gold-400); border-left-color: var(--td-gold-500);
    box-shadow: 0 0 0 3px rgba(192, 138, 46, .22);
    animation: vp-td-nhap-sang 1.6s var(--ao-ease, ease) 3;
}
.vp-td-the.tt-co-ke-hoach { border-left-color: var(--td-navy-700); }
.vp-td-the.tt-chua-ke-hoach { border-color: var(--td-cam-vien); border-style: dashed; border-left-style: solid; border-left-color: var(--td-cam); background: var(--td-cam-nen); }
.vp-td-the.tt-huy { border-left-color: var(--td-do); background: var(--td-paper-dim); opacity: .8; }
.vp-td-the.tt-huy .vp-td-ten { text-decoration: line-through; color: var(--td-chu); }
.vp-td-muc.la-buoi:has(.vp-td-the.tt-huy) .vp-td-ngay { text-decoration: line-through; color: var(--td-chu-nhat); }
/* Nhấp sáng ĐÚNG BA NHỊP rồi đứng yên ở trạng thái tĩnh (chép luật của ô lịch tuần): WCAG cấm chuyển
   động tự chạy quá 5 giây không có nút dừng. */
@keyframes vp-td-nhap-sang {
    0%, 100% { box-shadow: 0 0 0 3px rgba(192, 138, 46, .22); }
    50% { box-shadow: 0 0 0 6px rgba(192, 138, 46, .12); }
}
.vp-td-the--test { text-decoration: none; color: inherit; padding: 8px 12px; align-items: center; }
.vp-td-the--test .vp-td-the-dong { flex: 1 1 auto; }
.vp-td-the--test:focus-visible { outline: 2px solid var(--td-gold-500); outline-offset: 2px; }
.vp-td-the--test.tt-da-cham { border-left-color: var(--td-xanh); }
.vp-td-the--test.tt-cho-cham { border-left-color: var(--td-cam); }
.vp-td-the--test.tt-chua-lam { border-left-color: var(--td-navy-900); }

/* ---- Chú thích màu ---- */
.vp-td-chu-thich {
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
    font-size: 11px; color: var(--td-chu-nhat); padding: 12px 0; border-top: 1px solid var(--td-vien);
}
.vp-td-chu-thich span { display: inline-flex; align-items: center; gap: 6px; }
.vp-td-chu-thich i.o {
    width: 13px; height: 13px; border-radius: 4px; display: inline-block;
    background: #fff; border: 1px solid var(--td-vien); border-left: 3px solid var(--td-navy-700);
}
.vp-td-chu-thich i.o.tt-da-hoc { background: var(--td-xanh-nen); border-color: var(--td-xanh-vien); border-left-color: var(--td-xanh); }
.vp-td-chu-thich i.o.tt-huy { background: var(--td-paper-dim); border-left-color: var(--td-do); }
.vp-td-chu-thich i.o.tt-chua-ke-hoach { background: var(--td-cam-nen); border-style: dashed; border-left-style: solid; border-left-color: var(--td-cam); }
.vp-td-chu-thich i.o.tt-dang-toi-gio { background: #fff; border-color: var(--td-gold-400); border-left-color: var(--td-gold-500); box-shadow: 0 0 0 2px rgba(192, 138, 46, .25); }

/* ---- Ô mở rộng ---- */
.vp-td-nen { position: fixed; inset: 0; z-index: 49; background: transparent; }
.vp-td-nen.co-mau { background: rgba(13, 31, 51, .35); }
.vp-td-o {
    position: fixed; z-index: 50; width: 360px; max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px); overflow-y: auto;
    background: #fff; border: 1px solid var(--td-vien); border-radius: 2px;
    box-shadow: var(--td-bong-cao); padding: 16px 18px;
    animation: vp-td-o-vao var(--ao-vua, 220ms) var(--ao-ease-vao, ease) both;
}
@keyframes vp-td-o-vao { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
/* Mũi ở cạnh TRÊN khi ô nằm dưới thẻ, ở cạnh DƯỚI khi ô lật lên trên thẻ; cách mép trái 24px, tức
   ngay dưới đầu dòng tên buổi. Thẻ kéo hết bề ngang nên không có biến thể mũi trái/phải. */
.vp-td-o.mui-tren::before {
    content: ""; position: absolute; left: 24px; top: -7px; width: 12px; height: 12px; background: #fff;
    border-left: 1px solid var(--td-vien); border-top: 1px solid var(--td-vien); transform: rotate(45deg);
}
.vp-td-o.mui-duoi::before {
    content: ""; position: absolute; left: 24px; bottom: -7px; width: 12px; height: 12px; background: #fff;
    border-right: 1px solid var(--td-vien); border-bottom: 1px solid var(--td-vien); transform: rotate(45deg);
}
/* Dưới 700px: tấm trượt từ đáy. Ô neo cạnh thẻ trên màn hẹp thì hoặc tràn ra ngoài hoặc che kín thẻ. */
.vp-td-o.la-tam-truot {
    left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none;
    max-height: 82vh; border-radius: 16px 16px 0 0; padding-bottom: 24px;
    animation: vp-td-truot-len var(--ao-vua, 220ms) var(--ao-ease-vao, ease) both;
}
@keyframes vp-td-truot-len { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.vp-td-o-dong { position: absolute; right: 10px; top: 10px; color: var(--td-chu-nhat); padding: 6px; line-height: 1; border-radius: 4px; }
.vp-td-o-dong:hover { color: var(--td-navy-900); }
.vp-td-o-dong:focus-visible { outline: 2px solid var(--td-gold-500); }
.vp-td-o-ten { font-size: 15px; font-weight: 800; color: var(--td-navy-900); line-height: 1.35; margin-top: 3px; }
.vp-td-dem { font-size: 11.5px; font-weight: 800; color: var(--td-gold-700); font-variant-numeric: tabular-nums; }
.vp-td-o-muc { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--td-vien-nhat); }
.vp-td-o-nhan { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--td-chu-nhat); margin-bottom: 7px; }
.vp-td-o-nhan i { width: 16px; text-align: center; color: var(--td-navy-700); font-size: 12px; }
.vp-td-o-chu { font-size: 13px; line-height: 1.55; color: var(--td-chu); }
.vp-td-nhan-xet { border-left: 3px solid var(--td-navy-700); background: var(--td-paper-dim); padding: 8px 10px; border-radius: 0 4px 4px 0; }
.vp-td-ds { list-style: disc; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--td-chu); }
.vp-td-ds li { margin-bottom: 2px; }
.vp-td-canh-bao {
    margin-top: 12px; font-size: 11.5px; line-height: 1.55; font-weight: 600;
    color: var(--td-cam); background: var(--td-cam-nen); border: 1px solid var(--td-cam-vien);
    padding: 8px 10px; border-radius: 4px;
}

/* ---- Màn hẹp ---- */
@media (max-width: 699px) {
    .vp-td-tong { padding: 18px 18px 20px; }
    .vp-td-so-ds { flex: 1 1 100%; justify-content: flex-start; gap: 22px; }
    .vp-td-so { text-align: left; }
    .vp-td-so-muc { font-size: 24px; }
    .vp-td-truc { padding: 4px 12px; }
    .vp-td-muc { grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; }
    .vp-td-muc::before { left: 9px; }
    .vp-td-cot-ngay { display: none; }
    .vp-td-muc.la-hom-nay .vp-td-cot-truc::before { left: -4px; right: -10px; }
    .vp-td-ke-hom-nay { position: relative; }
    .vp-td-ke-hom-nay::after {
        content: attr(data-nhan); position: absolute; left: 0; top: -9px; background: #fff; padding-right: 8px;
        font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--td-gold-700);
    }
    .vp-td-ngay-gon { display: block; font-size: 11px; font-weight: 700; color: var(--td-chu-nhat); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
    .vp-td-the { flex-wrap: wrap; }
    .vp-td-hanh-dong { flex: 1 1 100%; margin: 0 10px 10px; justify-content: center; }
    .vp-td-the-dong { gap: 8px; }
}

/* Hover có transform chỉ khi thật sự có chuột; ở đây thẻ không nhấc, chỉ đổi bóng, nên không cần bọc
   thêm. Giảm chuyển động: tắt nhấp sáng và hiệu ứng vào của ô. */
@media (prefers-reduced-motion: reduce) {
    .vp-td-the.tt-dang-toi-gio { animation: none; }
    .vp-td-o, .vp-td-o.la-tam-truot { animation: none; }
    .vp-td-chevron { transition: none; }
}
