/* APP TỔ CHỨC (25/09, làm lại 26/09) — cùng nhận diện Tada Bot (tokens.css) nhưng là công cụ QUẢN TRỊ: thanh bên xanh mực,
   vùng làm việc là TẤM SÁNG để bảng số liệu dày đọc rõ.
   26/09 (user: "đẹp hơn, màu đúng chủ đề, phối màu hợp lý"): bản đầu lấy xanh bạc hà #7BD8C4 (không có trong bảng màu Tada Bot)
   cho dấu chấm và ô "hoàn thành", mục đang chọn là khối trắng chói, nút chính gradient đậm có bóng đổ nặng, ô nhập xám trên thẻ
   trắng. Nay MỘT họ màu: xanh mực của thương hiệu làm nhấn, sắc nhạt của chính nó làm nền phụ; màu ngữ nghĩa (xanh lá/vàng/đỏ)
   chỉ còn cho trạng thái. Nút phẳng, bóng đổ chỉ một lớp rất nhẹ. Mọi màu nằm ở biến --tc-* dưới đây. */
.tb {
  --tc-mat: #F2F5FB;              /* nền vùng làm việc */
  --tc-the: #FFFFFF;
  --tc-vien: #E1E7F2; --tc-vien-dam: #CBD5E8;
  --tc-chu: #14224B; --tc-phu: #56658E; --tc-mo: #8A97BE;
  --tc-nhan: var(--tb-xanh-sang); --tc-nhan-dam: var(--tb-xanh); --tc-nhan-nhat: #E9EFFC; --tc-nhan-vua: #C9D8F6;
  --tc-hang: #F7F9FD;             /* đầu bảng, hàng mở rộng */
  --tc-tot: #177A57; --tc-tot-nen: #E7F6EF;
  --tc-cho: #8A5A00; --tc-cho-nen: #FFF5E0;
  --tc-loi: #B4283A; --tc-loi-nen: #FDECEE;
  --tc-bong: 0 1px 2px rgba(20, 34, 75, .05), 0 6px 20px rgba(20, 34, 75, .05);
}
.nhan-tc { font: 600 11px var(--phong-chu); letter-spacing: .02em; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .16); color: var(--chu); }
.sang .nhan-tc { background: var(--tc-nhan-nhat); color: var(--tc-nhan); }

/* ---- đăng nhập ---- */
.dn-trang { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 40px clamp(20px, 4vw, 44px); }
.dn-gioi-thieu h1 { font-size: clamp(28px, 3.4vw, 44px); margin: 34px 0 16px; max-width: 18ch; }
.dn-gioi-thieu p { color: var(--chu-phu); max-width: 52ch; }
.dn-diem { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; color: var(--chu); }
.dn-diem li { display: flex; gap: 12px; align-items: center; }
.dn-diem li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .14)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; }
.dn-the { background: var(--tc-the); border-radius: 24px; padding: 34px; box-shadow: var(--bong-the); }
.dn-the h2 { font-size: 22px; } .dn-the .phu { color: var(--chu-phu); margin: 6px 0 22px; }
.dn-the form { display: flex; flex-direction: column; gap: 14px; }
.dn-the .cuoi-the { margin-top: 18px; font-size: 14px; color: var(--chu-phu); }
.tb .dn-the .o input { height: 46px; border-radius: 10px; border: 1px solid var(--tc-vien-dam); background: var(--tc-the); }
.tb .dn-the .o input:hover { border-color: #A9B8D8; }
.tb .dn-the .o input:focus { border-color: var(--tc-nhan); box-shadow: 0 0 0 3px rgba(36, 71, 143, .14); }
.tb .dn-the .nut.chinh { height: 46px; border-radius: 10px; background: var(--tc-nhan); box-shadow: 0 1px 2px rgba(20, 34, 75, .18); }
.tb .dn-the .nut.chinh:hover { background: var(--tc-nhan-dam); }
.tb .dn-the .nut-chu { color: var(--tc-nhan); font-weight: 600; }
@media (max-width: 860px) { .dn-trang { grid-template-columns: 1fr; } .dn-gioi-thieu h1 { margin-top: 20px; } }

/* ---- khung ---- */
.tc-khung { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.tc-ben { padding: 26px 16px 22px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.tc-ben > .ten-hieu { padding: 0 8px; }
.tc-chon { padding: 0 4px; }
.tc-chon select { height: 42px; font-weight: 500; }
.tc-nav { display: flex; flex-direction: column; gap: 2px; }
.tc-nav a { position: relative; height: 42px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; gap: 12px;
  color: var(--chu-phu); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s; }
.tc-nav a svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.tc-nav a:hover { background: rgba(255, 255, 255, .07); color: var(--chu); }
.tc-nav a[aria-current="page"] { background: rgba(255, 255, 255, .13); color: var(--chu); }
.tc-nav a[aria-current="page"] svg { opacity: 1; }
.tc-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--tb-nhan); }
.tc-nav a.khoa { opacity: .45; pointer-events: none; }
.tc-toi { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--chu-phu); padding: 14px 8px 0;
  border-top: 1px solid var(--vien); }
.tc-toi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-chinh { background: var(--tc-mat); color: var(--tc-chu); border-radius: 24px 0 0 24px; padding: 34px clamp(20px, 3.4vw, 48px) 64px; min-width: 0; }
.tc-chinh > * { max-width: 1160px; }
@media (max-width: 860px) {
  .tc-khung { grid-template-columns: minmax(0, 1fr); }
  .tc-chon { flex: 1 1 160px; min-width: 0; padding: 0; } .tc-chon select { width: 100%; }
  .tc-ben { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .tc-ben > .ten-hieu { padding: 0; }
  /* 07/10 (user: "check lại responsive toàn bộ app tổ chức"): cuộn ngang giấu mất 2/5 mục ở 390 px ("Thành v…") → XUỐNG DÒNG */
  .tc-khung { grid-template-rows: auto 1fr; }
  .tc-nav { flex-direction: row; flex-wrap: wrap; width: 100%; order: 3; gap: 4px; }
  .tc-nav a { white-space: nowrap; flex: 1 1 auto; justify-content: center; height: 38px; padding: 0 10px; background: rgba(255, 255, 255, .05); }
  .tc-nav a[aria-current="page"]::before { display: none; }
  .tc-toi { margin: 0 0 0 auto; flex-direction: row; align-items: center; padding: 0; border: 0; }
  .tc-toi span { display: none; }
  .tc-chon { order: 2; }
  .tc-chinh { border-radius: 20px 20px 0 0; padding: 24px 16px 48px; }
}

/* ---- nội dung ---- */
.tc-chinh h1 { font-size: 28px; color: var(--tc-chu); }
.tc-dau { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.tc-dau p { color: var(--tc-phu); margin-top: 6px; }
.o-trang { background: var(--tc-the); border: 1px solid var(--tc-vien); border-radius: 16px; padding: 22px 24px; box-shadow: var(--tc-bong); }
.o-trang + .o-trang { margin-top: 18px; }
.o-trang h2 { font-size: 16px; margin-bottom: 6px; color: var(--tc-chu); }
.o-trang h2 + :not(.goi-y) { margin-top: 12px; }
.o-trang > .goi-y { margin-bottom: 16px; }
@media (max-width: 560px) { .o-trang { padding: 18px 16px; } }

/* thẻ số liệu: số lớn màu thương hiệu, nhãn nhỏ phía trên */
.so-lieu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .so-lieu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }   /* 4 ô: 4 hoặc 2 × 2, không lẻ 3 + 1 */
.so-lieu div { background: var(--tc-the); border: 1px solid var(--tc-vien); border-radius: 14px; padding: 16px 18px;
  color: var(--tc-phu); font-size: 13px; font-weight: 500; box-shadow: var(--tc-bong); }
.so-lieu b { display: block; font: 700 30px/1.15 var(--phong-tieu-de); color: var(--tc-nhan-dam); margin-top: 8px; font-variant-numeric: tabular-nums; }

/* dải trạng thái: nền trắng, vạch màu bên trái + chấm — màu ngữ nghĩa chỉ nằm ở vạch và chữ */
.trang-thai-tc { display: flex; gap: 12px; align-items: center; padding: 14px 18px 14px 20px; border-radius: 14px; margin-bottom: 20px; font-size: 14px;
  background: var(--tc-the); border: 1px solid var(--tc-vien); border-left: 4px solid var(--tc-vien-dam); box-shadow: var(--tc-bong); color: var(--tc-chu); }
.trang-thai-tc::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.trang-thai-tc.cho { border-left-color: #E8A33A; color: var(--tc-cho); }
.trang-thai-tc.tot { border-left-color: #2FA37A; color: var(--tc-tot); }
.trang-thai-tc.loi { border-left-color: var(--tc-loi); color: var(--tc-loi); }

/* bảng */
.bang { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; color: var(--tc-chu); }
.bang th { text-align: left; font: 600 12px var(--phong-chu); color: var(--tc-phu); padding: 10px 14px; background: var(--tc-hang);
  border-top: 1px solid var(--tc-vien); border-bottom: 1px solid var(--tc-vien); white-space: nowrap; }
.bang th:first-child { border-left: 1px solid var(--tc-vien); border-radius: 10px 0 0 10px; }
.bang th:last-child { border-right: 1px solid var(--tc-vien); border-radius: 0 10px 10px 0; }
.bang td { padding: 13px 14px; border-bottom: 1px solid var(--tc-vien); vertical-align: middle; }
.bang tbody tr:not(.chi-tiet-hv):hover td { background: #FAFBFE; }
.bang tr:last-child td { border-bottom: 0; }
.bang .hanh-dong { text-align: right; white-space: nowrap; }
.bang .hanh-dong .nut + .nut { margin-left: 6px; }
.cuon-ngang { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* bảng không bóp cột trên màn hẹp: đủ rộng tối thiểu rồi CUỘN trong khung (07/10 — tên chương trình từng xuống dòng từng chữ) */
.cuon-ngang > .bang { min-width: 640px; }
.bang td:first-child { min-width: 200px; }
.bang td { min-width: 96px; } .bang th { white-space: nowrap; } .bang .hanh-dong { min-width: 0; }
.nhan { height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.nhan.xanh { background: var(--tc-nhan-nhat); color: var(--tc-nhan-dam); } .nhan.luc { background: var(--tc-tot-nen); color: var(--tc-tot); }
.nhan.xam { background: #EEF1F7; color: var(--tc-phu); }
.nhan.vang { background: var(--tc-cho-nen); color: var(--tc-cho); } .nhan.do { background: var(--tc-loi-nen); color: var(--tc-loi); }

/* biểu mẫu */
.hang-them { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.hang-them .o { flex: 1 1 240px; }
.hang-them .o select { min-width: 150px; }
.tc-chinh .o { color: var(--tc-phu); font-weight: 500; }
.tc-chinh .o input, .tc-chinh .o select, .tc-chinh .o textarea { height: 44px; border-radius: 10px; border: 1px solid var(--tc-vien-dam);
  background-color: var(--tc-the); color: var(--tc-chu); font-weight: 400; }
.tc-chinh .o textarea { height: auto; min-height: 96px; padding: 12px 14px; font: inherit; font-size: 15px; resize: vertical; }
.tc-chinh .o input:hover, .tc-chinh .o select:hover, .tc-chinh .o textarea:hover { border-color: #A9B8D8; }
.tc-chinh .o input:focus, .tc-chinh .o select:focus, .tc-chinh .o textarea:focus { outline: 0; border-color: var(--tc-nhan);
  box-shadow: 0 0 0 3px rgba(36, 71, 143, .14); background-color: var(--tc-the); }
.bang select { height: 34px; padding: 0 30px 0 10px; border-radius: 8px; border: 1px solid var(--tc-vien-dam); background-color: var(--tc-the); color: var(--tc-chu); }
.luoi-o { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 700px) { .luoi-o { grid-template-columns: 1fr; } }

/* nút trong vùng làm việc: phẳng, một họ màu */
.tb .tc-chinh .nut { height: 42px; border-radius: 10px; padding: 0 18px; font-weight: 600; font-size: 14px; color: var(--tc-nhan);
  border: 1px solid var(--tc-vien-dam); background: var(--tc-the); box-shadow: none; }
.tb .tc-chinh .nut:hover { background: var(--tc-nhan-nhat); border-color: var(--tc-nhan-vua); }
.tb .tc-chinh .nut.chinh { color: #fff; background: var(--tc-nhan); border: 1px solid var(--tc-nhan); box-shadow: 0 1px 2px rgba(20, 34, 75, .18); }
.tb .tc-chinh .nut.chinh:hover { background: var(--tc-nhan-dam); border-color: var(--tc-nhan-dam); }
.tb .tc-chinh .nut.nguy { color: var(--tc-loi); border-color: #EFC3CA; background: var(--tc-the); }
.tb .tc-chinh .nut.nguy:hover { background: var(--tc-loi-nen); border-color: #E3A2AD; }
.tb .tc-chinh .nut.nho { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; }

/* tiến độ từng bài: hoàn thành = xanh thương hiệu đặc, đang học = sắc nhạt, chưa = xám */
.o-tien { display: flex; gap: 5px; flex-wrap: wrap; }
.o-tien span { min-width: 26px; height: 24px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center;
  background: #EEF1F7; color: var(--tc-mo); font-variant-numeric: tabular-nums; }
.o-tien span.hoan_thanh { background: var(--tc-nhan); color: #fff; }
.o-tien span.dang_hoc, .o-tien span.da_day { background: var(--tc-nhan-nhat); color: var(--tc-nhan); box-shadow: inset 0 0 0 1px var(--tc-nhan-vua); }
.chi-tiet-hv td { background: var(--tc-hang); }
.chi-tiet-hv td { padding: 14px 18px 18px; }
.bang-nho { width: 100%; font-size: 13px; border-collapse: collapse; }
.bang-nho td, .bang-nho th { padding: 7px 8px; border-bottom: 1px solid var(--tc-vien); text-align: left; }
.bang-nho th { font-weight: 600; color: var(--tc-phu); font-size: 12px; }
.goi-y { font-size: 13px; color: var(--tc-phu); }

/* "Bắt đầu" ở Tổng quan là một TRÌNH TỰ thật → vòng số */
.o-trang ol.goi-y { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: buoc; display: grid; gap: 12px; font-size: 14px; color: var(--tc-chu);
  line-height: 1.5 !important; }
.o-trang ol.goi-y li { counter-increment: buoc; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; }
.o-trang ol.goi-y li::before { content: counter(buoc); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 600 13px var(--phong-tieu-de); color: var(--tc-nhan); background: var(--tc-nhan-nhat); }

.trong-tc { padding: 44px 20px; text-align: center; color: var(--tc-phu); border: 1.5px dashed var(--tc-vien-dam); border-radius: 14px;
  background: var(--tc-hang); display: grid; gap: 12px; justify-items: center; }
.tb-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; padding: 12px 18px; border-radius: 12px;
  background: var(--tb-xanh-dam); color: #fff; font-size: 14px; box-shadow: var(--bong-noi); }
.man-che .hop.sang { background: var(--tc-the); }
.man-che .hop.sang .nut.chinh { background: var(--tc-nhan); box-shadow: none; }
