/* =========================================================
   EduLabs – Tối ưu cho mọi kích cỡ màn hình
   (nạp SAU cùng; giữ nguyên phong cách, chỉ xếp lại bố cục)
   ≥ 1800px : màn hình lớn / máy chiếu Full HD trở lên
   ≤ 1500px : laptop 14–15 inch (1366, 1440)
   ≤ 1280px : laptop nhỏ, máy chiếu XGA
   ≤ 1100px : máy tính bảng – menu chuyển thành nút ☰
   ≤ 760px  : điện thoại
   ========================================================= */

/* ---------- Dùng chung ---------- */
.menu-btn { display: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--bg-soft);
  color: var(--text-strong); place-items: center; flex-shrink: 0; }
.menu-btn .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.nav-backdrop { display: none; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tbl-wrap::-webkit-scrollbar { height: 8px; }
.tbl-wrap::-webkit-scrollbar-thumb { background: #cfd9ea; border-radius: 8px; }
.main { min-width: 0; }
img { max-width: 100%; }
.tbl img { max-width: none; }
.lesson-row .btn, .lesson-row .chip, .lesson-row > span { white-space: nowrap; }

/* ---------- Tỉ lệ giao diện chung (thầy duyệt 2026-11-28) ----------
   Ở 100% trang trông như trình duyệt thu nhỏ 80%: html { zoom: .8 } trên màn ≥ 1101px.
   Vì trang được thu nhỏ, bề ngang "bố cục" = bề ngang thật ÷ 0,8, nên các mốc
   bên dưới đã đổi theo: 1500 → 1200, 1280 → 1100, 1800 → 1440, cao 820 → 656.
   Đơn vị vh/vw bị nhân theo zoom → các quy tắc chiều cao dùng calc(100vh * var(--vz, 1)).
   Trình chơi trò chơi (.gp-root) bù lại zoom để màn chơi giữ nguyên. */
:root { --ui-zoom: 1; --vz: 1; }
@media (min-width: 1101px) {
  :root { --ui-zoom: .8; --vz: 1.25; }
  html { zoom: .8; }
  .gp-root { zoom: 1.25; }
}
@media (min-width: 2200px) {
  :root { --ui-zoom: .96; --vz: calc(1 / .96); }
  html { zoom: .96; }               /* màn 2K–4K: trước là 1,2 → nay 1,2 × 0,8 */
  .gp-root { zoom: calc(1 / .96); }
}

/* ---------- Màn hình lớn / máy chiếu ---------- */
@media (min-width: 1440px) {
  .content { padding-left: 32px; padding-right: 28px; }
}

/* ---------- Laptop (bố cục ≤ 1500px ⇔ màn thật ≤ 1200px khi đã thu 80%) ---------- */
@media (max-width: 1200px) {
  :root { --sidebar-w: 248px; }
  .logo span { font-size: 23px; }
  .logo { padding-left: 12px; }
  .nav-item { font-size: 14px; gap: 14px; padding: 0 14px; height: 42px; }
  .nav-item .icon { width: 24px; height: 24px; }
  .nav-group-title { font-size: 11.5px; }
  .topbar { gap: 20px; padding: 0 18px 0 22px; }
  .page-title { font-size: 19px; }
  .pill { font-size: 13.5px; height: 38px; }
  .class-select { min-width: 160px; }
  .user { font-size: 13.5px; }
  .content { padding-left: 18px; padding-right: 12px; }

  /* Tổng quan */
  .greet h2 { font-size: 20px; }
  .greet p { font-size: 13.5px; }
  .sun-box { width: 56px; height: 56px; }
  .greet { padding-right: 20px; }
  .hero { gap: 18px; }
  .stats { gap: 12px; }
  .stat { min-width: 0; padding: 0 12px 0 10px; height: 66px; }
  .stat-ic { width: 42px; height: 42px; }
  .stat b { font-size: 19.5px; }
  .stat small { font-size: 12px; white-space: nowrap; }
  .tile { font-size: 15.5px; height: 120px; }
  .tile svg { width: 86px; height: 70px; }
  .card-header { font-size: 13.5px; }
  .lesson-row, .todo { font-size: 13.5px; }
  .lesson-row { grid-template-columns: 70px 28px 100px 1fr auto; }
  .lesson-row .topic { padding-left: 18px; }
  .lesson-row .btn { width: 100px; }
  .res { font-size: 13.5px; }
  .hw { font-size: 13.5px; grid-template-columns: 22px max-content minmax(80px,1fr) 50px; }
  .care-row { font-size: 11.5px; }

  /* Trang con */
  .page-head h2 { font-size: 20px; }
  .page-head p { font-size: 13.5px; }
  .page-ic { width: 62px; height: 62px; }
  .page-head .actions { gap: 12px; }
  .btn-lg { height: 44px; font-size: 14.5px; padding: 0 16px; }
  .btn-lg[style*="width"], .page-head .btn-md[style*="width"] { width: auto !important; }
  .panel-title { font-size: 16px; }
  .panel-title .icon { width: 26px; height: 26px; }
  .game h3 { font-size: 15px; }
  .game img { height: 150px; } .games.r2 .game img { height: 140px; }
  .game .prev { padding-right: 18px; }
  .game .btn-md { font-size: 13.5px; padding: 0 12px; }
  .lcard img { width: 132px; height: 82px; }
  .lcard h4 { font-size: 12.5px; }
  .next-lesson .btns { width: 170px; }
  .hs-stat img, .cc-stat img { width: 76px; height: 64px; }
  .hs-stat b, .cc-stat b { font-size: 25.5px; }
  .hs-stat small, .cc-stat small { font-size: 13.5px; }
  .ut h4 { font-size: 12.5px; } .ut p { font-size: 12px; } .ut img { width: 70px; height: 74px; }
  .cc-main { grid-template-columns: 1fr 360px; }
  .cc-filters { grid-template-columns: 190px 140px 1fr auto; gap: 10px; }
  .td-filter { grid-template-columns: 200px 1fr 220px 200px auto; gap: 12px; }
  .crit label { font-size: 12.5px; }
  .qcard { font-size: 13.5px; gap: 10px; padding: 0 12px; } .qcard img { width: 44px; height: 40px; }
  .bt-quick { grid-template-columns: 240px repeat(3, 1fr); gap: 14px; }
  .bt-quick h3 { font-size: 16.5px; }
  .dg-filter .r { gap: 12px; flex-wrap: wrap; }
  .chk { font-size: 13.5px; }
  .step { width: 140px; } .step:nth-child(5) { width: 160px; }
  .qset img { width: 88px; height: 88px; }
  .qset h4 { font-size: 12.5px; }
  .wb-page .topbar { gap: 10px; }
  .wb-doc input { width: 150px !important; }
  .wb-page .topbar .vsep.first, .wb-page .user #teacherName, .wb-page .user > .icon { display: none; }
  .wb-page #saveBtn { font-size: 0; gap: 0; padding: 0 11px; }
  .qset .bt { gap: 6px; }
  .qset .bt .btn-md { padding: 0 9px; font-size: 13px; gap: 5px; }
  .qset .bt .btn-md .icon { width: 16px; height: 16px; }
}

/* ---------- Laptop nhỏ / máy chiếu 1024–1280 ---------- */
@media (max-width: 1100px) {
  :root { --sidebar-w: 228px; }
  .hero { flex-direction: column; align-items: stretch; }
  .greet { border-right: 0; padding-right: 0; }
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .grid, .grid.wide-right { grid-template-columns: 1fr 1fr; }
  .card-body { padding: 6px 14px 8px; }
  .lesson-row { grid-template-columns: 66px 22px 1fr auto; }
  .lesson-row .topic { display: none; }
  .lesson-row .subj { border: 0; }
  .care-row { grid-template-columns: 44px 1fr; row-gap: 0; height: auto; padding: 8px 0; }
  .care-note { grid-column: 1 / -1; border-left: 0; padding-left: 0; }

  .page-head { flex-wrap: wrap; row-gap: 10px; }
  .page-head .actions { margin-left: auto; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .live-top, .live-bottom, .gt-bottom, .bt-bottom, .td-main { grid-template-columns: 1fr; }
  .lesson-cards, .qsets { grid-template-columns: repeat(2, 1fr); }
  .uts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-main, .cc-main { grid-template-columns: 1fr; }
  .cc-chart { grid-template-columns: 1fr 236px; }
  .cc-chart .vline:nth-of-type(2), .cc-chart .link { display: none; }
  .bt-quick { grid-template-columns: repeat(3, 1fr); }
  .bt-quick h3 { grid-column: 1 / -1; }
  .td-filter { grid-template-columns: 1fr 1fr 1fr; }
  .gt-hero img { opacity: .3; }
  .wb-main { grid-template-columns: 1fr 200px; }
  .wb-bar { gap: 10px; }
  .wb-page .wb-saved, .wb-page .topbar .bell, .wb-page .topbar .vsep { display: none; }
  .wb-doc input { width: 130px !important; }
}

/* ---------- Máy tính bảng: menu thành nút ☰ ---------- */
@media (max-width: 1100px) {
  .app, .app.mini { background: var(--bg-app); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 270px !important; height: 100vh; transform: translateX(-105%);
    transition: transform .25s ease; box-shadow: 8px 0 30px rgba(20,40,90,.18); padding: 14px 12px 24px !important; }
  .app.mini .sidebar .logo span, .app.mini .nav-group-title { display: block; }
  .app.mini .nav-item { font-size: 14px; gap: 14px; justify-content: flex-start; padding: 0 14px; }
  .collapse-btn { display: none !important; }
  body.nav-open .sidebar { transform: none; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,25,60,.38); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .menu-btn { display: grid; }
  .topbar { gap: 12px; padding: 0 14px; }

  .grid, .grid.wide-right { grid-template-columns: 1fr; }
  .lesson-row { grid-template-columns: 70px 28px 120px 1fr auto; }
  .lesson-row .topic { display: block; }
  .lesson-row .subj { border-right: 1.5px solid var(--divider); }
  .uts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-filter { grid-template-columns: 1fr 1fr; }
  .cc-filters { grid-template-columns: 1fr 1fr; }
  .wb-main { grid-template-columns: 1fr; }
  .wb-main .wb-pages { display: none; }
  .wb-main.pages-open { grid-template-columns: 1fr 200px; }
  .wb-main.pages-open .wb-pages { display: flex; }
  .wb-main .show-pages { display: grid; }
  .wb-main.pages-open .show-pages { display: none; }
  .wb-page .topbar .vsep.first, .wb-page .topbar .bell, .wb-page .topbar .vsep { display: none; }
}

/* ---------- Máy tính bảng dọc 761–900 ---------- */
@media (max-width: 900px) {
  .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 17px; }
  .topbar-right > .pill, .user #teacherName { display: none; }
  .wb-page .wb-doc { display: none; }
  .wb-page #presentBtn { font-size: 0; gap: 0; padding: 0 12px; }
  .wb-bar > span:not(.vline) { display: none; }
  .wb-bar #clearBtn { font-size: 0; gap: 0; }
}

/* Màn hình thấp (laptop 768px, máy chiếu cũ): thanh công cụ bảng chỉ còn biểu tượng */
@media (max-height: 656px) and (min-width: 761px), (max-height: 820px) and (min-width: 761px) and (max-width: 1100px) {
  .wb-tools { width: 62px; padding: 5px; }
  .wb-tools button { height: 50px; font-size: 0; gap: 0; }
  .wb-tools button .icon { width: 25px; height: 25px; }
  .wb-tools .tt { font-size: 18px; }
  .wb-pop { left: 82px; }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 760px) {
  body { font-size: 13px; }
  .topbar { height: 58px; gap: 8px; padding: 0 10px; }
  .page-title { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
  .class-select { min-width: 0; padding: 0 10px; height: 38px; font-size: 13px; }
  .class-select .chev { display: none; }
  .topbar-right { gap: 4px; margin-left: 0; }
  .topbar-right > .pill, .topbar-right .vsep, .user #teacherName, .user > .icon { display: none; }
  .bell { padding: 6px; }
  .bell::after { right: 4px; }
  .avatar { width: 38px; height: 38px; }
  .content, .content.sub { padding: 12px 10px 18px; gap: 12px; }

  /* Tổng quan */
  .greet { gap: 12px; }
  .greet h2 { font-size: 16px; }
  .sun-box { width: 48px; height: 48px; } .sun-box .icon { width: 30px; height: 30px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .quick { padding: 10px 10px 12px; }
  .quick-title { font-size: 15px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { height: 108px; font-size: 13.5px; }
  .tile svg { width: 74px; height: 60px; }
  .card-header { font-size: 13px; padding: 0 14px; }
  .lesson-row { grid-template-columns: 62px 20px 1fr auto; font-size: 13px; }
  .lesson-row .topic { display: none; }
  .lesson-row .subj { border: 0; }
  .lesson-row .btn { width: auto; padding: 0 10px; }
  .badge { padding: 2px 8px; font-size: 12px; }
  .res .btn-outline { width: auto; }
  .hw { grid-template-columns: 22px 1fr 50px; height: auto; padding: 8px 0; row-gap: 6px; }
  .hw .track { grid-column: 2 / 3; grid-row: 2; }
  .hw > span:nth-child(2) { white-space: normal; }
  .legend { flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
  .result-row { grid-template-columns: 76px 1fr; font-size: 13px; }
  .stack { font-size: 10.5px; }

  /* Đầu trang con */
  .page-head { gap: 12px; }
  .page-ic { width: 52px; height: 52px; border-radius: 12px; }
  .page-head h2 { font-size: 16.5px; }
  .page-head p { font-size: 12.5px; }
  .page-head > div:nth-child(2) { flex: 1; min-width: 0; }
  .page-head .actions { width: 100%; margin: 0; flex-wrap: wrap; gap: 8px; }
  .page-head .actions > * { flex: 1 1 auto; width: auto !important; min-width: 0; }
  .btn-lg { height: 42px; font-size: 13.5px; }
  .btn-md { font-size: 13px; }

  /* Ô nhập, nhóm nút, hàng công cụ */
  .content .field { width: 100% !important; min-width: 0; }
  .row { flex-wrap: wrap; gap: 8px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg > button { width: auto !important; padding: 0 14px; font-size: 13px; flex-shrink: 0; }
  .panel { padding: 12px; border-radius: 14px; }
  .panel-title { font-size: 14.5px; gap: 10px; flex-wrap: wrap; }
  .panel-title .icon { width: 24px; height: 24px; }
  .tbl { font-size: 12.5px; }

  /* Thẻ thống kê 2 cột */
  .hs-stats, .cc-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hs-stat, .cc-stat { height: 76px; padding: 0 10px; gap: 8px; }
  .hs-stat img, .cc-stat img { width: 50px; height: 46px; }
  .hs-stat b, .cc-stat b { font-size: 20.5px; }
  .hs-stat small, .cc-stat small { font-size: 12px; }

  /* Lưới thẻ 1 cột */
  .games, .games.r2, .lesson-cards, .qsets, .uts, .tools { grid-template-columns: 1fr; }
  .tools { grid-template-columns: repeat(3, 1fr); }
  .tool { font-size: 11px; height: 68px; }
  .game-bar { overflow-x: auto; }
  .game-bar > button { padding: 0 16px; font-size: 13.5px; flex-shrink: 0; }
  .game img, .games.r2 .game img { height: 170px; }
  .game .prev { padding-right: 12px; }
  .next-lesson { flex-wrap: wrap; }
  .next-lesson img { width: 96px; height: 70px; }
  .next-lesson .btns { width: 100%; flex-direction: row; }
  .next-lesson .btns .btn-md { flex: 1; font-size: 13px; }
  .next-lesson .meta { flex-wrap: wrap; font-size: 13px; gap: 10px; }
  .sched { gap: 10px; padding: 8px 10px; }
  .sched b { font-size: 13.5px; } .sched small { font-size: 11.5px; }
  .lcard .top { gap: 10px; }
  .lcard img { width: 112px; height: 80px; }

  .gt-hero { height: auto; }
  .gt-hero img { display: none; }
  .gt-hero .inner { padding: 12px; }
  .gt-hero h3 { font-size: 14.5px; }
  .steps { flex-wrap: wrap; gap: 6px; }
  .step, .step:nth-child(5) { width: calc(33.3% - 20px); height: 86px; font-size: 11px; text-align: center; padding: 0 4px; white-space: normal; }
  .steps .arr { width: 14px; }
  .qset img { width: 80px; height: 80px; }
  .cards-stat { grid-template-columns: 1fr 1fr; }
  .cstat { padding: 0 12px; gap: 10px; height: 80px; }
  .cstat b { font-size: 22.5px; } .cstat span { font-size: 13px; }
  .cstat img { width: 44px; height: 44px; }

  .hs-tools { flex-wrap: wrap; gap: 8px; }
  .hs-tools .panel-title { width: 100%; }
  .hs-tools .field.grow { flex: 1 1 100%; }
  .stu-tbl td { height: 45px; font-size: 13.5px; }
  .ini { width: 38px; height: 38px; font-size: 13px; margin-right: 8px; }
  .pager { flex-direction: column; gap: 10px; align-items: flex-start; }
  .pager .pg { flex-wrap: wrap; }
  .stu-info .head { flex-wrap: wrap; }
  .stu-info .tags { flex-wrap: wrap; gap: 8px; }
  .kv { grid-template-columns: 24px 96px 12px 1fr; font-size: 12.5px; height: auto; min-height: 35px; padding: 4px 0; }
  .quick4 { grid-template-columns: repeat(2, 1fr); }
  .stu-info .bt { grid-template-columns: 1fr; }

  .ut-sec { font-size: 16.5px; height: 38px; }
  .ut { height: 120px; }
  .ut h4 { font-size: 13px; }

  .cc-filters, .td-filter, .crit, .evid { grid-template-columns: 1fr; }
  .cc-chart { grid-template-columns: 1fr; }
  .cc-chart .vline { display: none; }
  .bar-chart .b { width: 40px; }
  .bar-chart .b small { font-size: 9.5px; }
  .cal-head { padding: 0 10px; }
  .absent { flex-wrap: wrap; }
  .td-tbl .desc { max-width: 260px; }
  .tl li { grid-template-columns: 84px 1fr; font-size: 11.5px; }
  .note-box { padding-left: 46px; font-size: 12px; }
  .log-tools { flex-wrap: wrap; gap: 8px; }
  .log-tools .panel-title { width: 100%; }
  .log-tools .field { flex: 1 1 40%; width: auto !important; }
  .log-tools .field:not(.select) { flex-basis: 100%; }
  .log-tools > span { display: none; }
  .tl li { height: auto; min-height: 33px; padding: 5px 0; white-space: normal; line-height: 1.24; }
  .tbl-wrap > .tbl { min-width: 620px; }

  .row > .btn-lg.grow { padding: 0 10px; font-size: 13.5px; gap: 6px; min-width: 0; }
  .tbl-wrap > .tbl th, .tbl-wrap > .tbl td { white-space: nowrap; }
  .tbl-wrap > .tbl .desc { white-space: normal; min-width: 220px; }
  .dg-foot { flex-wrap: wrap; gap: 10px; }
  .dg-foot .pg { gap: 10px; white-space: nowrap; font-size: 13px; }
  .mode button { font-size: 13px; }

  .dg-filter .r { gap: 8px; }
  .dg-filter .r > * { flex: 1 1 auto; }
  .dg-filter .vline { display: none; }
  .chk { font-size: 13px; margin-left: 0 !important; }
  .dg-filter .btn-md { width: auto !important; margin-left: 0 !important; }

  .bt-quick { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
  .bt-quick h3 { font-size: 14.5px; }
  .qcard { height: 58px; }
  .pend { grid-template-columns: 38px 1fr auto; row-gap: 4px; height: auto; padding: 6px 0; }
  .pend .chip { grid-column: 2; margin: 0; justify-self: start; }
  .pend .btn-sm { grid-column: 3; grid-row: 1 / 3; }

  /* Bảng trắng trên điện thoại */
  .wb-page .content { padding: 8px; gap: 8px; }
  .crumb { display: none; }
  .wb-page .wb-doc, .wb-page .wb-saved, .wb-page .topbar .class-select { display: none; }
  .wb-page .topbar .btn-md { padding: 0 10px; font-size: 0; gap: 0; height: 38px; }
  .wb-page .topbar .btn-md .icon { width: 20px; height: 20px; }
  .wb-bar { height: auto; flex-wrap: wrap; padding: 6px 8px; gap: 8px; }
  .wb-bar > span:not(.vline), .wb-bar .vline { display: none; }
  .wb-bar .field { width: auto !important; flex: 1; }
  .wb-bar .zoom { display: none; }
  .ibtn { width: 42px; }
  .wb-tools { width: 52px; padding: 4px; left: 6px; top: 6px; }
  .wb-tools button { height: 46px; font-size: 0; gap: 0; }
  .wb-tools button .icon { width: 24px; height: 24px; }
  .wb-tools .tt { font-size: 17px; }
  .wb-pop { left: 64px; }
  .wb-foot { height: 52px; gap: 6px; padding: 0 6px; }
  .wb-foot .vline { display: none; }
  .wb-foot .fit { font-size: 0; gap: 0; padding: 0 10px; }
  .page-sel select { padding: 0 34px 0 12px; font-size: 13px; }
  .wb-main.pages-open { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .wb-main.pages-open .wb-pages { max-height: 220px; }
  .wb-main.pages-open .thumbs { flex-direction: row; overflow-x: auto; }
  .wb-main.pages-open .thumb { width: 150px; }
}

/* ---------- Điện thoại rất nhỏ ---------- */
@media (max-width: 400px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat small { font-size: 10.5px; }
  .hs-stat img, .cc-stat img { display: none; }
}

/* ---------- Thiết bị cảm ứng: vùng bấm lớn hơn ---------- */
@media (pointer: coarse) {
  .btn-sm { min-height: 36px; }
  .nav-item { min-height: 46px; }
  .radio, .cbx { width: 26px; height: 26px; }
}

/* ---------- In ấn ---------- */
@media print {
  .sidebar, .topbar, .nav-backdrop, .toast { display: none !important; }
  .app { background: #fff; }
}

/* =========================================================
   Thu gọn tiêu đề: thanh trên cùng + khối tiêu đề trang
   ========================================================= */
.page-head p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head > div:nth-child(2) { min-width: 0; }

@media (max-width: 1200px) {
  :root { --topbar-h: 56px; }
  .page-title { font-size: 17px; }
  .page-head { min-height: 0; gap: 14px; }
  .page-ic { width: 52px; height: 52px; border-radius: 13px; }
  .page-head h2 { font-size: 18px; }
  .page-head p { font-size: 13px; margin-top: 1px; }
  .content.sub { gap: 14px; padding-top: 12px; }
  .sun-box { width: 54px; height: 54px; } .sun-box .icon { width: 34px; height: 34px; }
  .greet h2 { font-size: 18px; } .greet p { font-size: 13px; margin-top: 2px; }
  .hs-stat, .cc-stat { height: 80px; gap: 12px; padding: 0 14px; }
  .hs-stat img, .cc-stat img { width: 58px; height: 50px; }
  .hs-stat small, .cc-stat small { font-size: 13.5px; }
  .hs-stat b, .cc-stat b { font-size: 24px; }
}

@media (max-width: 1100px) {
  :root { --topbar-h: 52px; }
  .page-title { font-size: 16px; }
  .page-ic { width: 44px; height: 44px; border-radius: 11px; }
  .page-head h2 { font-size: 16px; }
  .page-head p { font-size: 12px; }
  .page-head .btn-lg, .page-head .btn-md { height: 40px; font-size: 13.5px; padding: 0 14px; }
  .hs-stat, .cc-stat { height: 66px; }
  .hs-stat img, .cc-stat img { width: 50px; height: 44px; }
  .hs-stat b, .cc-stat b { font-size: 20.5px; }
  .hs-stat small, .cc-stat small { font-size: 12.5px; margin: 0; white-space: nowrap; }
  .page-head { flex-wrap: nowrap; }
  .page-head > div:nth-child(2) { flex: 1; }
  .page-head .actions { flex-shrink: 0; gap: 8px; }
  .page-head.dup > .page-ic, .page-head.dup > div:nth-child(2) { display: none; }
  .page-head.dup .actions { margin-left: auto; }
  .page-head.only-title { display: none; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .page-head p { display: none; }
  .page-head .btn-lg, .page-head .btn-md { font-size: 12.5px; padding: 0 11px; gap: 6px; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 50px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .page-title { font-size: 13.5px; }
  .menu-btn .icon { width: 24px; height: 24px; }
  .topbar .pill { height: 34px; font-size: 12.5px; padding: 0 8px; gap: 6px; }
  .topbar .class-select { min-width: 0; }
  .avatar { width: 34px; height: 34px; }
  .bell { padding: 4px 8px; } .bell .icon { width: 24px; height: 24px; }

  .content, .content.sub { gap: 10px; padding-top: 10px; }
  .page-head { gap: 10px; row-gap: 8px; }
  .page-ic { width: 36px; height: 36px; border-radius: 9px; }
  .page-head h2 { font-size: 14.5px; }
  .page-head p { display: none; }
  .page-head .actions { flex-wrap: nowrap; gap: 6px; }
  .page-head .actions > * { flex: 1 1 0; height: 36px !important; font-size: 11.5px !important; padding: 0 6px !important; gap: 5px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-head .actions .icon { width: 16px !important; height: 16px !important; flex-shrink: 0; }

  .hero { gap: 10px; }
  .sun-box { width: 40px; height: 40px; border-radius: 10px; } .sun-box .icon { width: 26px; height: 26px; }
  .greet h2 { font-size: 14.5px; } .greet p { display: none; }
  .stats { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }
  .stat { height: 54px; padding: 0 4px; gap: 0; justify-content: center; text-align: center; }
  .stat-ic { display: none; }
  .stat b { font-size: 17px; } .stat small { font-size: 10px !important; white-space: nowrap; }

  .hs-stats, .cc-stats { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }
  .hs-stat, .cc-stat { height: 54px; padding: 0 4px; gap: 0; justify-content: center; text-align: center; border-radius: 12px; }
  .hs-stat img, .cc-stat img { display: none; }
  .hs-stat b, .cc-stat b { font-size: 17px; }
  .hs-stat small, .cc-stat small { font-size: 10px; white-space: nowrap; font-weight: 500; }
  .quick-title { font-size: 14.5px; margin-bottom: 8px; } .play-dot { width: 26px; height: 26px; }
}

/* =========================================================
   Nút trong các thẻ nhỏ: thu gọn (đặt cuối để áp dụng mọi cỡ màn hình)
   ========================================================= */
.card .btn-md, .panel .btn-md { height: 33px; font-size: 12.5px; padding: 0 13px; gap: 6px; border-radius: 7px; }
.card .btn-md .icon, .panel .btn-md .icon { width: 16px; height: 16px; }
.card .btn-sm, .panel .btn-sm { height: 27px; font-size: 12px; padding: 0 10px; gap: 5px; }
.card .btn-sm .icon, .panel .btn-sm .icon { width: 14px; height: 14px; }
.panel .btn-lg { height: 42px; font-size: 15px; padding: 0 18px; }
.panel .btn-lg .icon { width: 20px; height: 20px; }
.game .btn-md { height: 31px; font-size: 12.5px; padding: 0 13px; }
.next-lesson .btns .btn-md { height: 34px; font-size: 13px; }
.lcard .bt .btn-md { height: 31px; font-size: 12.5px; }
.qset .bt .btn-md { height: 29px; font-size: 12px; padding: 0 8px; gap: 5px; }
.qset .bt .btn-md .icon { width: 14px; height: 14px; }
.ut .btn-sm { width: 74px; height: 27px; font-size: 12.5px; border-radius: 8px; }
.res .btn-outline { height: 25px; width: 60px; font-size: 11px; gap: 4px; }
.lesson-row .btn { height: 26px; font-size: 12.5px; }

/* Danh sách học sinh: hàng khít như Danh sách bài tập */
.stu-tbl td { height: 40px; font-size: 14px; }
.stu-tbl th { height: 34px; font-size: 13.5px; }
.stu-tbl .ini { width: 30px; height: 30px; font-size: 11.5px; margin-right: 10px; }
.stu-tbl .cbx { width: 18px; height: 18px; }
.stu-tbl .sex .icon { width: 17px; height: 17px; }
.stu-tbl .chip { font-size: 12px; padding: 2px 9px; }
.stu-tbl td .icon.chev, .stu-tbl td:last-child .icon { width: 16px; height: 16px; }
.stu-info .tags span { white-space: nowrap; }
