/* CHEN Universal (trước là CHEN Academy) — giữ bảng màu Academy (nền kem, bề mặt sáng, chữ charcoal, màu nhấn nâu ấm).
   Bố cục theo các app nội bộ CHEN (Global Web OS): thanh bên trái cố định, nội dung bên phải. */
:root {
  --ink: #1f1b18;
  --ink-2: #4a4038;
  --muted: #6a5d52; /* đậm hơn bản cũ (#74675c) để dễ đọc chữ phụ */
  --line: #e7dfd5;
  --line-2: #d6cabd;
  --bg: #faf8f5;
  --card: #ffffff;
  --cream: #f4efe8;
  --cream-2: #efe6db;
  --accent: #7d4f27;
  --accent-ink: #ffffff;
  --ok: #2f6b48;
  --ok-bg: #e9f2ec;
  --warn: #9a4a24;
  --warn-bg: #fbefe8;
  --info: #3d506b;
  --info-bg: #eef1f6;
  /* Cùng font-family đang render trên Global Web OS (đo computed style 11/11/2026): GLO khai báo Inter nhưng
     không tải webfont → hiển thị font hệ thống (SF Pro trên Mac/iPhone, Segoe UI trên Windows, Roboto trên Android).
     Academy dùng ĐÚNG chuỗi này, không serif cho giao diện. */
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
  --r: 10px;
  --side: 232px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px / 1.55 var(--sans);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.25;
}
h2 {
  font-size: 18px;
  line-height: 1.3;
}
h3 {
  font-size: 16px;
  line-height: 1.35;
}
.serif {
  font-family: var(--sans);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ================= Khung: thanh bên + nội dung ================= */
.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100vh;
}
body.side-thu {
  --side: 68px;
}
/* Màn đăng nhập: chưa có thanh bên → nội dung chiếm trọn chiều ngang */
.layout:has(> .side[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
.side[hidden] {
  display: none;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 10px;
  text-decoration: none;
}
.brand-mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-text b {
  font-size: 14px;
  letter-spacing: 0.08em;
}
.brand-text span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.who {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  margin-bottom: 6px;
}
.who-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.who-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
}
.who-id {
  min-width: 0;
  flex: 1;
}
.who-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.who-role,
.who-title {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.who-role {
  color: var(--ink-2);
}
.who-out {
  border: 0;
  background: none;
  padding: 6px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
}
.who-out:hover {
  background: var(--cream);
  color: var(--ink);
}
.who-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.who-links a,
.who-links button {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 4px 2px;
  text-align: left;
  cursor: pointer;
}
.who-links a:hover,
.who-links button:hover {
  color: var(--accent);
}
.nav-tim {
  margin: 4px 0 6px;
  min-height: 36px !important;
  padding: 7px 10px !important;
  font-size: 14px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-nhom {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 10px 4px;
  letter-spacing: 0.02em;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14.5px;
  min-height: 38px;
}
.nav a:hover {
  background: var(--bg);
  color: var(--ink);
}
.nav a.on {
  background: var(--cream-2);
  color: var(--ink);
  font-weight: 600;
}
.nav a.on .ico {
  color: var(--accent);
}
.nav .ico {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.nav .ico svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav a.con {
  padding: 6px 10px 6px 40px;
  min-height: 32px;
  font-size: 14px;
  color: var(--muted);
}
.nav a.con.on {
  background: none;
  color: var(--accent);
  font-weight: 600;
}
.nav a.an-tim {
  display: none;
}
.nav-day {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.side-thu-nut {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}
.side-thu-nut:hover {
  background: var(--bg);
}
body.side-thu .brand-text,
body.side-thu .who,
body.side-thu .nav-tim,
body.side-thu .nav-nhom,
body.side-thu .nav a span,
body.side-thu .nav a.con,
body.side-thu .side-thu-nut span {
  display: none;
}
body.side-thu .nav a {
  justify-content: center;
  padding: 8px;
}
.main {
  min-width: 0;
  padding: 26px 32px 64px;
}
/* Nội dung co giãn theo chiều rộng khả dụng; chỉ đoạn văn dài giới hạn độ dài dòng để dễ đọc */
.appbar,
.nav-backdrop {
  display: none;
}
.xem-nhu {
  background: #fff6e0;
  color: #6b4a00;
  border: 1px solid #f0d99a;
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}
@media (max-width: 899px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .appbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 60;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
  }
  .appbar-title {
    font-weight: 600;
    font-size: 15px;
  }
  .nav-burger {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
  }
  .side {
    position: fixed;
    z-index: 80;
    top: 0;
    bottom: 0;
    left: 0;
    width: 84vw;
    max-width: 300px;
    transform: translateX(-101%);
    transition: transform 0.18s ease-out;
  }
  body.nav-open .side {
    transform: none;
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(31, 27, 24, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open {
    overflow: hidden;
  }
  .main {
    padding: 16px 16px 48px;
  }
  .side-thu-nut {
    display: none;
  }
  h1 {
    font-size: 21px;
  }
}

/* ================= Đầu trang: tiêu đề trái, thao tác phải; lọc ở dưới ================= */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head .sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.page-head .act {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.crumb {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.crumb a {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  scrollbar-width: none;
}
.tabs a,
.tabs button {
  text-decoration: none;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  white-space: nowrap;
  font-size: 14.5px;
  background: none;
  cursor: pointer;
}
.tabs a.on,
.tabs button.on {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.filters input[type="search"] {
  flex: 1 1 260px;
  max-width: 360px;
}
.filters select {
  width: auto;
  min-width: 150px;
  max-width: 220px;
}

/* ================= Thành phần ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}
.btn.ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn.ghost:hover {
  border-color: var(--ink-2);
}
.btn.sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}
.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
}
.btn.link {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 0 4px;
  min-height: 32px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.block {
  width: 100%;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.stack > * + * {
  margin-top: 12px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid > * {
  min-width: 0;
}
.g2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}
.g3 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.g4 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
}
@media (max-width: 560px) {
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13.5px;
}
.label {
  font-size: 13px;
  color: var(--muted);
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.tag.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.tag.info {
  background: var(--info-bg);
  color: var(--info);
}
.tag.demo {
  background: #fff3cd;
  color: #7a5600;
}
.bar {
  height: 6px;
  background: var(--cream);
  border-radius: 3px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 3px;
}
.bar.ok i {
  background: var(--ok);
}
.sec-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 12px;
}
.sec-title:first-child {
  margin-top: 0;
}
@media (max-width: 560px) {
  .sec-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
.empty {
  padding: 22px 18px;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  background: var(--card);
}
.empty.gon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.err {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.okbox {
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: var(--r);
  padding: 12px 16px;
}
.skel {
  background: linear-gradient(90deg, #f1ece6 25%, #f8f5f1 37%, #f1ece6 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
  border-radius: 8px;
  min-height: 18px;
}
@keyframes sk {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 90;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14.5px;
  max-width: calc(100vw - 32px);
}
.toast.loi {
  background: var(--warn);
}
input[type="text"],
input[type="search"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  min-height: 40px;
  width: 100%;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
label.f {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chips button {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  min-height: 36px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
}
.chips button.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Bảng quản trị: cuộn ngang TRONG khung, không kéo lệch trang */
.tbl {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.tbl table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
.tbl th,
.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl th {
  background: var(--cream);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.tbl td.nowrap,
.tbl th.nowrap {
  white-space: nowrap;
}
.tbl tr.click {
  cursor: pointer;
}
.tbl tr.click:hover td {
  background: #fcfaf7;
}
.tbl.plain {
  border: 0;
  background: none;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.list {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.list > .it {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 54px;
}
.list > .it:last-child {
  border-bottom: 0;
}
.list > a.it {
  text-decoration: none;
}
.list > a.it:hover {
  background: #fcfaf7;
}
.it .l {
  min-width: 0;
}
.it .l b {
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ảnh */
.ph {
  aspect-ratio: 3 / 4;
  background: var(--cream);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph .no {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}
.ph.wide {
  aspect-ratio: 16 / 9;
}
.ph.contain img {
  object-fit: contain;
  background: var(--cream);
}

/* Hôm nay / collection */
.task {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
}
.task .ph {
  width: 84px;
}
@media (max-width: 640px) {
  .task {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .task .ph {
    width: 64px;
  }
  .task .go {
    grid-column: 1 / -1;
  }
}
.meta {
  display: flex;
  gap: 4px 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.coll {
  text-decoration: none;
  display: block;
}
.coll .ph {
  aspect-ratio: 4 / 3;
}
.coll h3 {
  margin: 10px 0 2px;
  font-weight: 600;
  font-size: 17px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  margin-bottom: 20px;
}
.hero .ph {
  aspect-ratio: 4 / 3;
}
@media (max-width: 899px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .hero .ph {
    max-width: 420px;
  }
}
.story {
  color: var(--ink-2);
  max-width: 70ch;
}
.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.trio > div {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}
.trio > div:last-child {
  border-right: 0;
}
.trio .k {
  font-size: 13px;
  color: var(--muted);
}
.trio .v {
  font-weight: 600;
  margin-top: 2px;
}
@media (max-width: 560px) {
  .trio {
    grid-template-columns: minmax(0, 1fr);
  }
  .trio > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .trio > div:last-child {
    border-bottom: 0;
  }
}
.lessons {
  display: grid;
  gap: 8px;
}
.lesson-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  text-decoration: none;
  min-height: 64px;
}
.lesson-row .ph {
  width: 48px;
}
.lesson-row .t b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sản phẩm */
.pcard {
  text-decoration: none;
  display: block;
}
.pcard b {
  display: block;
  font-weight: 600;
  margin-top: 8px;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcard span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
@media (max-width: 899px) {
  .sp-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}
.gallery .main-img {
  border: 0;
  padding: 0;
  background: none;
  width: 100%;
  cursor: zoom-in;
  display: block;
}
.gallery .main-img .ph {
  aspect-ratio: 4 / 5;
}
.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}
.thumbs button {
  border: 2px solid transparent;
  padding: 0;
  border-radius: 6px;
  width: 64px;
  flex: 0 0 64px;
  cursor: pointer;
  background: none;
}
.thumbs button.on {
  border-color: var(--ink);
}
.thumbs .ph {
  border-radius: 4px;
}
.sp-info .price {
  font-size: 18px;
  font-weight: 600;
  margin: 10px 0 14px;
}
.kv-mini {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 14.5px;
  margin-bottom: 16px;
}
.kv-mini dt {
  color: var(--muted);
}
.kv-mini dd {
  margin: 0;
}
.nho {
  background: var(--cream);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 0 0 16px;
}
.nho h3 {
  font-size: 14px;
  margin-bottom: 6px;
}
.nho ol {
  margin: 0;
  padding-left: 20px;
}
.nho li + li {
  margin-top: 4px;
}
.sp-tab {
  max-width: 860px;
}
.sp-tab > * + * {
  margin-top: 14px;
}
.sp-tab h3 {
  font-size: 15px;
  margin-top: 18px;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 15, 0.94);
  z-index: 95;
  display: flex;
  flex-direction: column;
}
.lightbox .bar2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding: 10px 14px;
  gap: 10px;
}
.lightbox .stage {
  flex: 1;
  overflow: auto;
  display: grid;
  place-items: center;
}
.lightbox img {
  max-width: none;
  cursor: zoom-in;
}
.lightbox .btn {
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}

/* Khối nội dung */
.blocks > * + * {
  margin-top: 12px;
}
.blocks p {
  margin: 0;
}
.blocks ul {
  margin: 0;
  padding-left: 20px;
}
.blocks li + li {
  margin-top: 6px;
}
.note {
  border-left: 3px solid var(--line-2);
  background: var(--cream);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
}
.note.canh_bao {
  border-color: var(--warn);
  background: var(--warn-bg);
  color: #6e3418;
}
.note.goi_y {
  border-color: var(--accent);
  background: #f8f1ea;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  column-gap: 24px;
  border-top: 1px solid var(--line);
  margin: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
  font-size: 14px;
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.blocks .tbl {
  border-radius: 8px;
}
.qa .qi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}
.qa .qi + .qi {
  margin-top: 8px;
}
.qa .q {
  font-weight: 600;
}
.qa .a {
  color: var(--ink-2);
  margin-top: 6px;
}
.imgs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 520px;
}
.imgs.n1 {
  grid-template-columns: minmax(0, 220px);
}
.imgs.n2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 360px;
}
.origin {
  font-size: 12.5px;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}
.origin.du_kien {
  background: var(--ok-bg);
  color: var(--ok);
}
.origin.goi_y_luat,
.origin.ai {
  background: #f6ebe1;
  color: var(--accent);
}
.origin.bien_soan {
  background: var(--info-bg);
  color: var(--info);
}
.origin.cho_soan {
  background: var(--warn-bg);
  color: var(--warn);
}

/* Bài học */
.player {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 20px;
}
.toc ol {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.toc li button {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
}
.toc li button:hover {
  background: var(--cream);
}
.toc li button.on {
  background: var(--cream-2);
  font-weight: 600;
}
.toc .so {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-size: 12.5px;
}
.toc .xong .so {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}
.toc .mt {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}
.player .body h2 {
  margin-bottom: 4px;
}
.player .muc {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.player .muc:first-of-type {
  border-top: 0;
}
.player .muc h3 {
  margin-bottom: 10px;
}
.player .foot {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
@media (max-width: 899px) {
  .player {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .toc {
    position: static;
  }
  .toc ol {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }
  .toc li button {
    white-space: nowrap;
  }
  .toc .mt {
    display: none;
  }
}
.check {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 16px;
  background: #fff;
  margin-top: 16px;
}
.opts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 11px 14px;
  background: #fff;
  cursor: pointer;
  min-height: 46px;
  width: 100%;
}
.opt .k {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-size: 13px;
  text-transform: uppercase;
}
.opt.chon {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.opt.chon .k {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.opt.dung {
  border-color: var(--ok);
  background: var(--ok-bg);
}
.opt.sai {
  border-color: var(--warn);
  background: var(--warn-bg);
}

/* Kiểm tra */
.exam {
  max-width: 760px;
}
.savebar {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg);
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 899px) {
  .savebar {
    top: 57px;
  }
}
.qcard {
  scroll-margin-top: 120px;
}
.qcard .qimg {
  max-width: 240px;
  margin-top: 10px;
}
.save-st {
  font-size: 13.5px;
}
.save-st.ok {
  color: var(--ok);
}
.save-st.dang {
  color: var(--muted);
}
.save-st.loi {
  color: var(--warn);
}
.result-hero {
  padding: 24px;
}
.result-hero .score {
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
}

/* Quản lý */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .dash {
    grid-template-columns: minmax(0, 1fr);
  }
}
.review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1180px) {
  .review {
    grid-template-columns: minmax(0, 1fr);
  }
}
.phone {
  max-width: 400px;
  margin: 0 auto;
  border: 10px solid #1f1b18;
  border-radius: 34px;
  background: var(--bg);
  padding: 18px 14px;
  max-height: 78vh;
  overflow-y: auto;
}
.rsec {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  padding: 16px;
}
.rsec + .rsec {
  margin-top: 12px;
}
.rsec.doi {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.side-r {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.src {
  font-size: 13.5px;
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
}
.src .v {
  color: var(--ink-2);
  word-break: break-word;
}
.diff .bo {
  background: #fbe9e4;
  text-decoration: line-through;
  color: #7a2e17;
  padding: 2px 6px;
  border-radius: 4px;
  display: block;
  margin: 3px 0;
}
.diff .them {
  background: #e6f1e9;
  color: #22553a;
  padding: 2px 6px;
  border-radius: 4px;
  display: block;
  margin: 3px 0;
}
.kv {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) {
  .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}
.st {
  font-size: 12.5px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--cream);
  white-space: nowrap;
  display: inline-block;
}
.st-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.st-info {
  background: var(--info-bg);
  color: var(--info);
}
.st-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.login {
  max-width: 560px;
  margin: 6vh auto;
  padding: 0 16px;
}
.login .pick {
  display: grid;
  gap: 8px;
}
.login .pick button {
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 52px;
}
.timeline .m {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
}
.timeline .m i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  margin: 7px auto 0;
}
.timeline .m.xong i {
  background: var(--ok);
  border-color: var(--ok);
}
details > summary {
  cursor: pointer;
}
.fold {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  padding: 12px 16px;
}
.fold > summary {
  font-weight: 600;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 24, 0.35);
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 16px;
}
.dialog {
  background: #fff;
  border-radius: 14px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: #fff;
  z-index: 86;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 22px;
  box-shadow: -8px 0 24px rgba(31, 27, 24, 0.08);
}
.radio-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
}
.radio-card + .radio-card {
  margin-top: 8px;
}
.radio-card input {
  margin-top: 4px;
}
.matrix-wrap {
  max-height: 70vh;
  overflow: auto;
}

/* ================= Đợt 2 (11/11): trang collection, bài thi ================= */
/* Đoạn văn dài giữ độ dài dòng dễ đọc; khung trang vẫn co giãn */
.player .blocks p,
.player .blocks li,
.player .note,
.player .qa {
  max-width: 78ch;
}
.player .blocks,
.sp-tab {
  font-size: 16px;
  line-height: 1.6;
}
.exam {
  max-width: 1080px;
}
.savebar-phai {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dong-ho {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--cream);
}
.dong-ho.sap-het {
  background: var(--warn-bg);
  color: var(--warn);
}

/* Đầu trang collection: ảnh bìa · thông tin · bài thi */
.bst-dau {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.3fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
  margin: 4px 0 8px;
}
.bst-dau.khong-anh {
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
}
.bst-bia,
.bst-ghep {
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--cream);
}
.bst-bia img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bst-ghep {
  display: grid;
  gap: 4px;
  aspect-ratio: 4 / 3;
  background: var(--card);
  border: 1px solid var(--line);
}
.bst-ghep.n2 {
  grid-template-columns: 1fr 1fr;
}
.bst-ghep.n3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.bst-ghep span {
  background: var(--cream);
  display: grid;
  place-items: center;
  min-width: 0;
}
.bst-ghep img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bst-tt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bst-tt h1 {
  font-size: 26px;
}
.bst-tt .story {
  margin: 0;
  font-size: 15.5px;
}
.bst-so {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}
.bst-so > div {
  padding: 10px 14px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.bst-so > div:last-child {
  border-right: 0;
}
.bst-so dt {
  font-size: 13px;
  color: var(--muted);
}
.bst-so dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-size: 14.5px;
}
.bst-so .bar {
  display: block;
  margin-top: 6px;
}
.bar.nho {
  display: inline-block;
  width: 90px;
  height: 5px;
  vertical-align: middle;
}

/* Khối bài thi cuối collection */
.khoi-thi {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-top: 3px solid var(--accent);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-margin-top: 80px;
}
.khoi-thi-dau {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.khoi-thi h2 {
  font-size: 17px;
}
.nhan-nho {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.khoi-thi-so {
  font-size: 13.5px;
  color: var(--ink-2);
}
.khoi-thi-than p {
  margin: 0 0 6px;
}
.thieu-bai {
  margin: 4px 0 0;
  padding-left: 18px;
}
.thieu-bai li + li {
  margin-top: 2px;
}
.luoi-thi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

/* Bài học dạng lưới, nhóm theo loại sản phẩm */
.nhom-bai {
  border-top: 1px solid var(--line);
  padding: 4px 0 12px;
}
.nhom-bai > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.nhom-bai > summary::-webkit-details-marker {
  display: none;
}
.nhom-bai > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s;
  margin-right: 2px;
}
.nhom-bai[open] > summary::before {
  transform: rotate(45deg);
}
.nhom-ten {
  font-weight: 600;
  font-size: 16px;
}
.luoi-bai {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.the-bai {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px;
  min-width: 0;
}
.the-bai:hover {
  border-color: var(--line-2);
  background: #fffdfa;
}
.the-bai.tiep {
  border-color: var(--accent);
}
.the-bai-anh {
  flex: 0 0 64px;
  height: 80px;
  border-radius: 8px;
  background: var(--cream);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.the-bai-anh img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.the-bai-anh.chu {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}
.the-bai-chu {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.the-bai-chu b {
  font-weight: 600;
}

@media (max-width: 1279px) {
  .bst-dau {
    grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr);
  }
  .bst-dau .khoi-thi {
    grid-column: 1 / -1;
  }
  .bst-dau.khong-anh {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .bst-dau {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .bst-so {
    grid-template-columns: minmax(0, 1fr);
  }
  .bst-so > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .bst-so > div:last-child {
    border-bottom: 0;
  }
  .luoi-bai,
  .luoi-thi {
    grid-template-columns: minmax(0, 1fr);
  }
  .bst-tt h1 {
    font-size: 23px;
  }
}

/* ================= Thực hành: nộp bài trên app ================= */
.th-luoi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}
.th-tc {
  margin: 6px 0 0;
  padding-left: 20px;
}
.th-tc li + li {
  margin-top: 4px;
}
.th-o-anh {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.th-anh {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.th-anh-chu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.th-anh-chu textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}
.th-chon {
  cursor: pointer;
}
.th-xem {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border: 1.5px dashed var(--line-2);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink-2);
  text-align: center;
  font-size: 14px;
  padding: 8px;
  overflow: hidden;
}
.th-xem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.th-ghi {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.th-mau {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px 12px;
}
.th-tep {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.th-tep figure {
  margin: 0;
}
.th-tep img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--cream);
  border-radius: 8px;
}
.th-tep figcaption {
  font-size: 13.5px;
  margin-top: 4px;
}
.th-tep audio {
  width: 100%;
}
.th-van-ban {
  white-space: pre-wrap;
  background: var(--cream);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
}
.ai-so-bo .tbl td {
  vertical-align: top;
}
@media (max-width: 899px) {
  .th-luoi {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .th-anh {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
  }
}

/* Danh sách thực hành trên trang collection */
.th-ds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.th-the {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
  min-width: 0;
}
.th-the:hover {
  border-color: var(--line-2);
}
.th-loai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
}
.th-loai .ico,
.th-loai .ico svg {
  width: 18px;
  height: 18px;
  display: block;
}
.th-loai .ico svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.th-ten {
  font-weight: 600;
  line-height: 1.4;
}
.th-cuoi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
@media (max-width: 760px) {
  .th-ds {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Nhập vai hội thoại */
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 12px;
  background: var(--cream);
  border-radius: var(--r);
}
.chat-xem {
  max-height: none;
}
.bong {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.bong .ai-noi {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}
.bong.khach {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bong.nv {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bong.nv .ai-noi {
  color: #d9cfc4;
}
.bong.dang {
  color: var(--muted);
  font-style: italic;
}
.chat-nhap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 10px;
}
.chat-nhap textarea {
  flex: 1;
  min-height: 48px;
  resize: vertical;
}
@media (max-width: 560px) {
  .ai-so-bo .tbl tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .ai-so-bo .tbl td {
    display: block;
    padding: 0;
    border: 0;
  }
  .ai-so-bo .tbl td:last-child {
    grid-column: 1 / -1;
  }
}

/* Điểm kiểm hàng (kho) */
.kh-luoi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
}
.kh-dau {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.kh-ds {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kh-diem {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}
.kh-o {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.kh-o textarea,
.kh-o input {
  width: 100%;
}
.kh-ds-xem li + li {
  margin-top: 10px;
}
.kh-kiem {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-top: 10px;
  background: #fff;
}
.kh-kiem-dau {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kh-chon {
  display: flex;
  gap: 18px;
  margin-top: 8px;
}
.kh-chon label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
}
.kh-loi {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.kh-loi:not([hidden]) {
  display: grid;
}
@media (max-width: 560px) {
  .kh-luoi {
    grid-template-columns: minmax(0, 1fr);
  }
  .kh-o {
    grid-template-columns: minmax(0, 1fr);
  }
}
.kh-kq {
  list-style: none;
  margin: 4px 0 10px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.kh-kq li {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.ai-de-xuat {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--info-bg);
}

/* ---------- Lộ trình onboarding ---------- */
.coll.khoa {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.coll.khoa h3 {
  margin: 4px 0 0;
}
.khoa-so {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--cream);
  color: var(--accent);
  font-weight: 700;
}
.th-the.kem {
  cursor: default;
}
.lt-tong {
  margin-bottom: 18px;
}
.lt-tong-dau {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.lt-ngay-thu {
  font-size: 22px;
  font-weight: 700;
  margin-top: 2px;
}
.lt-dks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.lt-dk {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  background: var(--bg);
}
.lt-dk.xong {
  border-color: var(--ok);
  background: var(--ok-bg);
}
.lt-dk-ten {
  font-size: 13px;
  color: var(--ink-2);
  min-height: 2.6em;
}
.lt-dk-so {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.lt-dk-so .bar {
  flex: 1;
}
.lt-ngays {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.lt-ngay {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.lt-ngay.hom-nay {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.lt-ngay.xong .lt-moc b::after {
  content: " ✓";
  color: var(--ok);
}
.lt-moc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lt-hn {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 99px;
  padding: 1px 8px;
}
.lt-noi h3 {
  margin: 0;
  font-size: 16px;
}
.lt-ds {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
ul.lt-ds.card {
  margin: 0;
  padding: 10px 14px;
}
.lt-viec {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}
.lt-viec:first-child {
  border-top: 0;
}
.lt-loai {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.lt-ten {
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.lt-ten:hover {
  color: var(--accent);
}
.lt-viec.kem .lt-ten {
  color: var(--ink-2);
}
.lt-giao {
  margin-bottom: 8px;
}
.lt-giao h2 {
  margin: 0 0 10px;
  font-size: 17px;
}
.lt-o {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-2);
  min-width: 0;
}
.lt-o select,
.lt-o input {
  min-height: 40px;
  max-width: 100%;
}
@media (max-width: 760px) {
  .lt-dks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lt-ngay {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .lt-moc {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
  }
  .lt-hn {
    margin-top: 0;
  }
  .lt-viec {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .lt-loai {
    grid-column: 1 / -1;
  }
  .lt-o,
  .lt-o select {
    width: 100%;
  }
}

/* ---------- Lớp nội dung bài học: kiến thức · áp dụng · câu nói ---------- */
.lop {
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 10px 0;
}
.lop > :last-child {
  margin-bottom: 0;
}
.lop-nhan {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.lop.kien-thuc {
  background: var(--card);
  border: 1px solid var(--line);
}
.lop.ap-dung {
  background: var(--info-bg);
}
.lop.ap-dung ul,
.tinh-huong ul {
  margin: 0;
  padding-left: 20px;
}
.lop.loi {
  background: var(--cream);
}
.cau-noi {
  margin: 6px 0;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink);
}
.cho-dien {
  font-style: normal;
  background: #fff3cd;
  border-radius: 4px;
  padding: 0 4px;
  color: var(--ink-2);
}
.tinh-huongs {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}
.tinh-huong {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  background: var(--card);
}
.th-q {
  font-weight: 600;
  margin-bottom: 8px;
}
.tinh-huong .lop-nhan {
  margin-top: 8px;
}
.dung-sai {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}
.ds-dung,
.ds-sai {
  border-radius: var(--r);
  padding: 10px 14px;
}
.ds-dung {
  background: var(--ok-bg);
}
.ds-sai {
  background: var(--warn-bg);
}
.dung-sai ul {
  margin: 0;
  padding-left: 20px;
}
.nguon-gc {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.nguon-gc summary {
  cursor: pointer;
}
.nguon-gc .gc {
  margin: 6px 0;
  padding-left: 18px;
  color: var(--ink-2);
}
.lich-ht {
  margin: 8px 0;
}
@media (max-width: 760px) {
  .dung-sai {
    grid-template-columns: 1fr;
  }
}

/* ---------- Lộ trình của tôi / Onboarding ---------- */
.lt-tt {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.lt-tt dt {
  font-size: 12px;
  color: var(--muted);
}
.lt-tt dd {
  margin: 2px 0 0;
  font-weight: 600;
}
.lt-tt .bar {
  display: block;
  margin-top: 6px;
}
.lt-tong .okbox,
.lt-tong .note {
  margin: 12px 0 0;
}
.lt-tiep {
  margin: 14px 0;
  border-left: 4px solid var(--accent);
}
.lt-tiep-ten {
  font-size: 19px;
  font-weight: 700;
  margin: 4px 0;
}
.lt-tiep .btn {
  margin-top: 10px;
}
.lt-ph.mo {
  border-color: var(--warn);
}
.lt-ph ul {
  margin: 4px 0 0;
  padding-left: 20px;
}
.lt-gds {
  display: grid;
  gap: 10px;
}
.lt-gd {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.lt-gd > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  list-style: none;
}
.lt-gd > summary::-webkit-details-marker {
  display: none;
}
.lt-gd-so {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--accent);
  font-weight: 700;
}
.lt-gd-so.xong {
  background: var(--ok-bg);
  color: var(--ok);
}
.lt-gd-ten {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lt-gd-than {
  padding: 0 14px 12px;
}
.lt-dau-ra {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.lt-dau-ra .lop-nhan {
  display: inline;
  margin-right: 6px;
}
.lt-muc {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.lt-muc .lt-loai {
  padding-top: 2px;
}
.lt-muc .lt-ten a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.lt-muc .lt-ten a:hover {
  color: var(--accent);
}
.lt-cuoi {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lt-khoa {
  font-size: 13px;
  color: var(--warn);
  margin-top: 2px;
}
.lt-tre {
  color: var(--warn);
  font-weight: 600;
}
.tt-hoan_thanh .lt-ten a {
  color: var(--muted);
}
.lt-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.lt-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.lt-form legend {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.lt-span {
  grid-column: 1 / -1;
}
.lt-chk {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 2px 16px 2px 0;
}
.lt-bs {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.lt-mau-gd {
  margin: 14px 0;
}
.lt-mau-gd-dau {
  margin-bottom: 6px;
}
.lt-mau-gd-dau textarea {
  width: 100%;
  margin-top: 6px;
}
@media (max-width: 760px) {
  .lt-tt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lt-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .lt-muc {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .lt-muc .lt-loai {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .lt-muc {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .lt-cuoi {
    justify-content: flex-start;
  }
}
