/* =============================================================
   GIAO DIỆN — nền xám nhạt, thẻ trắng, đỏ chủ đạo, chữ gọn
   -------------------------------------------------------------
   File này nạp SAU styles.css: chỉnh lại các khối cũ cho cùng một
   phong cách và chứa bố cục mới (thanh trên, chân trang đỏ đậm,
   trang chủ 3 cột, khoá học, phòng luyện, thư viện, đăng nhập).
   Lớp mới đều bắt đầu bằng "lb-" để không đụng các khối cũ.
   ============================================================= */

/* ---------- Icon nét mảnh ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.ic-emoji { width: 1.1em; height: 1.1em; vertical-align: -0.18em; }

/* ---------- Nền tảng ---------- */
body { font-size: 15px; letter-spacing: 0; }
h1, h2, h3, h4 { letter-spacing: 0; }
.page { max-width: 1240px; padding: 20px 20px 56px; }
.page-3 { max-width: 1320px; }
.page-dn { max-width: 1120px; }

.btn { border-radius: var(--r); font-weight: 600; gap: 7px; }
.btn:hover { transform: none; }
.btn-primary { box-shadow: none; }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: var(--bg-elev); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg-sunk); border-color: var(--line-strong); }
.btn-lg { border-radius: var(--r); }
.btn-icon { border-radius: var(--r); }
.btn .ic { width: 17px; height: 17px; }

.input, .select, .textarea,
.field > input:not([type=checkbox]):not([type=radio]), .field > select, .field > textarea { border-width: 1px; border-radius: var(--r); }
.input:focus, .select:focus, .textarea:focus,
.field > input:focus, .field > select:focus, .field > textarea:focus { box-shadow: 0 0 0 3px var(--brand-ring); }
.check { border-width: 1px; border-radius: var(--r); }

.card { border-radius: var(--r-lg); border-color: #eceef2; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
[data-theme='dark'] .card { border-color: var(--line); }
.badge { border-radius: 999px; font-weight: 600; }
.chip { border-width: 1px; border-radius: 999px; font-weight: 600; }
.chip.on { background: var(--brand); border-color: var(--brand); }
.progress > i { background: var(--brand); }
.notice { border-radius: var(--r); align-items: flex-start; }
.notice > .ic, .notice > span > .ic { width: 20px; height: 20px; margin-top: 1px; }
.empty .ico { color: color-mix(in srgb, var(--brand) 45%, var(--text-mute)); }
.empty .ico .ic { width: 46px; height: 46px; stroke-width: 1.5; }
.skeleton { border-radius: var(--r-lg); }
.modal { border-radius: 12px; }
.modal header h3 { font-weight: 800; }
.tbl th { letter-spacing: .02em; }
::selection { background: var(--brand-ring); }

/* Tiêu đề khối trong trang học sinh: chữ đỏ, vạch đứng bên trái (không áp cho trang quản trị) */
.page:not(.page-qt) .section-title h2 {
  position: relative; padding-left: 13px; font-size: 18px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.page:not(.page-qt) .section-title h2::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--brand);
}

/* =============================================================
   THANH TRÊN CÙNG
   ============================================================= */
.lb-top {
  position: sticky; top: 0; z-index: 40; background: var(--bg-elev);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
.lb-top-in {
  max-width: 1320px; margin: 0 auto; height: var(--header-h); padding: 0 20px;
  display: grid; grid-template-columns: auto minmax(170px, 250px) 1fr auto; align-items: center; gap: 18px;
}
.lb-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); min-width: 0; }
.lb-logo-o { width: 38px; height: 38px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-content: center; flex: none; }
.lb-logo-o .ic { width: 22px; height: 22px; }
.lb-logo-anh { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; }
.lb-logo-ten { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.lb-tim {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 40px;
  padding: 0 12px 0 15px; border: 0; border-radius: 8px; cursor: text; font-size: 14.5px; color: var(--text-mute);
  background: color-mix(in srgb, var(--brand) 6%, var(--bg-sunk));
}
.lb-tim:hover { background: color-mix(in srgb, var(--brand) 10%, var(--bg-sunk)); }
.lb-tim .ic { color: var(--brand); width: 20px; height: 20px; }
.lb-nav { display: flex; justify-content: center; gap: 4px; height: 100%; }
.lb-nav a { position: relative; width: 66px; display: grid; place-content: center; color: #8b9099; transition: color .15s, background .15s; }
.lb-nav a .ic { width: 25px; height: 25px; stroke-width: 1.8; }
.lb-nav a:hover { color: var(--text); background: var(--bg-sunk); }
.lb-nav a.on { color: var(--brand); }
.lb-nav a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.lb-top-r { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.lb-ma { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--brand); font-weight: 600; font-size: 14.5px; cursor: pointer; padding: 6px 4px; white-space: nowrap; }
.lb-ma .ic { width: 20px; height: 20px; }
.lb-ma:hover { text-decoration: underline; }
.lb-gach { width: 1px; height: 26px; background: var(--line-strong); }
.lb-tim-nho { display: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--brand); cursor: pointer; place-content: center; }
.lb-tim-nho .ic { width: 22px; height: 22px; }
.lb-nut-dn { padding: 9px 20px; }
.lb-toi { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; padding: 4px; color: var(--text-soft); border-radius: 999px; }
.lb-toi .avatar { width: 36px; height: 36px; font-size: 15px; background: linear-gradient(145deg, var(--brand), var(--brand-700)); color: #fff; box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--brand-ring); }
.lb-toi-ten { font-weight: 600; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-toi > .ic { width: 18px; height: 18px; }
.usermenu .panel { width: 250px; border-radius: 10px; }
.usermenu .panel .head { display: flex; align-items: center; gap: 10px; }
.usermenu .panel .head .avatar { width: 38px; height: 38px; background: linear-gradient(145deg, var(--brand), var(--brand-700)); color: #fff; }
.usermenu .panel a .ic, .usermenu .panel button .ic { width: 18px; height: 18px; color: var(--text-mute); }

/* Menu đáy (điện thoại) — chỉ icon */
.botnav a .ic { width: 24px; height: 24px; stroke-width: 1.9; }
.botnav a b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.botnav a { place-content: center; height: 46px; }
.botnav a.on { color: var(--brand); background: transparent; }
.botnav a.on::before { content: ''; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.botnav a { position: relative; justify-items: center; }

/* =============================================================
   CHÂN TRANG — nền đỏ đậm
   ============================================================= */
.lb-chan { background: var(--brand-700); color: rgba(255, 255, 255, .86); margin-top: 36px; }
.lb-chan-in { max-width: 1320px; margin: 0 auto; padding: 36px 20px 22px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.lb-chan h4 {
  color: #fff; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .25); min-width: 120px;
}
.lb-chan-cot { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.lb-chan-cot a { color: rgba(255, 255, 255, .86); font-size: 14.5px; }
.lb-chan-cot a:hover { color: #fff; text-decoration: underline; }
.lb-chan-logo { display: flex; align-items: center; gap: 10px; color: #fff !important; font-size: 17px; text-decoration: none !important; }
.lb-chan-logo .lb-logo-o { background: #fff; color: var(--brand); }
.lb-chan-dong { display: flex; align-items: center; gap: 9px; }
.lb-chan-dong .ic { width: 17px; height: 17px; opacity: .92; }
.lb-chan p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .78); max-width: 340px; line-height: 1.6; }
.lb-chan-phu { font-size: 13.5px !important; }
.lb-chan-cuoi { border-top: 1px solid rgba(255, 255, 255, .16); text-align: center; padding: 14px 20px; font-size: 13px; color: rgba(255, 255, 255, .7); }

/* =============================================================
   NÚT LIÊN HỆ TRÒN (góc phải)
   ============================================================= */
.lb-noi { position: fixed; right: 18px; bottom: 24px; z-index: 44; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-noi-o {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-content: center; color: #fff; border: 0; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18); transition: transform .15s ease;
}
.lb-noi-o:hover { transform: scale(1.07); }
.lb-noi-o .ic { width: 24px; height: 24px; }
.lb-noi-zalo { background: #0068ff; }
.lb-noi-zalo b { font-size: 12.5px; font-weight: 800; letter-spacing: -.2px; }
.lb-noi-messenger { background: linear-gradient(45deg, #0a7cff, #a334fa 62%, #ff5c87); }
.lb-noi-facebook { background: #1877f2; }
.lb-noi-goi { background: #16a34a; }
.lb-noi-len { display: none; background: var(--bg-elev); color: var(--text-soft); border: 1px solid var(--line); width: 44px; height: 44px; }
.lb-noi-len.hien { display: grid; }
body.exam-mode .lb-noi { display: none; }

/* =============================================================
   MẢNH DÙNG CHUNG
   ============================================================= */
.lb-khoi { background: var(--bg-elev); border-radius: var(--r-lg); padding: 18px; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); margin-bottom: 16px; }
[data-theme='dark'] .lb-khoi { border: 1px solid var(--line); }
.lb-khoi-chan { display: flex; justify-content: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.lb-tde { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.lb-tde h2 {
  position: relative; padding-left: 14px; font-size: 19px; font-weight: 800; color: var(--m, var(--brand));
  text-transform: uppercase; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; line-height: 1.3;
}
.lb-tde h2::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--m, var(--brand)); }
.lb-tde h2 .ic { width: 22px; height: 22px; }
.lb-tde-lon { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.lb-tde-lon h1 { position: relative; padding-left: 16px; font-size: 26px; font-weight: 800; text-transform: uppercase; }
.lb-tde-lon h1::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 4px; background: var(--brand); }
.lb-tde-lon p { margin: 6px 0 0 16px; color: var(--text-mute); }
.lb-tde-lon a { color: var(--brand); font-weight: 600; }
.lb-xem { display: inline-flex; align-items: center; gap: 2px; font-style: italic; color: var(--text-mute); font-size: 14px; white-space: nowrap; }
.lb-xem:hover { color: var(--brand); }
.lb-xem .ic { width: 16px; height: 16px; }
.lb-nho { font-size: 14px; font-weight: 800; text-transform: uppercase; color: var(--brand); margin: 18px 8px 10px; letter-spacing: .02em; }
.lb-h1 { font-size: 28px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .01em; }
.lb-h2 { font-size: 21px; font-weight: 800; }
.lb-ghi { font-size: 14px; color: var(--text-mute); display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; }
.lb-ghi a { color: var(--brand); font-weight: 600; }
.lb-o-trong {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg); padding: 22px 16px; color: var(--text-mute); font-size: 13.5px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--brand) 3%, transparent) 10px 20px);
}
.lb-o-trong > .ic { width: 30px; height: 30px; color: color-mix(in srgb, var(--brand) 50%, var(--text-mute)); }
.lb-o-trong b { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-size: 13px; }
.lb-o-trong:hover { border-color: var(--brand); }
.lb-o-banner { margin-top: 16px; }
.lb-o-dem { margin-top: 16px; }

/* Đường dẫn: 🏠 › Khoá học › Tên */
.lb-vet { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; font-size: 15px; color: var(--brand); }
.lb-vet a { color: var(--brand); display: inline-flex; align-items: center; }
.lb-vet a:hover { text-decoration: underline; }
.lb-vet > a:first-child .ic { width: 23px; height: 23px; }
.lb-vet b { font-weight: 600; }
.lb-vet-gach { color: var(--text-mute); }

/* Nhãn trạng thái dạng viên thuốc có viền */
.lb-nhan { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; white-space: nowrap; line-height: 1.4; }
.lb-nhan.xam { color: var(--text-soft); border-color: var(--line-strong); background: var(--bg-elev); }
.lb-nhan.lam { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.lb-nhan.xanh { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.lb-nhan.do { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-soft); }
.lb-nhan.vang { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.lb-nhan.hong { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); background: var(--brand-soft); }
[data-theme='dark'] .lb-nhan.lam { color: #93c5fd; border-color: #1e3a8a; background: rgba(59, 130, 246, .12); }
.lb-nhan-vien { display: inline-flex; padding: 3px 8px; font-size: 12px; font-weight: 700; color: var(--brand); border: 1px solid var(--brand); border-radius: 3px; background: var(--bg-elev); white-space: nowrap; }
.lb-nhan-do { display: inline-flex; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 4px; }
.lb-nhan-xanh { display: inline-flex; padding: 2px 8px; font-size: 11.5px; font-weight: 700; color: var(--ok); background: var(--ok-soft); border-radius: 4px; white-space: nowrap; }

/* Ô tìm kiếm có kính lúp bên phải */
.lb-o-tim {
  display: flex; align-items: center; gap: 8px; min-width: 260px; height: 42px; padding: 0 14px;
  border-radius: var(--r); background: var(--bg-elev); border: 1px solid var(--line); cursor: text;
}
.lb-o-tim:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.lb-o-tim input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 14.5px; color: var(--text); }
.lb-o-tim .ic { order: 2; color: var(--brand); width: 19px; height: 19px; }
.lb-o-tim-rong { width: 100%; margin-bottom: 14px; }

/* =============================================================
   TRANG CHỦ — 3 CỘT
   ============================================================= */
.lb-3 { display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.lb-trai, .lb-phai {
  position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 28px);
  overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
}
.lb-trai::-webkit-scrollbar, .lb-phai::-webkit-scrollbar { display: none; }
.lb-giua { min-width: 0; }

/* Cột trái */
.lb-toi-the { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.lb-toi-the .avatar { width: 46px; height: 46px; font-size: 18px; background: linear-gradient(145deg, var(--brand), var(--brand-700)); color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand-ring); }
.lb-toi-the b { display: block; color: var(--brand); font-size: 15.5px; line-height: 1.3; }
.lb-toi-the small { display: block; color: var(--text-mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.lb-toi-the > span:last-child { min-width: 0; }
.lb-toi-khach > .ic { width: 30px; height: 30px; color: var(--brand); flex: none; }
.lb-menu { display: flex; flex-direction: column; gap: 2px; }
.lb-menu a { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: var(--r-lg); color: var(--text); font-size: 16px; font-weight: 500; }
.lb-menu a > .ic { width: 25px; height: 25px; color: var(--brand); }
.lb-menu a:hover { background: var(--bg-elev); color: var(--brand); }
.lb-lk-tron { width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center; color: #fff; font-style: normal; font-size: 9.5px; font-weight: 800; flex: none; }
.lb-lk-tron .ic { width: 16px; height: 16px; }
.lk-zalo .lb-lk-tron { background: #0068ff; }
.lk-messenger .lb-lk-tron { background: linear-gradient(45deg, #0a7cff, #a334fa 62%, #ff5c87); }
.lk-facebook .lb-lk-tron { background: #1877f2; }
.lk-youtube .lb-lk-tron { background: #e11d1d; }
.lb-menu-lk a { font-size: 15.5px; padding: 8px; }
.lb-thithu-anh { display: block; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 1px 3px rgba(17, 24, 39, .08); }
.lb-thithu-anh img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .3s; }
.lb-thithu-anh:hover img { transform: scale(1.03); }
.lb-thithu {
  display: block; position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 16px; min-height: 130px;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--brand-tint) 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent);
}
.lb-thithu small { display: block; font-weight: 800; text-transform: uppercase; color: var(--text-soft); font-size: 13px; letter-spacing: .02em; }
.lb-thithu b { display: block; font-size: 20px; font-weight: 800; color: var(--brand); line-height: 1.2; margin: 3px 0 14px; max-width: 78%; }
.lb-thithu-nut { position: relative; z-index: 1; display: inline-flex; gap: 6px; align-items: center; background: var(--brand); color: #fff; padding: 7px 12px; border-radius: var(--r); font-weight: 700; font-size: 13.5px; }
.lb-thithu-nut .ic { width: 15px; height: 15px; }
.lb-thithu-ic { position: absolute; right: -10px; bottom: -12px; width: 96px; height: 96px; color: var(--brand); opacity: .12; }

/* Cột giữa */
.lb-tb { margin-bottom: 16px; }
.lb-banner { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-elev); box-shadow: 0 1px 3px rgba(17, 24, 39, .06); margin-bottom: 16px; }
.lb-banner-ray { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-banner-ray::-webkit-scrollbar { display: none; }
.lb-banner-o { flex: 0 0 100%; scroll-snap-align: start; position: relative; aspect-ratio: 8/3; display: block; }
.lb-banner-o img { width: 100%; height: 100%; object-fit: cover; }
.lb-banner-chu { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, .58)); color: #fff; }
.lb-banner-chu b { display: block; font-size: 20px; font-weight: 800; }
.lb-banner-chu span { font-size: 14px; opacity: .92; }
.lb-banner-cham { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.lb-banner-cham button { width: 8px; height: 6px; border-radius: 99px; border: 0; padding: 0; cursor: pointer; background: rgba(255, 255, 255, .55); transition: width .2s, background .2s; }
.lb-banner-cham button.on { width: 26px; background: #fff; }
.lb-chao { border-top: 3px solid var(--brand); padding: 26px 24px; }
.lb-chao h1 { font-size: 26px; font-weight: 800; }
.lb-chao p { color: var(--text-soft); margin: 8px 0 0; font-size: 15.5px; }
.lb-chao-nut { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.lb-gioi-thieu { font-size: 15px; }
.lb-chi-dt { display: none; }
.lb-dt-nut { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.lb-dt-nut .btn { height: 46px; font-size: 14.5px; padding: 0 10px; }
.lb-dt-nut .btn:only-child { grid-column: 1 / -1; }

/* Lưới khoá học: ảnh vuông + tên + giáo viên */
.lb-luoi-khoa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
.lb-luoi-khoa-rong { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 20px; }
.lb-khoa { display: flex; flex-direction: column; gap: 6px; color: var(--text); min-width: 0; }
.lb-khoa-anh { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-sunk); box-shadow: 0 1px 3px rgba(17, 24, 39, .1); container-type: inline-size; }
.lb-khoa-anh img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.lb-khoa:hover .lb-khoa-anh img { transform: scale(1.04); }
.lb-khoa-ten { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.lb-khoa:hover .lb-khoa-ten { color: var(--brand); }
.lb-khoa-gv { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-mute); min-width: 0; }
.lb-khoa-gv .ic { width: 15px; height: 15px; color: var(--brand); }
.lb-khoa-td { display: block; height: 4px; border-radius: 4px; background: var(--bg-sunk); overflow: hidden; margin-top: 2px; }
.lb-khoa-td i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.lb-khoa-pt { font-size: 12px; color: var(--text-mute); }
.lb-the-nhan {
  position: absolute; top: 8px; right: 8px; z-index: 2; background: #fff; color: var(--brand); border: 1px solid var(--brand);
  font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.lb-the-nhan.xanh { color: var(--ok); border-color: var(--ok); }

/* Bìa chữ — khi khoá chưa có ảnh bìa */
.lb-bia {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10%; color: #fff; overflow: hidden;
  background:
    radial-gradient(circle at 25% 15%, color-mix(in srgb, var(--m) 55%, #fff) 0, transparent 52%),
    linear-gradient(160deg, var(--m), color-mix(in srgb, var(--m) 60%, #000));
}
.lb-bia::after { content: ''; position: absolute; inset: 7%; border: 1.5px solid rgba(255, 255, 255, .38); border-radius: 6px; pointer-events: none; }
.lb-bia-tren { font-size: clamp(8px, 6cqi, 12px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.lb-bia b {
  font-size: clamp(13px, 10cqi, 26px); font-weight: 900; text-transform: uppercase; line-height: 1.12; margin: 7% 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.lb-bia-khu { font-size: clamp(9px, 6cqi, 12px); font-weight: 700; background: rgba(255, 255, 255, .22); border-radius: 99px; padding: 3px 10px; }

/* Dải trượt ngang (giáo viên, vinh danh) */
.lb-truot { position: relative; }
.lb-truot-ray {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px;
}
.lb-truot-ray::-webkit-scrollbar { display: none; }
.lb-truot-ray > * { scroll-snap-align: start; min-width: 0; }
.lb-truot[data-truot="vd"] .lb-truot-ray { grid-auto-columns: calc((100% - 2 * 14px) / 3); }
.lb-truot-nut {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow-2); display: grid; place-content: center;
  cursor: pointer; color: var(--text-soft); transition: opacity .2s;
}
.lb-truot-nut:hover { color: var(--brand); }
.lb-truot-nut.lui { left: -14px; }
.lb-truot-nut.toi { right: -14px; }
.lb-truot.dau .lui, .lb-truot.cuoi .toi { opacity: 0; pointer-events: none; }

/* Giáo viên */
.lb-gv { display: block; color: var(--text); min-width: 0; }
.lb-gv-anh {
  position: relative; aspect-ratio: 3/4; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 45%, #fff), var(--brand));
}
.lb-gv-anh img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.lb-gv:hover .lb-gv-anh img { transform: scale(1.03); }
.lb-gv-trong { position: absolute; inset: 0; display: grid; place-content: center; color: rgba(255, 255, 255, .8); }
.lb-gv-trong .ic { width: 64px; height: 64px; stroke-width: 1.3; }
.lb-gv-ten {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 10px 12px; color: #fff; font-weight: 700;
  text-align: center; font-size: 14.5px; line-height: 1.3; background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.lb-gv-mon {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; z-index: 2;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.lb-gv-mon .ic { width: 13px; height: 13px; }
.lb-luoi-gv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.lb-gv-du { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 12px 16px; background: var(--bg-elev); }
.lb-gv-du h3 { font-size: 16.5px; font-weight: 700; margin: 14px 2px 3px; }
.lb-gv-cd { color: var(--brand); font-weight: 600; font-size: 14px; margin: 0 2px; }
.lb-gv-gt { color: var(--text-mute); font-size: 13.5px; margin: 8px 2px 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Vinh danh học viên */
.lb-vd { margin: 0; min-width: 0; }
.lb-vd-anh { aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-sunk); box-shadow: 0 1px 3px rgba(17, 24, 39, .1); }
.lb-vd-anh img { width: 100%; height: 100%; object-fit: cover; }
.lb-vd-chu {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px;
  color: #fff; background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--brand) 60%, #fff) 0, transparent 60%), linear-gradient(160deg, var(--brand), var(--brand-700));
}
.lb-vd-chu .ic { width: 46px; height: 46px; opacity: .9; }
.lb-vd-chu b { font-size: 22px; font-weight: 900; line-height: 1.15; }
.lb-vd-chu span { font-size: 14px; opacity: .92; }
.lb-vd figcaption { padding: 9px 2px 0; display: flex; flex-direction: column; gap: 1px; }
.lb-vd figcaption b { color: var(--brand); font-weight: 800; font-size: 15px; }
.lb-vd figcaption span { font-weight: 600; font-size: 14px; }
.lb-vd figcaption small { color: var(--text-mute); font-size: 12.5px; }

/* Gói đề — thẻ bảng thông tin */
.lb-luoi-goi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lb-luoi-goi-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.lb-goi, .lb-de {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
  display: flex; flex-direction: column; min-width: 0; transition: box-shadow .2s ease;
}
.lb-goi:hover, .lb-de:hover { box-shadow: 0 10px 26px rgba(17, 24, 39, .10); }
.lb-goi h3, .lb-de h3 { font-size: 17px; font-weight: 700; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); line-height: 1.35; }
.lb-goi h3 a:hover { color: var(--brand); }
.lb-goi dl, .lb-de dl { margin: 0; padding: 14px 20px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.lb-goi dl > div, .lb-de dl > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.lb-goi dt, .lb-de dt { color: var(--text-mute); }
.lb-goi dd, .lb-de dd { margin: 0; font-weight: 600; text-align: right; }
.lb-goi footer, .lb-de footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px 16px; border-top: 1px solid var(--line); }
.lb-goi footer .btn, .lb-de footer .btn { padding: 9px 18px; font-size: 14.5px; }
.lb-goi-td { flex: 1; min-width: 0; font-size: 13px; color: var(--text-mute); }
.lb-goi-td b { color: var(--brand); }
.lb-goi-td i { display: block; height: 6px; border-radius: 6px; background: var(--bg-sunk); margin-top: 5px; overflow: hidden; }
.lb-goi-td i b { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.lb-luoi-de { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.lb-de-mo { padding: 0 20px; margin: -4px 0 12px; font-size: 13px; color: var(--text-mute); }
.lb-de-nut .ic { width: 13px; height: 13px; fill: currentColor; }
.lb-xem-ls { color: var(--brand); font-weight: 600; font-size: 14px; }
.lb-xem-ls:hover { text-decoration: underline; }
.lb-de-khoa { display: inline-flex; align-items: center; gap: 6px; color: var(--text-mute); font-weight: 600; font-size: 13.5px; }
.lb-de-khoa .ic { width: 16px; height: 16px; }
.lb-goi-dau { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.lb-goi-dau h1 { flex: 1; min-width: 220px; font-size: 24px; font-weight: 800; }
.lb-lui { width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; color: var(--text); }
.lb-lui:hover { background: var(--bg-elev); color: var(--brand); }
.lb-lui .ic { width: 22px; height: 22px; }
.lb-goi-tt { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 14px 54px; font-size: 14px; color: var(--text-soft); }
.lb-goi-tt > span { display: inline-flex; align-items: center; gap: 6px; }
.lb-goi-tt .ic { width: 16px; height: 16px; color: var(--brand); }
.lb-goi-mo { margin: -4px 0 16px 54px; color: var(--text-mute); max-width: 760px; }
.lb-ds-goi-nho { display: flex; flex-direction: column; gap: 8px; }
.lb-goi-nho { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.lb-goi-nho:hover { border-color: var(--brand); }
.lb-goi-nho > .ic { color: var(--brand); width: 20px; height: 20px; }
.lb-goi-nho b { flex: 1; min-width: 160px; }
.lb-goi-nho span { color: var(--text-mute); font-size: 13.5px; }

/* Thẻ tài liệu: ảnh bìa vuông + nhãn loại file */
.lb-luoi-tl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
.lb-luoi-tl-4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px 20px; }
.lb-tl { display: flex; flex-direction: column; gap: 7px; cursor: pointer; color: var(--text); min-width: 0; outline: none; }
.lb-tl-anh { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-elev); box-shadow: 0 1px 3px rgba(17, 24, 39, .1); }
.lb-tl-anh img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.lb-tl:hover .lb-tl-anh img { transform: scale(1.04); }
.lb-tl-trong { position: absolute; inset: 0; display: grid; place-content: center; color: color-mix(in srgb, var(--brand) 35%, var(--line-strong)); background: linear-gradient(180deg, var(--bg-elev), var(--bg-sunk)); }
.lb-tl-trong .ic { width: 56px; height: 56px; stroke-width: 1.2; }
.lb-tl-loai { position: absolute; top: 8px; right: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 3px; letter-spacing: .02em; }
.lb-tl-khoa { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-content: center; background: rgba(17, 24, 39, .68); color: #fff; }
.lb-tl-khoa .ic { width: 14px; height: 14px; }
.lb-tl-mien { position: absolute; top: 8px; left: 8px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 3px; }
.lb-tl-ten { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-tl:hover .lb-tl-ten, .lb-tl:focus-visible .lb-tl-ten { color: var(--brand); }
.lb-tl-chan { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-mute); }
.lb-tl-xem { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); }
.lb-tl-xem .ic { width: 14px; height: 14px; }

/* Cột phải */
.lb-phai-nut { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.lb-phai-nut .btn { height: 46px; padding: 0 10px; font-size: 14px; border-radius: var(--r); white-space: nowrap; min-width: 0; }
.lb-phai-nut .btn .ic { width: 19px; height: 19px; }
.lb-phai-nut .btn:only-child { grid-column: 1 / -1; }
.lb-tv-tde { font-size: 19px; font-weight: 800; color: var(--brand); text-transform: uppercase; margin: 2px 0 14px; letter-spacing: .01em; }
.lb-o {
  width: 100%; height: 44px; border: 1px solid transparent; background: var(--bg-sunk); border-radius: var(--r);
  padding: 0 14px; font: inherit; font-size: 14.5px; color: var(--text); margin-bottom: 12px; outline: none; display: block;
}
select.lb-o {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
textarea.lb-o { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; line-height: 1.55; }
.lb-o:focus { border-color: var(--brand); background-color: var(--bg-elev); box-shadow: 0 0 0 3px var(--brand-ring); }
.lb-o::placeholder { color: var(--text-mute); }
.field > .lb-o { margin-bottom: 0; }
.lb-tv-gui { height: 46px; font-size: 16px; margin-top: 2px; }
.lb-ho-tro p { color: var(--text-soft); font-size: 14px; margin: 0 0 12px; }
.lb-ho-tro-ds { display: flex; flex-direction: column; gap: 8px; }
.lb-ho-tro-ds a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--bg-sunk); font-weight: 600; font-size: 14px; }
.lb-ho-tro-ds a:hover { color: var(--brand); }
.lb-ho-tro-ds .ic { color: var(--brand); width: 18px; height: 18px; }

/* Đếm ngược ngày thi */
.lb-dem-ds { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.lb-dem {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 16px 16px 14px;
  display: flex; flex-direction: column; align-items: stretch; gap: 12px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--m) 72%, #fff), var(--m));
}
.lb-dem-nen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-dem.co-anh::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--m) 55%, transparent), color-mix(in srgb, var(--m) 90%, transparent)); }
.lb-dem > .lb-dem-ten, .lb-dem > .lb-dem-so { position: relative; z-index: 2; }
.lb-dem-ten { min-width: 0; }
.lb-dem-ten b { display: block; font-size: 22px; font-weight: 900; line-height: 1.15; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.lb-dem-ten small { display: block; font-size: 12.5px; opacity: .92; margin-top: 2px; }
.lb-dem-so { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lb-dem-so span { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.lb-dem-so b { width: 100%; height: 44px; display: grid; place-content: center; background: #fff; color: var(--m); border-radius: var(--r); font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.lb-dem-so small { font-size: 11px; font-weight: 600; opacity: .95; }

/* Form tư vấn đầy đủ */
.lb-tv-du { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; padding: 26px 28px; border-top: 3px solid var(--brand); }
.lb-tv-du-l h2 { font-size: 23px; font-weight: 800; color: var(--brand); text-transform: uppercase; }
.lb-tv-du-l p { color: var(--text-soft); margin: 10px 0 0; }
.lb-tv-kenh { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.lb-tv-kenh a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--bg-sunk); font-weight: 600; font-size: 14px; }
.lb-tv-kenh a:hover { color: var(--brand); }
.lb-tv-kenh .ic { color: var(--brand); width: 18px; height: 18px; }
.lb-tv-ghi { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--text-mute); }
.lb-tv-ghi a { color: var(--brand); font-weight: 600; }
.ck-cam-on-ic { color: var(--ok); }
.ck-cam-on-ic .ic { width: 48px; height: 48px; }

/* Hỏi đáp */
.hd-o { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); }
.hd-o summary i .ic { width: 18px; height: 18px; transition: transform .2s; }
.hd-o[open] summary i .ic { transform: rotate(45deg); }
.lb-hd-trang { padding: 24px 26px; }

/* =============================================================
   2 CỘT: DANH MỤC BÊN TRÁI (khoá học, tài liệu)
   ============================================================= */
.lb-2 { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 34px; align-items: start; }
.lb-dm { position: sticky; top: calc(var(--header-h) + 16px); }
.lb-dm h3 { color: var(--brand); font-size: 20px; font-weight: 800; margin: 0 0 12px; }
.lb-dm-o {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 11px 14px; border: 0; border-radius: var(--r);
  background: var(--bg-elev); cursor: pointer; text-align: left; margin-bottom: 10px; color: var(--text);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05); transition: background .15s;
}
.lb-dm-o:hover { background: color-mix(in srgb, var(--brand) 5%, var(--bg-elev)); }
.lb-dm-o.on { background: color-mix(in srgb, var(--brand) 82%, #fff); color: #fff; }
.lb-dm-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center; background: var(--brand); color: #fff; flex: none; }
.lb-dm-ic .ic { width: 22px; height: 22px; }
.lb-dm-o.on .lb-dm-ic { background: #fff; color: var(--brand); }
.lb-dm-chu { min-width: 0; }
.lb-dm-chu b { display: block; font-size: 14.5px; font-weight: 700; text-transform: uppercase; line-height: 1.3; }
.lb-dm-chu small { font-size: 12.5px; opacity: .75; }
.lb-dm-loc { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-soft); padding: 6px 4px; cursor: pointer; }
.lb-dm-loc input { accent-color: var(--brand); margin-top: 3px; }
.lb-2-noi { min-width: 0; }
.lb-2-dau { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.lb-2-cong { display: flex; gap: 10px; flex-wrap: wrap; }
.lb-2-cong .tv-xep { width: auto; height: 42px; }

/* =============================================================
   ĐỀ CƯƠNG MỘT KHOÁ (khách)
   ============================================================= */
.lb-dc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.lb-dc-bia {
  position: relative; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 16/9; display: flex; align-items: center;
  justify-content: center; gap: 6%; padding: 6%; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--m) 16%, var(--bg-elev)) 0, color-mix(in srgb, var(--m) 6%, var(--bg-sunk)) 70%);
}
.lb-dc-bia-mo { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(30px) saturate(1.2); opacity: .5; }
.lb-dc-bia-anh, .lb-dc-bia-chu { position: relative; width: 34%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); box-shadow: 0 14px 34px rgba(0, 0, 0, .2); flex: none; overflow: hidden; container-type: inline-size; }
.lb-dc-bia-ten { position: relative; max-width: 52%; }
.lb-dc-bia-ten h1 { font-size: clamp(20px, 2.4vw, 30px); font-weight: 800; margin-top: 10px; line-height: 1.2; }
.lb-dc-gv { display: flex; gap: 16px; align-items: center; }
.lb-dc-gv-logo .lb-logo-o, .lb-dc-gv-logo .lb-logo-anh { width: 58px; height: 58px; border-radius: 50%; box-shadow: 0 0 0 3px var(--brand-soft); }
.lb-dc-gv-logo .lb-logo-o .ic { width: 28px; height: 28px; }
.lb-dc-gv b { font-size: 17px; }
.lb-dc-gv p { margin: 6px 0 0; color: var(--text-soft); font-size: 14px; }
.lb-dc-so { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lb-dc-so > div:not(.lb-dc-nut) { text-align: center; background: var(--bg-sunk); border-radius: var(--r); padding: 12px 6px; }
.lb-dc-so b { display: block; font-size: 22px; font-weight: 800; color: var(--brand); }
.lb-dc-so span { font-size: 12.5px; color: var(--text-mute); }
.lb-dc-nut { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.lb-dc-phai { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 28px); overflow-y: auto; scrollbar-width: thin; }
.lb-dc-phai-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lb-dc-phai-dau b { font-size: 18px; }
.lb-dc-nhac { color: var(--brand); background: var(--brand-tint); border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); border-radius: var(--r); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; line-height: 1.55; }
.lb-chuong-ds { display: flex; flex-direction: column; gap: 10px; }
.lb-chuong summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  background: var(--brand-700); color: #fff; padding: 11px 14px; border-radius: var(--r); font-weight: 600; font-size: 14.5px;
}
.lb-chuong summary::-webkit-details-marker { display: none; }
.lb-chuong summary i { display: grid; }
.lb-chuong summary .ic { width: 18px; height: 18px; }
.lb-chuong .dong, .lb-chuong[open] .mo { display: block; }
.lb-chuong .mo, .lb-chuong[open] .dong { display: none; }
.lb-bai.lesson-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 6px 0 0 10px; border-top: 0;
  background: var(--brand-tint); border-radius: var(--r-sm); font-size: 14px; cursor: pointer; opacity: 1;
}
.lb-bai.lesson-row:hover { background: color-mix(in srgb, var(--brand) 11%, var(--bg-elev)); }
.lb-bai .ic { color: var(--brand); width: 19px; height: 19px; }
.lb-bai b { flex: 1; min-width: 0; font-weight: 500; }
.lb-bai small { color: var(--text-mute); font-size: 12px; }

/* =============================================================
   PHÒNG LUYỆN — ảnh lớn đầu trang + nút vào từng phòng
   ============================================================= */
.lb-pl-hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-elev);
  box-shadow: 0 1px 3px rgba(17, 24, 39, .06); min-height: 300px; display: grid; place-items: center;
  text-align: center; padding: 44px 20px; margin-bottom: 18px;
}
.lb-pl-hero:not(.co-anh) {
  background:
    radial-gradient(ellipse at 15% 20%, var(--brand-soft) 0, transparent 45%),
    radial-gradient(ellipse at 85% 80%, color-mix(in srgb, var(--hsa) 12%, transparent) 0, transparent 45%),
    var(--bg-elev);
}
.lb-pl-hero-anh { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-pl-hero.co-anh::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .93) 0, rgba(255, 255, 255, .78) 38%, rgba(255, 255, 255, .1) 78%); }
[data-theme='dark'] .lb-pl-hero.co-anh::after { background: radial-gradient(ellipse at center, rgba(23, 26, 32, .94) 0, rgba(23, 26, 32, .8) 40%, rgba(23, 26, 32, .2) 80%); }
.lb-pl-hero-chu { position: relative; z-index: 1; max-width: 660px; }
.lb-pl-kicker { display: block; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-soft); }
.lb-pl-hero h1 {
  font-size: 40px; font-weight: 900; color: var(--brand); text-transform: uppercase; margin: 10px 0 14px;
  display: flex; justify-content: center; align-items: center; gap: 12px; letter-spacing: .01em;
}
.lb-pl-hero h1::before { content: ''; width: 6px; height: 34px; border-radius: 3px; background: var(--brand); }
.lb-pl-hero p { color: var(--text-soft); font-size: 15.5px; margin: 0 auto; max-width: 600px; }
.lb-pl-vao { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.lb-pl-nut {
  min-width: 220px; padding: 16px 26px; border: 0; border-radius: 4px; color: #fff; font-weight: 800; font-size: 16px;
  text-transform: uppercase; cursor: pointer; background: var(--brand); box-shadow: 0 6px 16px var(--brand-ring); letter-spacing: .02em;
  transition: transform .15s ease, filter .15s ease;
}
.lb-pl-nut:hover { transform: translateY(-2px); filter: brightness(1.05); }
.lb-pl-nut.k-hsa { background: var(--hsa); box-shadow: 0 6px 16px rgba(46, 125, 91, .3); }
.lb-pl-nut.k-toan { background: #1d4ed8; box-shadow: 0 6px 16px rgba(29, 78, 216, .25); }
.lb-pl-nut.k-khac { background: #475569; box-shadow: none; }
.lb-pl-phu { margin-top: 16px; font-size: 14px; color: var(--text-mute); }
.lb-pl-phu a { color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.lb-so-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.lb-so-4 > div { background: var(--bg-elev); border-radius: var(--r-lg); padding: 16px 10px; text-align: center; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.lb-so-4 b { display: block; font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.lb-so-4 span { font-size: 13px; color: var(--text-mute); }
.che-do-giai { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.che-do-giai .cd-o { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r); background: var(--bg-sunk); }
.che-do-giai .cd-o b { display: flex; align-items: center; gap: 7px; }
.che-do-giai .cd-o .ic { color: var(--brand); width: 18px; height: 18px; }
.che-do-giai .cd-nhac { grid-column: 1 / -1; }
.hm-1 { background: color-mix(in srgb, var(--brand) 30%, var(--bg-sunk)); }
.hm-2 { background: color-mix(in srgb, var(--brand) 60%, var(--bg-sunk)); }
.hm-3 { background: var(--brand); }

/* =============================================================
   ĐĂNG NHẬP
   ============================================================= */
.lb-dn {
  display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-elev); border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(17, 24, 39, .08); margin: 20px auto 10px; max-width: 1040px;
}
.lb-dn-trai {
  padding: 46px 38px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--brand-tint), var(--bg-elev));
}
.lb-dn-trai h1 { font-size: 30px; font-weight: 900; color: var(--brand); text-transform: uppercase; line-height: 1.2; }
.lb-dn-trai p { color: var(--text-soft); margin: 10px 0 22px; font-size: 15px; }
.lb-dn-anh { max-width: 100%; max-height: 300px; object-fit: contain; border-radius: 10px; }
.lb-dn-minh svg { width: min(340px, 100%); height: auto; display: block; }
.lb-dn-phai { padding: 46px 46px 40px; }
.lb-dn-phai h2 { text-align: center; font-size: 30px; font-weight: 900; color: var(--brand); text-transform: uppercase; }
.lb-dn-phu { text-align: center; font-style: italic; color: var(--text-mute); margin: 6px 0 26px; font-size: 14px; }
.lb-dn-phai .label { color: var(--text); font-weight: 700; font-size: 14.5px; }
.lb-dn-phai .input { background: #eef2f8; border-color: transparent; height: 48px; font-size: 15px; padding: 0 16px; }
[data-theme='dark'] .lb-dn-phai .input { background: var(--bg-sunk); }
.lb-dn-phai .input:focus { background: var(--bg-elev); border-color: var(--brand); }
.lb-mk { position: relative; display: block; }
.lb-mk .input { padding-right: 46px; }
.lb-mk-mat { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--text-mute); cursor: pointer; padding: 6px; display: grid; }
.lb-mk-mat .ic { width: 19px; height: 19px; }
.lb-dn-hang { display: flex; justify-content: flex-end; margin: -2px 0 18px; }
.lb-dn-hang a { color: var(--brand); font-weight: 700; font-size: 14px; }
.lb-dn-nut { display: flex; margin: 0 auto; min-width: 190px; height: 48px; font-size: 16px; }
.lb-dn-duoi { text-align: center; margin: 22px 0 0; color: var(--text-soft); font-size: 14.5px; }
.lb-dn-duoi a { color: var(--brand); font-weight: 700; }
.lb-dn-nen { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.lb-dn-nen .lb-dn { width: min(1040px, 100%); }
.lb-dn .auth-tabs { margin: 0 0 18px; }

/* =============================================================
   CÁC TRANG CŨ CỦA HỌC SINH — chỉnh cho cùng phong cách
   ============================================================= */
.hub-hero {
  background: var(--bg-elev); border: 0; border-top: 3px solid var(--c, var(--brand)); border-radius: var(--r-lg);
  box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
}
.hub-hero::before { display: none; }
.hub-hero h1 { font-size: 28px; }
.hub-pill { border-radius: 4px; }
.hub-stats > div { box-shadow: none; background: var(--bg-sunk); border: 0; border-radius: var(--r); }
.hub-stats b { color: var(--brand); }
.hub-nav { border: 0; border-radius: var(--r-lg); box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.hub-nav button { font-size: 15px; }
.hub-nav-i .ic { width: 20px; height: 20px; }
.hub-nav button.on { background: var(--brand-soft); color: var(--brand); border-left-color: var(--brand); }
.curriculum { gap: 14px; }
.curriculum .sec { border: 0; background: transparent; overflow: visible; }
.curriculum .sec > header { background: var(--brand-700); color: #fff; border-radius: var(--r); padding: 12px 16px; font-weight: 600; }
.curriculum .sec > header .muted { color: rgba(255, 255, 255, .78); }
.curriculum .sec .lesson-row { background: var(--brand-tint); border-top: 0; border-radius: var(--r-sm); margin: 6px 0 0 10px; padding: 11px 14px; }
.curriculum .sec .lesson-row:hover { background: color-mix(in srgb, var(--brand) 11%, var(--bg-elev)); }
.curriculum .sec .lesson-row .ico { background: var(--bg-elev); color: var(--brand); }
.curriculum .sec .lesson-row.done .ico { background: var(--ok); color: #fff; }
.playlist { border: 0; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.playlist .p-head { font-size: 16px; }
.playlist .lesson-row { margin: 6px 10px 0; border-top: 0; border-radius: var(--r-sm); background: var(--brand-tint); }
.playlist .lesson-row:last-child { margin-bottom: 10px; }
.playlist .lesson-row.on { background: color-mix(in srgb, var(--brand) 14%, var(--bg-elev)); box-shadow: inset 3px 0 0 var(--brand); }
.de-list { border: 0; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.de-row-ten { color: var(--text); }
.de-row-ten:hover { color: var(--brand); text-decoration: none; }
.tim-khung { border-radius: var(--r); }
.stat-box, .stat-grid > div { border-radius: var(--r-lg); }
.goi-card { border-radius: var(--r-lg); }

/* Phòng chờ thi: hộp chọn chế độ */
.pt-chon { margin-top: 16px; display: grid; gap: 12px; }
.pt-chon-tde { font-weight: 700; font-size: 14.5px; }
.pt-chon-o { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color .15s, background .15s; }
.pt-chon-o:hover { border-color: var(--line-strong); }
.pt-chon-o.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--bg-elev)); }
.pt-chon-o.tat { opacity: .55; cursor: not-allowed; }
.pt-chon-o input { accent-color: var(--brand); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.pt-chon-o b { display: block; font-size: 15px; }
.pt-chon-o small { display: block; color: var(--text-mute); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.pt-chon-nut { display: flex; justify-content: flex-end; }
.pt-chon-nut .pt-go { min-width: 200px; }

/* =============================================================
   TƯƠNG THÍCH MÀN HÌNH
   ============================================================= */
@media (max-width: 1240px) {
  .lb-3 { grid-template-columns: 210px minmax(0, 1fr) 280px; gap: 20px; }
  .lb-toi-ten { display: none; }
  /* Cột phải hẹp lại: 2 nút xếp chồng cho khỏi cụt chữ */
  .lb-phai-nut { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lb-luoi-khoa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lb-truot-ray { grid-auto-columns: calc((100% - 2 * 14px) / 3); }
  .lb-truot[data-truot="vd"] .lb-truot-ray { grid-auto-columns: calc((100% - 14px) / 2); }
}
@media (max-width: 1080px) {
  .lb-top-in { grid-template-columns: auto minmax(120px, 200px) 1fr auto; gap: 12px; }
  .lb-nav a { width: 54px; }
  .lb-ma span { display: none; }
  .lb-3 { grid-template-columns: minmax(0, 1fr) 280px; }
  .lb-trai { display: none; }
  .lb-chi-dt { display: block; margin-bottom: 16px; }
  .lb-chi-dt .lb-nho { margin: 4px 0 10px; }
  /* Nút "Nhập mã gói / Tra cứu" đã có ở khối trên — cột phải chỉ còn form tư vấn */
  .lb-phai .lb-phai-nut { display: none; }
  .lb-dc { grid-template-columns: minmax(0, 1fr) 340px; }
  .lb-chan-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .lb-top-in { grid-template-columns: auto 1fr auto; }
  .lb-tim { display: none; }
  .lb-tim-nho { display: grid; }
  .lb-3 { grid-template-columns: minmax(0, 1fr); }
  .lb-trai, .lb-phai { position: static; max-height: none; overflow: visible; }
  .lb-2 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lb-dm { position: static; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .lb-dm::-webkit-scrollbar { display: none; }
  .lb-dm h3, .lb-dm-loc { display: none; }
  .lb-dm-o { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 14px 8px 8px; }
  .lb-dm-ic { width: 36px; height: 36px; }
  .lb-dm-ic .ic { width: 18px; height: 18px; }
  .lb-dm-chu b { font-size: 13px; white-space: nowrap; }
  .lb-dc { grid-template-columns: minmax(0, 1fr); }
  .lb-dc-phai { position: static; max-height: none; }
  .lb-tv-du { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 18px; }
  .lb-dn { grid-template-columns: 1fr; }
  .lb-dn-trai { padding: 28px 20px 14px; }
  .lb-dn-minh svg { width: 230px; }
  .lb-dn-anh { max-height: 200px; }
  .lb-dn-trai h1 { font-size: 23px; }
  .lb-dn-phai { padding: 22px 22px 30px; }
  .lb-dn-phai h2 { font-size: 24px; }
  .lb-so-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-pl-hero h1 { font-size: 30px; }
  .lb-goi-tt, .lb-goi-mo { margin-left: 0; }
}
@media (max-width: 760px) {
  .lb-top-in { padding: 0 14px; gap: 8px; }
  .lb-nav, .lb-gach { display: none; }
  .lb-ma { padding: 6px; }
  .page { padding: 14px 14px 100px; }
  .lb-khoi { padding: 16px 14px; }
  .lb-tde h2 { font-size: 17px; }
  .lb-luoi-khoa { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .lb-luoi-khoa-rong { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .lb-luoi-tl, .lb-luoi-tl-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .lb-luoi-goi { grid-template-columns: minmax(0, 1fr); }
  .lb-truot-ray { grid-auto-columns: 44%; }
  .lb-truot[data-truot="vd"] .lb-truot-ray { grid-auto-columns: 62%; }
  .lb-truot-nut { display: none; }
  .lb-banner-o { aspect-ratio: 2/1; }
  .lb-o-tim { min-width: 0; width: 100%; }
  .lb-2-cong { width: 100%; }
  .lb-2-cong .lb-o-tim { flex: 1; }
  .lb-h1 { font-size: 23px; }
  .lb-dc-so { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-dc-bia { aspect-ratio: auto; flex-direction: column; text-align: center; padding: 24px 16px; }
  .lb-dc-bia-anh, .lb-dc-bia-chu { width: 52%; }
  .lb-dc-bia-ten { max-width: 100%; }
  .lb-pl-hero { padding: 30px 16px; min-height: 0; }
  .lb-pl-hero h1 { font-size: 25px; }
  .lb-pl-nut { min-width: 0; width: 100%; padding: 14px 18px; font-size: 15px; }
  .lb-chan-in { grid-template-columns: 1fr 1fr; gap: 22px 16px; padding: 28px 16px 18px; }
  .lb-chan-dau { grid-column: 1 / -1; }
  .lb-chan { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .lb-noi { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); gap: 10px; }
  .lb-noi-o { width: 44px; height: 44px; }
  .lb-dt-nut { margin-bottom: 14px; }
  .lb-dt-nut .btn { height: 44px; font-size: 13.5px; padding: 0 8px; }
  .lb-goi-dau h1 { font-size: 20px; }
  .lb-goi-dau .lb-o-tim { flex: 1 1 100%; }
  .che-do-giai { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lb-logo-ten { max-width: 130px; font-size: 15.5px; }
  /* Khách: chỗ cho nút Đăng nhập — chỉ giữ ô logo như các app học */
  .lb-top:has(.lb-nut-dn) .lb-logo-ten { display: none; }
}

/* =============================================================
   NỀN TỐI — các mảng cố định màu sáng
   ============================================================= */
[data-theme='dark'] .lb-the-nhan { background: var(--bg-elev); }
[data-theme='dark'] .lb-thithu { background: linear-gradient(135deg, var(--bg-elev), color-mix(in srgb, var(--brand) 14%, var(--bg-elev))); }
[data-theme='dark'] .lb-dn-trai { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--bg-elev)), var(--bg-elev)); }
[data-theme='dark'] .lb-dm-o.on { background: var(--brand); }
[data-theme='dark'] .lb-noi-len { background: var(--bg-elev); }

/* =============================================================
   QUẢN TRỊ — khung ảnh giao diện, ảnh bìa tài liệu
   ============================================================= */
.anh-o-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.anh-o { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); }
.anh-o-xem { width: 150px; flex: none; border-radius: var(--r); overflow: hidden; background: var(--bg-sunk); display: grid; place-content: center; border: 1px dashed var(--line-strong); }
.anh-o-xem img { width: 100%; height: 100%; object-fit: cover; }
.anh-o-chu { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.doc-bia { width: 44px; height: 44px; border-radius: var(--r); object-fit: cover; flex: none; }
.admin-nav button .ic { width: 18px; height: 18px; }
.admin-nav button.on { background: var(--brand); }

/* Nhãn phiên bản nổi góc màn hình: chỉ quản trị viên cần (kiểm tra máy chủ đã lên bản mới chưa).
   Học sinh, khách xem số phiên bản nhỏ ở chân trang. */
body:not(.la-qt) .nhan-ban { display: none; }
.lb-chan-ban { opacity: .75; }
