/* =========================================================
   EduLabs – Tiện ích lớp học (Giai đoạn 1)
   Tiền tố: ut2- (trang, cửa sổ, trình chiếu) · tx- (bên trong tiện ích)
   KHÔNG dùng tên lớp chung (pick, show, chk, on đứng riêng ở mức toàn cục).
   ========================================================= */

/* ---------- Trang danh sách ---------- */
.ut2-search { width: 364px; max-width: 100%; }
.ut2-search input { width: 100%; }
.ut2-sp { flex: 1; }
.ut2-muted { color: var(--text-muted); font-size: 13.5px; }
.ut2-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--cta-500, #2b7bfe); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.ut2-link:hover { background: #eef4ff; }
.ut2-link .icon { width: 18px; height: 18px; }

.ut2-lesson { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, #eaf1fd 0%, #f3f7fe 100%); border: 1px solid #d6e3fa; border-radius: 14px; padding: 10px 14px; min-height: 62px; }
.ut2-lesson-ic { width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.ut2-lesson-ic .icon { width: 24px; height: 24px; color: var(--brand-600); }
.ut2-lesson-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ut2-lesson-t b { font-size: 15.5px; color: var(--text-strong); }
.ut2-lesson-t span { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut2-lesson.on { border-color: #9cc2ff; background: linear-gradient(90deg, #e1edff 0%, #eef5ff 100%); }
.ut2-lesson.on .ut2-lesson-t span { color: var(--brand-800); font-weight: 600; }
.ut2-lesson .btn-md { text-decoration: none; flex-shrink: 0; }

.ut2-quick { display: flex; flex-direction: column; gap: 8px; }
.ut2-quick-h { display: flex; align-items: center; gap: 8px; }
.ut2-quick-h b { font-size: 15.5px; color: var(--text-strong); }
.ut2-quick-l { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ut2-qi { position: relative; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 6px 12px 6px 6px; cursor: pointer; font: inherit; color: var(--text-strong); font-weight: 600; font-size: 13.5px; text-align: left; box-shadow: var(--shadow-xs); min-width: 0; transition: transform .12s, box-shadow .12s; }
.ut2-qi img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.ut2-qi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut2-qi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ut2-qi:focus-visible, .ut2-card:focus-visible, .ut2-fav:focus-visible { outline: 3px solid #2b7bfe; outline-offset: 2px; }
.ut2-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #22b573; box-shadow: 0 0 0 3px #dcf5ea; }
.ut2-qi.running { border-color: #8ad7b2; }

.ut2-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ut2-filters .seg.split > button { padding: 0 18px; }
.ut2-gsel { width: 230px; height: 38px; }
.ut2-gsel select { width: 100%; }

.ut2-sec { background: linear-gradient(90deg, #e6edfa 0%, #edf2fb 100%); border-radius: 12px; height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-weight: 700; font-size: 15.5px; color: var(--text-strong); margin-top: 2px; }
.ut2-sec .icon { width: 26px; height: 26px; color: var(--brand-600); }
.ut2-sec small { font-weight: 600; color: var(--text-muted); font-size: 12.5px; background: #fff; border-radius: 99px; padding: 1px 9px; }
.ut2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.ut2-card { position: relative; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); padding: 10px 40px 10px 10px; min-height: 96px; cursor: pointer; transition: transform .14s, box-shadow .14s, border-color .14s; }
.ut2-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #c9dafa; }
.ut2-card img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; mix-blend-mode: multiply; }
.ut2-card-t { min-width: 0; }
.ut2-card h4 { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: var(--text-strong); letter-spacing: -.3px; }
.ut2-card p { margin: 0; font-size: 13px; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ut2-fav { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #9aaccc; }
.ut2-fav:hover { background: #f1f5fd; color: var(--brand-600); }
.ut2-fav .icon { width: 20px; height: 20px; }
.ut2-fav.on { color: #f5a524; }
.ut2-fav.on .icon { fill: #fcd34d; stroke: #f5a524; }
.ut2-run { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; font-weight: 700; color: #0c8d65; background: #e3f7ee; border-radius: 99px; padding: 2px 9px; }
.ut2-run::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22b573; animation: ut2-pulse 1.6s infinite; }
.ut2-card.running { border-color: #8ad7b2; }
@keyframes ut2-pulse { 50% { opacity: .35; } }
.ut2-empty { text-align: center; color: var(--text-muted); padding: 30px 10px; font-size: 15px; }

.ut2-pinl { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; margin: 8px 0; }
.ut2-pinr { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--border-soft); }
.ut2-pinr.on { background: #eef4ff; border-color: #c4d8fb; }
.ut2-pinr img { width: 32px; height: 32px; object-fit: contain; }
.ut2-pinr span { flex: 1; font-weight: 600; }
.ut2-pinr button { border: 1px solid var(--border); background: #fff; border-radius: 8px; height: 30px; min-width: 30px; cursor: pointer; font: inherit; font-size: 12.5px; }
.ut2-pinr button:disabled { opacity: .4; cursor: default; }
.ut2-pinb { padding: 0 10px; color: var(--cta-500, #2b7bfe); font-weight: 600; }
.ut2-pinb.on { color: #c2553e; }

.ut2-confirm p { margin: 0 0 14px; }
.ut2-confirm-act { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ut2-danger { background: #e2553c; color: #fff; border: 0; }
.ut2-input { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font: inherit; margin-bottom: 14px; }

/* ---------- Trang tiện ích (chế độ đầy đủ) ---------- */
.ut2-toolpage { gap: 10px; }
.ut2-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ut2-toolbar img { width: 44px; height: 44px; object-fit: contain; mix-blend-mode: multiply; }
.ut2-toolbar h2 { margin: 0; font-size: 21px; font-weight: 800; color: var(--text-strong); }
.ut2-toolbar .ut2-run { margin: 0; }
.ut2-stage { background: #fff; border: 1px solid var(--border-soft); border-radius: 16px; box-shadow: var(--shadow-sm); min-height: calc((100vh - 200px) * var(--vz, 1)); display: flex; flex-direction: column; overflow: hidden; }
.ut2-stage > .tx-root { flex: 1; }

/* ---------- Cửa sổ nổi ---------- */
.ut2-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1100; }
.ut2-win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: #fff; border-radius: 14px; border: 1px solid #c9d7ef; box-shadow: 0 14px 40px rgba(20, 40, 90, .25); overflow: hidden; min-width: 260px; min-height: 180px; }
.ut2-win.top { box-shadow: 0 18px 50px rgba(20, 40, 90, .33); border-color: #9cbcf3; }
.ut2-win.min { display: none; }
.ut2-win.max { left: 8px !important; top: 8px !important; width: calc(100% - 16px) !important; height: calc(100% - 16px) !important; }
.ut2-win.dragging { user-select: none; opacity: .96; }
.ut2-win-bar { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px 0 10px; background: linear-gradient(180deg, #f3f7ff, #e7effd); border-bottom: 1px solid #dbe5f6; cursor: move; touch-action: none; flex-shrink: 0; }
.ut2-win-bar img { width: 26px; height: 26px; object-fit: contain; mix-blend-mode: multiply; }
.ut2-win-t { font-size: 13.5px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut2-win-run { font-size: 12px; font-weight: 700; color: #0c8d65; background: #e3f7ee; border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.ut2-win-sp { flex: 1; }
.ut2-win-bar button { width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #4a5a80; flex-shrink: 0; }
.ut2-win-bar button:hover { background: #dbe6fb; }
.ut2-win-bar button[data-w="close"]:hover { background: #fde2dc; color: #c2553e; }
.ut2-win-bar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ut2-win-body { flex: 1; min-height: 0; display: flex; overflow: auto; }
.ut2-win-body > .tx-root { flex: 1; min-width: 0; }
.ut2-win-rs { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, #b8c8e6 50%, #b8c8e6 60%, transparent 60%, transparent 70%, #b8c8e6 70%, #b8c8e6 80%, transparent 80%); }
.ut2-win.max .ut2-win-rs { display: none; }
.ut2-dock { position: fixed; right: 16px; bottom: 14px; z-index: 1150; display: none; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 70vw; }
.ut2-dock.on { display: flex; }
.ut2-dock-it { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #b7cdf3; border-radius: 99px; padding: 4px 14px 4px 5px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-strong); box-shadow: 0 6px 18px rgba(20, 40, 90, .22); }
.ut2-dock-it img { width: 30px; height: 30px; object-fit: contain; }
.ut2-dock-it em { font-style: normal; color: #0c8d65; font-weight: 800; }
.ut2-dock-it em:empty { display: none; }

/* ---------- Trình chiếu toàn màn hình (cùng máy) ---------- */
.ut2-present { position: fixed; inset: 0; z-index: 2000; background: #f4f8ff; display: flex; zoom: calc(1 / var(--ui-zoom, 1)); }
.ut2-present > .tx-root { flex: 1; min-width: 0; }
.ut2-present-x { position: absolute; top: 10px; right: 12px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(15, 30, 70, .35); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; opacity: .35; transition: opacity .2s; }
.ut2-present-x:hover, .ut2-present-x:focus-visible { opacity: 1; }
body.ut2-presenting { overflow: hidden; }

/* ---------- Quy ước bên trong tiện ích ---------- */
.tx-root { display: flex; flex-direction: column; min-height: 0; position: relative; color: var(--text-strong); container-type: inline-size; }
.tx-root .tx-pc { display: none !important; }
.tx-root.is-present .tx-t { display: none !important; }
.tx-root.is-present .tx-pc { display: revert !important; }
.tx-root.is-present .tx-pc.tx-flex { display: flex !important; }
.tx-msg { margin: auto; text-align: center; padding: 30px 20px; max-width: 520px; color: var(--text); font-size: 15px; line-height: 1.5; }
.tx-msg b { display: block; font-size: 18px; color: var(--text-strong); margin-bottom: 6px; }
.tx-msg .btn-md { margin-top: 12px; }
.tx-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); background: #fbfcff; }
.tx-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.tx-note { font-size: 12.5px; color: var(--text-muted); }
.tx-warn { font-size: 13px; color: #9a5a00; background: #fff6e5; border: 1px solid #ffe0a3; border-radius: 10px; padding: 6px 10px; }
.tx-err { font-size: 13px; color: #a8341d; background: #fdece8; border: 1px solid #f7c4b8; border-radius: 10px; padding: 6px 10px; }
.tx-ok { font-size: 13px; color: #0c6e4f; background: #e5f7ef; border: 1px solid #b4e6cf; border-radius: 10px; padding: 6px 10px; }
.tx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1.4px solid #bcd0f3; background: #fff; color: var(--brand-800); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tx-btn:hover { background: #f0f6ff; }
.tx-btn:disabled { opacity: .45; cursor: default; }
.tx-btn.tx-pri { background: var(--grad-cta); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(36, 116, 253, .28); }
.tx-btn.tx-big { height: 48px; padding: 0 26px; font-size: 17px; border-radius: 12px; }
.tx-btn.tx-red { color: #b8432b; border-color: #f2bcae; }
.tx-btn.tx-sel { background: #e3eeff; border-color: #7aa7f7; color: #1c55c4; }
.tx-btn .icon { width: 18px; height: 18px; }
.tx-in { height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; font: inherit; font-size: 13.5px; color: var(--text-strong); background: #fff; min-width: 0; }
.tx-in:focus, .tx-ta:focus { outline: 2px solid #8fb5f7; border-color: #8fb5f7; }
select.tx-in { padding-right: 6px; }
.tx-ta { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; width: 100%; resize: vertical; min-height: 90px; }
.tx-seg { display: inline-flex; background: #eef3fb; border-radius: 10px; padding: 3px; gap: 2px; }
.tx-seg button { border: 0; background: none; border-radius: 8px; height: 30px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.tx-seg button.tx-sel { background: #fff; color: #1c55c4; box-shadow: var(--shadow-xs); }
.tx-side { width: 300px; flex-shrink: 0; border-left: 1px solid var(--border-soft); background: #fbfcff; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.tx-side h5 { margin: 12px 14px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.tx-row { display: flex; min-height: 0; flex: 1; }
.tx-hist { list-style: none; margin: 0; padding: 0 14px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.tx-hist li { display: flex; gap: 8px; padding: 4px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--border-soft); }
.tx-hist li small { color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.tx-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; }
.tx-chk input { width: 17px; height: 17px; accent-color: #2b7bfe; }
@media (prefers-reduced-motion: reduce) { .tx-root *, .ut2-card, .ut2-qi { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Màn hình rộng/hẹp ---------- */
@media (max-width: 1440px) { .ut2-quick-l { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .ut2-search { width: 100%; }
  .ut2-lesson-t span { white-space: normal; }
  .tx-side { width: 240px; }
}
@media (max-width: 760px) {
  .ut2-quick-l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ut2-lesson { flex-wrap: wrap; }
  .ut2-toolbar .btn-md span { display: none; }
  .ut2-grid { grid-template-columns: 1fr; }
  .tx-row { flex-direction: column; }
  .tx-side { width: auto; border-left: 0; border-top: 1px solid var(--border-soft); }
}

/* ===== Đồng hồ đếm ngược (tx-dn-) ===== */
.tx-dem-nguoc { background: #fff; }
.tx-dn-pre { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tx-dn-pre .tx-btn { height: 32px; padding: 0 10px; }
.tx-dn-name { width: 230px; }
.tx-dn-hms { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-muted); }
.tx-dn-hms .tx-in { width: 56px; text-align: center; }
.tx-dn-blocked { margin: 8px 12px 0; }
.tx-dn-face { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; min-height: 0; container-type: size; }
.tx-dn-label { font-size: clamp(16px, 5cqh, 44px); font-weight: 800; color: var(--brand-800); text-align: center; max-width: 95%; overflow-wrap: anywhere; }
.tx-dn-label:empty { display: none; }
.tx-dn-ringw { position: relative; width: min(64cqh, 92cqw); aspect-ratio: 1; }
.tx-dn-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.tx-dn-track { fill: none; stroke: #e5edfa; stroke-width: 18; }
.tx-dn-prog { fill: none; stroke: #2b7bfe; stroke-width: 18; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .4s; }
.tx-dn-time { position: absolute; inset: 0; display: grid; place-items: center; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--text-strong); font-size: min(19cqh, 27cqw); letter-spacing: -1px; }
.tx-dn-time.long { font-size: min(14cqh, 20cqw); }
.tx-dn-bar { width: min(80cqw, 900px); height: 10px; background: #e5edfa; border-radius: 99px; overflow: hidden; }
.tx-dn-bar i { display: block; height: 100%; background: #2b7bfe; border-radius: 99px; transition: width .25s linear, background .4s; }
.tx-dn-status { font-size: clamp(14px, 4.5cqh, 40px); font-weight: 700; color: var(--text-muted); min-height: 1.2em; }
.tx-dn-warn .tx-dn-prog, .tx-dn-warn .tx-dn-bar i { stroke: #f59e0b; background: #f59e0b; }
.tx-dn-warn .tx-dn-status { color: #b86e00; }
.tx-dn-done .tx-dn-prog { stroke: #ef4444; }
.tx-dn-done .tx-dn-time { color: #d6362a; animation: tx-dn-beat 1s ease-in-out 4; }
.tx-dn-done .tx-dn-status { color: #d6362a; font-size: clamp(20px, 8cqh, 72px); }
.tx-dn-paused .tx-dn-time { opacity: .6; }
@keyframes tx-dn-beat { 50% { transform: scale(1.07); } }
.tx-dn-ctl { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 10px 12px 14px; }
.tx-dn-ctl .tx-big { min-width: 130px; }
.tx-dem-nguoc.is-float .tx-dn-ctl [data-add="-10000"], .tx-dem-nguoc.is-float .tx-dn-ctl [data-add="10000"] { display: none; }
.tx-dem-nguoc.is-float .tx-dn-ctl .tx-big { height: 40px; min-width: 96px; font-size: 15px; padding: 0 14px; }
.tx-dem-nguoc.is-float .tx-dn-set { display: none; }
.tx-dem-nguoc.is-present { background: #f4f8ff; }
.tx-dem-nguoc.is-present .tx-dn-ctl { opacity: .3; transition: opacity .2s; }
.tx-dem-nguoc.is-present .tx-dn-ctl:hover, .tx-dem-nguoc.is-present .tx-dn-ctl:focus-within { opacity: 1; }
.tx-dem-nguoc.is-panel .tx-dn-set { display: none; }
#utList[hidden], #utTool[hidden], .ut2-toolbar [hidden], .tx-root [hidden], .ut2-page [hidden] { display: none !important; }

/* ===== Vòng quay gọi tên (tx-vq-) ===== */
.tx-vq-info { padding: 8px 12px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 30px; }
.tx-vq-stage { position: relative; flex: 1; min-height: 300px; display: flex; align-items: center; justify-content: center; padding: 12px; container-type: size; }
.tx-vq-wheelw { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.tx-vq-wheelw canvas { display: block; filter: drop-shadow(0 8px 18px rgba(30, 60, 140, .22)); }
.tx-vq-ptr { position: absolute; top: calc(50% - min(50cqh, 50cqw) + 2px); left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid #e2483d; z-index: 2; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.tx-vq-roll { width: min(90cqw, 900px); }
.tx-vq-rollwin { height: min(22cqh, 160px); overflow: hidden; border-radius: 18px; background: linear-gradient(180deg, #eef4ff, #fff 30%, #fff 70%, #eef4ff); border: 3px solid #bcd3fb; position: relative; }
.tx-vq-rollwin::before, .tx-vq-rollwin::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: #e2483d; opacity: .5; z-index: 1; }
.tx-vq-rollwin::before { top: 10%; } .tx-vq-rollwin::after { bottom: 10%; }
.tx-vq-rolll { will-change: transform; }
.tx-vq-rn { height: min(22cqh, 160px); display: flex; align-items: center; justify-content: center; font-size: min(9cqh, 64px); font-weight: 800; color: var(--text-strong); text-align: center; padding: 0 16px; line-height: 1.1; overflow-wrap: anywhere; }
.tx-vq-res { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(244, 248, 255, .72); backdrop-filter: blur(2px); z-index: 3; overflow: hidden; }
.tx-vq-card { background: #fff; border-radius: 22px; box-shadow: 0 18px 50px rgba(30, 60, 140, .25); border: 3px solid #ffd166; padding: 22px 26px; max-width: 94%; text-align: center; animation: tx-vq-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.tx-vq-names { display: flex; flex-direction: column; gap: 8px; }
.tx-vq-name { font-size: clamp(26px, 9cqh, 96px); font-weight: 800; color: #1c3f9a; line-height: 1.12; overflow-wrap: anywhere; }
.tx-vq-names .tx-vq-name:not(:only-child) { font-size: clamp(20px, 6cqh, 60px); }
.tx-vq-name small { display: block; font-size: .4em; color: #b86e00; }
.tx-vq-act { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.tx-vq-flip { width: min(40cqh, 260px); aspect-ratio: 3/4; border-radius: 22px; background: linear-gradient(135deg, #4f8cff, #7a5cff); color: #fff; font-size: min(25cqh, 160px); font-weight: 800; display: grid; place-items: center; box-shadow: 0 16px 40px rgba(60, 80, 200, .35); animation: tx-vq-spinc 1.6s ease-in-out; }
@keyframes tx-vq-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes tx-vq-spinc { 0% { transform: rotateY(0); } 100% { transform: rotateY(1080deg); } }
.tx-vq-conf { position: absolute; inset: 0; pointer-events: none; }
.tx-vq-conf i { position: absolute; top: -10px; width: 10px; height: 16px; border-radius: 3px; animation: tx-vq-fall 2.4s ease-in forwards; }
@keyframes tx-vq-fall { to { transform: translateY(110cqh) rotate(720deg); opacity: .2; } }
.tx-vq-ctl { display: flex; justify-content: center; padding: 6px 12px 14px; }
.tx-vq-ctl .tx-big { min-width: 180px; }
.tx-vq-list { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 6px; max-height: 40vh; overflow: auto; }
.tx-vq-it { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.tx-vq-it:hover { background: #f0f5ff; }
.tx-vq-it input { width: 16px; height: 16px; accent-color: #2b7bfe; }
.tx-vq-it span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-vq-it i { font-style: normal; color: #0c8d65; font-weight: 800; }
.tx-vq-ex span { color: var(--text-muted); text-decoration: line-through; }
.tx-vq-called span { color: #5f6f94; }
.tx-vong-quay.is-float .tx-vq-act [data-a="exclude"], .tx-vong-quay.is-float .tx-vq-act [data-a="hideRes"] { display: none; }
.tx-vong-quay.is-float .tx-vq-act { flex-wrap: wrap; gap: 4px; }
.tx-vong-quay.is-float .tx-vq-act .tx-btn { height: 32px; padding: 0 9px; font-size: 12.5px; }
.tx-vong-quay.is-float .tx-vq-name { font-size: 26px; }
.tx-vong-quay.is-present .tx-vq-ctl { position: absolute; left: 0; right: 0; bottom: 10px; opacity: .35; }
.tx-vong-quay.is-present .tx-vq-ctl:hover { opacity: 1; }

/* ===== Chia nhóm (tx-cn-) ===== */
.tx-cn-info { padding: 8px 12px 0; min-height: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.tx-cn-board { flex: 1; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; padding: 12px; align-content: start; overflow: auto; container-type: inline-size; }
.tx-cn-board > .tx-msg { grid-column: 1 / -1; }
.tx-cn-g { background: #fff; border: 2px solid color-mix(in srgb, var(--gc) 45%, white); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.tx-cn-g header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: color-mix(in srgb, var(--gc) 16%, white); }
.tx-cn-g header b { font-size: 16px; color: var(--text-strong); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-cn-g header small { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.tx-cn-gdot { width: 14px; height: 14px; border-radius: 50%; background: var(--gc); flex-shrink: 0; }
.tx-cn-gname { flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; font: inherit; font-weight: 700; font-size: 15px; color: var(--text-strong); border-radius: 6px; padding: 2px 6px; }
.tx-cn-gname:hover, .tx-cn-gname:focus { border-color: #b6c9ee; background: #fff; outline: 0; }
.tx-cn-color { width: 28px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.tx-cn-locked { border-style: dashed; }
.tx-cn-ms { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; min-height: 56px; align-content: flex-start; flex: 1; }
.tx-cn-ms.tx-cn-over { background: #eef5ff; outline: 2px dashed #8fb5f7; outline-offset: -4px; }
.tx-cn-empty { color: var(--text-muted); font-size: 13px; padding: 6px; }
.tx-cn-chip { display: inline-flex; align-items: center; gap: 4px; background: #f4f7fd; border: 1px solid #dbe4f4; border-radius: 99px; padding: 4px 6px 4px 10px; font-size: 13.5px; font-weight: 600; color: var(--text-strong); cursor: grab; max-width: 100%; user-select: none; }
.tx-cn-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-cn-chip:focus-visible { outline: 3px solid #2b7bfe; }
.tx-cn-lead { background: #fff6dc; border-color: #f5cf6a; }
.tx-cn-star { font-style: normal; color: #e9a400; }
.tx-cn-lk { border-style: dashed; border-color: #8e9dbd; }
.tx-cn-sel { outline: 3px solid #ff9f43; }
.tx-cn-drag { opacity: .4; }
.tx-cn-tag { font-style: normal; font-size: 11px; font-weight: 800; color: #6c4ad6; background: #efe9ff; border-radius: 6px; padding: 0 5px; }
.tx-cn-ib { border: 0; background: none; cursor: pointer; font-size: 12px; padding: 2px 3px; border-radius: 6px; opacity: .55; line-height: 1; }
.tx-cn-ib:hover { opacity: 1; background: #e6eefc; }
.tx-cn-anim .tx-cn-chip { animation: tx-cn-in .45s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes tx-cn-in { from { transform: translateY(-26px) scale(.7); opacity: 0; } }
.tx-cn-un { padding: 0 12px 10px; }
.tx-cn-un > b { font-size: 13.5px; }
.tx-cn-un .tx-cn-ms { background: #fffaf0; border: 1px dashed #f0cf8a; border-radius: 12px; margin-top: 6px; }
.tx-cn-foot { border-top: 1px solid var(--border-soft); border-bottom: 0; }
.tx-cn-sets { display: flex; flex-direction: column; gap: 4px; padding: 0 10px 8px; }
.tx-cn-set { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border-soft); border-radius: 10px; background: #fff; }
.tx-cn-set.tx-sel { border-color: #7aa7f7; background: #eef4ff; }
.tx-cn-open { flex: 1; text-align: left; border: 0; background: none; padding: 6px 8px; cursor: pointer; font: inherit; display: flex; flex-direction: column; min-width: 0; }
.tx-cn-open b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-cn-open small { font-size: 12px; color: var(--text-muted); }
.tx-cn-tags { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 12px; }
.tx-cn-tagb { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--border-soft); background: #fff; border-radius: 8px; padding: 4px 8px; cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.tx-cn-tagb em { font-style: normal; font-weight: 800; color: #6c4ad6; }
.tx-chia-nhom.is-present .tx-cn-board { padding: 22px; gap: 18px; }
.tx-chia-nhom.is-present .tx-cn-g header b, .tx-root.is-present .tx-cn-g header b { font-size: clamp(18px, 2.4cqw, 34px); }
.tx-root.is-present .tx-cn-chip { font-size: clamp(15px, 1.7cqw, 26px); padding: 6px 14px; cursor: default; }
.tx-root.is-present .tx-cn-g header small { font-size: clamp(13px, 1.2cqw, 18px); }

/* ===== Bốc thăm (tx-bt-) ===== */
.tx-bt-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 16px; min-height: 280px; container-type: size; overflow: auto; }
.tx-bt-box { width: min(46cqh, 60cqw, 340px); aspect-ratio: 1.1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.tx-bt-front-box { height: 62%; background: linear-gradient(180deg, #ff8a5c, #f2603a); border-radius: 18px 18px 26px 26px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .1), 0 14px 30px rgba(220, 90, 50, .3); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: min(5cqh, 28px); letter-spacing: 2px; position: relative; z-index: 2; }
.tx-bt-slips { position: absolute; left: 12%; right: 12%; top: 8%; height: 45%; }
.tx-bt-slips i { position: absolute; bottom: 0; width: 26%; height: 80%; background: #fff7d6; border: 2px solid #f1d27a; border-radius: 6px; transform-origin: bottom center; }
.tx-bt-slips i:nth-child(1) { left: 2%; transform: rotate(-16deg); } .tx-bt-slips i:nth-child(2) { left: 20%; transform: rotate(-6deg); height: 92%; } .tx-bt-slips i:nth-child(3) { left: 38%; transform: rotate(3deg); height: 100%; } .tx-bt-slips i:nth-child(4) { left: 56%; transform: rotate(9deg); } .tx-bt-slips i:nth-child(5) { left: 72%; transform: rotate(18deg); height: 70%; }
.tx-bt-shake { animation: tx-bt-shake .3s ease-in-out 3; }
@keyframes tx-bt-shake { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.tx-bt-cards { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: stretch; width: 100%; }
.tx-bt-cards:empty { display: none; }
.tx-bt-card { position: relative; width: min(46cqw, 520px); min-height: min(40cqh, 300px); border: 0; padding: 0; background: none; cursor: pointer; perspective: 1000px; animation: tx-bt-up .55s cubic-bezier(.2, 1.3, .4, 1) both; font: inherit; }
.tx-bt-cards .tx-bt-card:not(:only-child) { width: min(30cqw, 380px); min-height: min(30cqh, 220px); }
.tx-bt-back, .tx-bt-front { position: absolute; inset: 0; border-radius: 20px; display: flex; align-items: center; justify-content: center; padding: 18px 22px; backface-visibility: hidden; transition: transform .6s; box-shadow: 0 12px 30px rgba(30, 60, 140, .2); }
.tx-bt-back { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #222)); color: #fff; font-size: min(18cqh, 110px); font-weight: 800; }
.tx-bt-front { background: #fffdf3; border: 3px solid var(--c); color: var(--text-strong); font-size: clamp(18px, 4.6cqh, 46px); font-weight: 700; line-height: 1.25; text-align: center; overflow-wrap: anywhere; overflow: auto; transform: rotateY(180deg); white-space: pre-wrap; }
.tx-bt-open .tx-bt-back { transform: rotateY(180deg); }
.tx-bt-open .tx-bt-front { transform: rotateY(0); position: relative; min-height: inherit; }
.tx-bt-open { cursor: default; }
@keyframes tx-bt-up { from { transform: translateY(60px) scale(.6); opacity: 0; } }
.tx-bt-add { display: flex; gap: 6px; padding: 0 14px 6px; }
.tx-bt-add .tx-in { flex: 1; }
.tx-bt-paste { padding: 0 14px 6px; font-size: 13px; }
.tx-bt-paste summary { cursor: pointer; color: var(--cta-500); font-weight: 600; margin-bottom: 4px; }
.tx-bt-paste .tx-btn { margin-top: 6px; }
.tx-bt-items { list-style: none; margin: 0; padding: 0 10px 6px; display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow: auto; counter-reset: bt; }
.tx-bt-items li { display: flex; align-items: center; gap: 2px; counter-increment: bt; }
.tx-bt-items li::before { content: counter(bt); width: 22px; font-size: 12px; color: var(--text-muted); text-align: right; padding-right: 4px; flex-shrink: 0; }
.tx-bt-items li .tx-in { flex: 1; height: 32px; }
.tx-bt-done .tx-in { color: var(--text-muted); text-decoration: line-through; }
.tx-boc-tham.is-float .tx-big { height: 40px; font-size: 15px; padding: 0 14px; }

/* ===== Đồng hồ học tập (tx-dh-) ===== */
.tx-dh-wrap { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2cqw; padding: 14px; flex-wrap: wrap; container-type: inline-size; }
.tx-dh-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.tx-dh-cap { font-weight: 800; font-size: clamp(15px, 1.6cqw, 28px); color: var(--brand-800); min-height: 1.2em; }
.tx-dh-clk { width: min(420px, 40cqw, calc((100vh - 360px) * var(--vz, 1))); min-width: 220px; aspect-ratio: 1; }
.tx-root.is-present .tx-dh-clk { width: min(64vh, 42cqw); }
.tx-dh-svg { width: 100%; height: 100%; touch-action: none; user-select: none; }
.tx-dh-rim { fill: #4f8cff; } .tx-dh-face { fill: #fff; }
.tx-dh-tk { stroke: #9aaccc; stroke-width: 2; } .tx-dh-tk5 { stroke: #1a2150; stroke-width: 4; stroke-linecap: round; }
.tx-dh-num { font: 800 26px "Be Vietnam Pro", system-ui, sans-serif; fill: #1a2150; text-anchor: middle; dominant-baseline: central; }
.tx-dh-num24 { font: 700 13px "Be Vietnam Pro", system-ui, sans-serif; fill: #e2553c; text-anchor: middle; dominant-baseline: central; display: none; }
.tx-dh-24 .tx-dh-num24 { display: block; }
.tx-dh-nonum .tx-dh-num, .tx-dh-nonum .tx-dh-num24 { display: none; }
.tx-dh-h { stroke: #1a2150; stroke-width: 11; stroke-linecap: round; cursor: grab; }
.tx-dh-m { stroke: #2b7bfe; stroke-width: 7; stroke-linecap: round; cursor: grab; }
.tx-dh-s { stroke: #e2553c; stroke-width: 2.5; stroke-linecap: round; pointer-events: none; }
.tx-dh-pin { fill: #1a2150; stroke: #fff; stroke-width: 3; }
.tx-dh-lock .tx-dh-h, .tx-dh-lock .tx-dh-m { cursor: default; }
.tx-dh-dig { display: flex; flex-direction: column; align-items: center; background: #0f2148; color: #7ef0c0; border-radius: 14px; padding: 6px 22px; min-width: 200px; text-align: center; }
.tx-dh-dig b { font-variant-numeric: tabular-nums; font-size: clamp(30px, 4.4cqw, 76px); letter-spacing: 2px; line-height: 1.1; }
.tx-dh-dig small { font-size: clamp(13px, 1.4cqw, 24px); color: #ffe08a; font-weight: 700; }
.tx-dh-dig em { font-style: normal; font-size: clamp(12px, 1.2cqw, 20px); color: #cfe0ff; }
.tx-dh-q { color: #ffd166; }
.tx-dh-day { color: #ff9f7a !important; }
.tx-dh-adj { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tx-dh-adj .tx-btn { height: 32px; padding: 0 9px; }
.tx-dh-set { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.tx-dh-set .tx-in { width: 60px; }
.tx-dh-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tx-dh-arrow { font-size: clamp(30px, 4cqw, 70px); color: #9aaccc; line-height: 1; }
.tx-dh-diff { display: flex; flex-direction: column; align-items: center; background: #fff6dc; border: 2px solid #f5cf6a; border-radius: 14px; padding: 8px 16px; }
.tx-dh-diff span { font-size: 13px; color: #8a6400; font-weight: 700; }
.tx-dh-diff b { font-size: clamp(20px, 2.4cqw, 40px); color: #6b4500; }
.tx-dh-diff small { color: #8a6400; }
.tx-dh-foot { border-top: 1px solid var(--border-soft); border-bottom: 0; }

/* ===== Tín hiệu lớp học (tx-th-) ===== */
.tx-th-stage { flex: 1; display: flex; min-height: 220px; padding: 12px; container-type: size; }
.tx-th-big { flex: 1; border-radius: 22px; background: color-mix(in srgb, var(--sc) 14%, white); border: 4px solid var(--sc); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5cqh; padding: 16px; text-align: center; }
.tx-th-none { --sc: #c4cfe3; background: #f6f8fc; color: var(--text-muted); }
.tx-th-ic { font-size: min(34cqh, 30cqw); line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); }
.tx-th-name { font-size: min(13cqh, 9cqw); font-weight: 800; color: color-mix(in srgb, var(--sc) 70%, #10183a); line-height: 1.1; overflow-wrap: anywhere; }
.tx-th-none .tx-th-name { color: var(--text-muted); font-size: min(8cqh, 6cqw); }
.tx-th-note { font-size: min(6cqh, 4.4cqw); color: #2d3558; font-weight: 600; }
.tx-th-timer { font-size: min(9cqh, 6cqw); font-weight: 800; color: #10183a; background: #fff; border-radius: 99px; padding: .1em .7em; font-variant-numeric: tabular-nums; }
.tx-th-in { animation: tx-th-in .5s ease-out; }
@keyframes tx-th-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.tx-th-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 0 12px 10px; }
.tx-th-b { display: flex; align-items: center; gap: 8px; border: 2px solid color-mix(in srgb, var(--sc) 40%, white); background: #fff; border-radius: 12px; padding: 6px 10px; cursor: pointer; font: inherit; text-align: left; min-height: 46px; }
.tx-th-b span { font-size: 22px; }
.tx-th-b b { font-size: 13.5px; color: var(--text-strong); line-height: 1.2; }
.tx-th-b:hover { background: color-mix(in srgb, var(--sc) 8%, white); }
.tx-th-b.tx-sel { background: var(--sc); border-color: var(--sc); }
.tx-th-b.tx-sel b { color: #fff; }
.tx-th-foot { border-top: 1px solid var(--border-soft); border-bottom: 0; }
.tx-th-edit { padding: 10px 12px; border-top: 1px solid var(--border-soft); background: #fbfcff; max-height: 44vh; overflow: auto; }
.tx-th-rows { display: flex; flex-direction: column; gap: 6px; }
.tx-th-row { display: grid; grid-template-columns: 64px minmax(120px, 1fr) 40px minmax(140px, 2fr) auto auto auto; gap: 6px; align-items: center; }
.tx-th-row input[type=color] { width: 40px; height: 34px; border: 0; padding: 0; background: none; }
.tx-tin-hieu.is-float .tx-th-pick { grid-template-columns: repeat(2, 1fr); gap: 4px; }
.tx-tin-hieu.is-float .tx-th-b { min-height: 36px; padding: 3px 8px; }
.tx-tin-hieu.is-float .tx-th-b span { font-size: 17px; }
.tx-tin-hieu.is-float .tx-th-foot { display: none; }
.tx-tin-hieu.is-present .tx-th-pick { opacity: .3; transition: opacity .2s; } .tx-tin-hieu.is-present .tx-th-pick:hover { opacity: 1; }

/* ===== Bảng thi đua (tx-td-) ===== */
.tx-td-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tx-td-title { font-size: 15px; }
.tx-td-board { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 14px; align-content: start; overflow: auto; container-type: inline-size; }
.tx-td-board.tx-td-many { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tx-td-team { position: relative; background: #fff; border: 2px solid color-mix(in srgb, var(--tc) 45%, white); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 4px 12px rgba(30, 60, 140, .08); transition: transform .2s; }
.tx-td-top { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.tx-td-name { font-size: 15px; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-td-medal { font-size: 22px; } .tx-td-rank { font-size: 12px; font-weight: 800; color: #fff; background: #9aaccc; border-radius: 99px; padding: 0 7px; }
.tx-td-score { font-size: 46px; font-weight: 800; color: color-mix(in srgb, var(--tc) 75%, #10183a); line-height: 1.05; font-variant-numeric: tabular-nums; }
.tx-td-many .tx-td-score { font-size: 32px; } .tx-td-many .tx-td-name { font-size: 13.5px; }
.tx-td-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tx-td-p { min-width: 40px; height: 34px; border-radius: 9px; border: 0; background: color-mix(in srgb, var(--tc) 16%, white); color: color-mix(in srgb, var(--tc) 70%, #10183a); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; touch-action: manipulation; }
.tx-td-p:hover { background: color-mix(in srgb, var(--tc) 28%, white); }
.tx-td-p:active { transform: scale(.94); }
.tx-td-m { background: #fdece8; color: #b8432b; } .tx-td-c { background: #eef2f9; color: #4a5a80; }
.tx-td-many .tx-td-p { min-width: 32px; height: 30px; font-size: 13px; }
.tx-td-bump { transform: scale(1.05); }
.tx-td-fly { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); font-size: 26px; font-weight: 800; color: #f59e0b; pointer-events: none; animation: tx-td-fly 1.1s ease-out forwards; text-shadow: 0 2px 6px rgba(0, 0, 0, .15); white-space: nowrap; }
.tx-td-fly.neg { color: #8e9dbd; }
@keyframes tx-td-fly { to { transform: translate(-50%, -70px); opacity: 0; } }
.tx-td-hist li.tx-td-undone span { text-decoration: line-through; color: var(--text-muted); }
.tx-td-setup { padding: 18px 20px; overflow: auto; }
.tx-td-setup h3 { margin: 0 0 10px; font-size: 19px; }
.tx-td-setup h4 { margin: 16px 0 8px; font-size: 15px; }
.tx-td-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tx-td-kinds > label { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 12px; cursor: pointer; background: #fff; }
.tx-td-kinds > label:has(input:checked) { border-color: #2b7bfe; background: #f2f7ff; }
.tx-td-kinds > label:has(input:disabled) { opacity: .5; }
.tx-td-kinds small { color: var(--text-muted); font-size: 12.5px; }
.tx-td-sum { display: flex; flex-direction: column; gap: 14px; }
.tx-td-podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; min-height: 220px; }
.tx-td-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 170px; text-align: center; animation: tx-vq-pop .6s both; }
.tx-td-pod i { display: block; width: 100%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #ffd166, #f5a524); }
.tx-td-pod.r1 i { height: 120px; } .tx-td-pod.r2 i { height: 85px; background: linear-gradient(180deg, #e3e9f5, #b7c3da); } .tx-td-pod.r3 i { height: 60px; background: linear-gradient(180deg, #f2c7a5, #d18e5c); }
.tx-td-pod.r2 { animation-delay: .25s; } .tx-td-pod.r3 { animation-delay: .5s; }
.tx-td-pm { font-size: 40px; } .tx-td-pod b { font-size: 16px; } .tx-td-pod span { font-size: 13px; color: var(--text-muted); }
.tx-td-cheer { text-align: center; font-size: 24px; font-weight: 800; color: #b86e00; padding: 20px; }
.tx-td-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.tx-td-all div { display: flex; justify-content: space-between; border-left: 5px solid var(--tc); background: #f7f9fd; border-radius: 8px; padding: 6px 10px; }
.tx-td-vtitle { text-align: center; font-size: clamp(20px, 3cqw, 44px); font-weight: 800; color: var(--brand-800); padding: 14px 10px 0; }
.tx-root.is-present .tx-td-board { grid-template-columns: repeat(auto-fit, minmax(min(260px, 30cqw), 1fr)); gap: 18px; padding: 22px; }
.tx-root.is-present .tx-td-score { font-size: clamp(48px, 7cqw, 120px); }
.tx-root.is-present .tx-td-name { font-size: clamp(16px, 2cqw, 34px); }
.tx-root.is-present .tx-td-many .tx-td-score { font-size: clamp(30px, 3.6cqw, 64px); }
.tx-thi-dua.is-float .tx-td-board { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; padding: 8px; }
.tx-thi-dua.is-float .tx-td-score { font-size: 30px; }
.tx-thi-dua.is-float .tx-bar label, .tx-thi-dua.is-float .tx-bar [data-a="new"] { display: none; }

/* ===== Thước đo tiếng ồn (tx-to-) ===== */
.tx-to-priv { padding: 6px 12px; background: #f3f8ff; border-bottom: 1px solid var(--border-soft); }
.tx-to-msg { padding: 8px 12px 0; }
.tx-to-meter { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2cqh; padding: 14px; container-type: size; min-height: 260px; position: relative; transition: background .5s; }
.tx-to-gauge { width: min(80cqw, 70cqh * 1.6, 620px); }
.tx-to-trk { fill: none; stroke: #e6ecf6; stroke-width: 18; stroke-linecap: round; }
.tx-to-val { fill: none; stroke-width: 18; stroke-linecap: round; transition: stroke .4s; }
.tx-to-lim { stroke: #1a2150; stroke-width: 2; stroke-dasharray: 3 3; opacity: .55; }
.tx-to-ndl { stroke: #1a2150; stroke-width: 5; stroke-linecap: round; transition: transform .12s linear; }
.tx-to-face { font-size: min(14cqh, 16cqw); line-height: 1; margin-top: -2cqh; }
.tx-to-zone { font-size: min(8cqh, 8cqw); font-weight: 800; color: var(--text-muted); transition: color .4s; text-align: center; }
.tx-to-bar { position: relative; width: min(80cqw, 620px); height: 14px; background: #e6ecf6; border-radius: 99px; }
.tx-to-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; transition: width .1s linear, background .4s; }
.tx-to-bar b { position: absolute; top: -5px; bottom: -5px; width: 3px; background: #1a2150; border-radius: 2px; opacity: .6; }
.tx-to-num { font-size: min(4cqh, 18px); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tx-to-num span { font-weight: 800; color: var(--text-strong); }
.tx-to-alert { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: #fff1ee; border: 3px solid #e5483b; color: #b8322a; border-radius: 16px; padding: 8px 18px; font-size: min(5.5cqh, 34px); font-weight: 800; white-space: nowrap; animation: tx-th-in .4s ease-out; }
.tx-to-loud { background: #fff7f5; }
.tx-tieng-on.is-float .tx-bar label:not(:first-of-type), .tx-tieng-on.is-float .tx-to-priv, .tx-tieng-on.is-float [data-a="calib"] { display: none; }

/* ===== Điểm danh nhanh (tx-dd-) – dùng chung dữ liệu Chuyên cần ===== */
.tx-dd { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tx-dd-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; }
.tx-dd-c { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 99px; background: #eef3fb; font-size: 13px; }
.tx-dd-c.tx-dd-P { background: #e6f7ec; color: #1d7a3e; } .tx-dd-c.tx-dd-E { background: #fff5dd; color: #8a5a00; }
.tx-dd-c.tx-dd-U { background: #ffeceb; color: #b3261e; } .tx-dd-c.tx-dd-Q { background: #f1f1f4; color: #555; }
.tx-dd-note { padding: 0 12px 8px; font-size: 13px; }
.tx-dd-bulk { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 8px; }
.tx-dd-list { flex: 1; overflow: auto; padding: 0 12px 10px; display: flex; flex-direction: column; gap: 4px; min-height: 160px; }
.tx-dd-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: #fff; border: 1px solid var(--border-soft); }
.tx-dd-row.tx-dd-ch { border-color: #f5b84a; background: #fffaf0; }
.tx-dd-no { width: 28px; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 13px; flex: none; }
.tx-dd-nm { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.tx-dd-nm small { color: var(--text-muted); font-weight: 400; }
.tx-dd-nm em { font-style: normal; font-weight: 500; font-size: 12px; padding: 1px 7px; border-radius: 99px; background: #eef3fb; color: #3a5c9a; margin-left: 4px; }
.tx-dd-nm em.tx-dd-tag { background: #fff2dc; color: #8a5a00; }
.tx-dd-st { display: inline-flex; gap: 4px; flex: none; }
.tx-dd-b { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1.4px solid #d5deec; background: #fff; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.tx-dd-b b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #eef3fb; font-size: 12px; }
.tx-dd-b:disabled { opacity: .45; cursor: default; }
.tx-dd-b.tx-dd-P.tx-sel { background: #e6f7ec; border-color: #3aa35f; color: #1d7a3e; } .tx-dd-b.tx-dd-P.tx-sel b { background: #3aa35f; color: #fff; }
.tx-dd-b.tx-dd-E.tx-sel { background: #fff5dd; border-color: #e0a100; color: #8a5a00; } .tx-dd-b.tx-dd-E.tx-sel b { background: #e0a100; color: #fff; }
.tx-dd-b.tx-dd-U.tx-sel { background: #ffeceb; border-color: #d9443a; color: #b3261e; } .tx-dd-b.tx-dd-U.tx-sel b { background: #d9443a; color: #fff; }
.tx-dd-b.tx-dd-N.tx-sel { background: #eef0f5; border-color: #8a93a6; color: #3d4556; } .tx-dd-b.tx-dd-N.tx-sel b { background: #8a93a6; color: #fff; }
.tx-dd-foot { border-top: 1px solid var(--border-soft); border-bottom: 0; position: sticky; bottom: 0; }
@container (max-width: 760px) { .tx-dd-b span { display: none; } .tx-dd-b { padding: 0 6px; } }

/* ===== Sơ đồ lớp học (tx-sdl-) ===== */
.tx-sdl-cfg { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tx-sdl-menu { position: absolute; right: 12px; top: 54px; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md, 0 8px 24px rgba(20,40,90,.16)); padding: 6px; display: flex; flex-direction: column; min-width: 230px; }
.tx-sdl-menu button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text-strong); }
.tx-sdl-menu button:hover { background: #f0f6ff; } .tx-sdl-menu .tx-red { color: #b8432b; }
.tx-sdl-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); }
.tx-sdl-main { overflow: auto; }
.tx-sdl-room { padding: 14px 18px 18px; container-type: inline-size; min-width: calc(var(--cols) * var(--per-w, 120px)); }
.tx-sdl-front { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 18px; position: relative; }
.tx-sdl-board { width: min(60%, 520px); text-align: center; padding: 8px; border-radius: 8px; background: #2f6b4f; color: #eaf7ee; font-weight: 800; letter-spacing: 4px; border: 4px solid #b28b5e; }
.tx-sdl-teacher { position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 8px 14px; border-radius: 8px; background: #f3e4cf; border: 1.5px solid #c9a679; color: #6b4a22; font-size: 13px; font-weight: 700; }
.tx-sdl-tl .tx-sdl-teacher { right: auto; left: 0; }
.tx-sdl-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: clamp(14px, 3cqw, 40px); row-gap: clamp(8px, 1.4cqw, 16px); }
.tx-sdl-desk { display: grid; gap: 4px; padding: 5px; border-radius: 10px; background: #efe3d1; border: 1.5px solid #d8c2a3; }
.tx-sdl-single { grid-template-columns: 1fr; } .tx-sdl-double { grid-template-columns: 1fr 1fr; } .tx-sdl-cluster { grid-template-columns: 1fr 1fr; }
.tx-sdl-seat { position: relative; min-height: 52px; border-radius: 8px; border: 1.5px solid #d5deec; background: #fff; font: inherit; cursor: pointer; padding: 4px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center; color: var(--text-strong); border-top: 4px solid var(--tc, #d5deec); }
.tx-sdl-seat:hover { border-color: #7aa7f7; }
.tx-sdl-empty { background: #fafbfd; border-style: dashed; border-top-style: dashed; }
.tx-sdl-nm { font-size: clamp(11px, 1.15cqw, 14px); font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tx-sdl-tm { font-size: 10.5px; color: var(--text-muted); }
.tx-sdl-plus { font-size: 18px; color: #b5c2d8; }
.tx-sdl-lk { position: absolute; top: 1px; right: 3px; font-size: 11px; font-style: normal; }
.tx-sdl-lock { background: #f6f3ff; border-color: #b7a6f0; }
.tx-sdl-seat.tx-sel { outline: 3px solid #2b7bfe; outline-offset: 1px; }
.tx-sdl-picked { box-shadow: 0 0 0 3px #f5b400 inset; background: #fffbe8 !important; }
.tx-sdl-over { background: #e3eeff !important; border-color: #2b7bfe !important; }
.tx-sdl-drag { opacity: .45; }
.tx-sdl-abs { background: #f4f4f6; color: #8a8f99; }
.tx-sdl-abs .tx-sdl-nm { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.tx-sdl-att { font-style: normal; font-size: 10px; font-weight: 700; color: #b3261e; }
.tx-sdl-legend { font-size: 12.5px; color: var(--text-muted); display: inline-flex; gap: 6px; align-items: center; }
.tx-sdl-lg-abs { width: 14px; height: 14px; border-radius: 4px; background: #f4f4f6; border: 1.5px solid #c7ccd6; display: inline-block; }
.tx-sdl-un { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 8px; min-height: 60px; border-radius: 10px; }
.tx-sdl-un.tx-sdl-over { outline: 2px dashed #2b7bfe; }
.tx-sdl-chip { border: 1.4px solid #d5deec; border-left: 5px solid var(--tc, #d5deec); background: #fff; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px; cursor: grab; text-align: left; }
.tx-sdl-chip small { color: var(--text-muted); }
.tx-sdl-teams { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.tx-sdl-teams span { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: #f3f6fb; border-left: 5px solid var(--tc); }
.tx-sdl-cur { padding: 4px 14px 10px; font-size: 18px; }
.tx-sdl-pick { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 30, 60, .35); z-index: 30; }
.tx-sdl-pk { background: #fff; border-radius: 20px; padding: 28px 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: tx-vq-pop .45s both; }
.tx-sdl-pk b { font-size: clamp(28px, 5cqw, 64px); color: var(--brand-800); text-align: center; }
.tx-root.is-present .tx-sdl-room { min-width: 0; padding: 2cqh 2cqw; }
.tx-root.is-present .tx-sdl-seat { min-height: clamp(48px, 6cqh, 90px); }
.tx-root.is-present .tx-sdl-nm { font-size: clamp(12px, 1.4cqw, 26px); }
.tx-root.is-present .tx-sdl-abs { background: #fff; color: var(--text-strong); }
.tx-root.is-present .tx-sdl-abs .tx-sdl-nm { text-decoration: none; }

/* ===== Sơ đồ tư duy (tx-sd-) ===== */
.tx-sd-wrap { position: relative; flex: 1; min-height: 420px; overflow: hidden; background: radial-gradient(circle, #e8eef8 1px, transparent 1.2px) 0 0 / 22px 22px, #fbfcff; }
.tx-sd-svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
.tx-sd-svg:active { cursor: grabbing; }
.tx-sd-node { cursor: pointer; }
.tx-sd-node:hover rect { filter: brightness(1.04); }
.tx-sd-ghost { opacity: .7; pointer-events: none; }
.tx-sd-target rect { stroke: #f5b400 !important; stroke-width: 5 !important; stroke-dasharray: 6 4; }
.tx-sd-more { cursor: pointer; }
.tx-sd-colors { display: inline-flex; gap: 4px; }
.tx-sd-colors button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1px #cfd8e6; cursor: pointer; padding: 0; }
.tx-sd-colors button:disabled { opacity: .35; cursor: default; }
.tx-sd-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; }
.tx-sd-zoom .tx-btn { width: 38px; padding: 0; font-size: 17px; }
.tx-sd-rev { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: none; align-items: center; gap: 12px; background: rgba(255,255,255,.92); border-radius: 14px; padding: 8px 12px; box-shadow: 0 6px 20px rgba(20,40,90,.15); font-weight: 700; }
.tx-root.is-present .tx-sd-rev { display: flex !important; }
.tx-sd-ed { position: absolute; z-index: 5; border: 3px solid #f5b400; border-radius: 12px; padding: 6px 10px; font: inherit; font-weight: 600; resize: none; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.15); background: #fff; }
.tx-sd-tip { padding: 6px 12px; border-top: 1px solid var(--border-soft); }
.tx-root.is-present .tx-sd-wrap { min-height: 0; }
.tx-root:focus { outline: none; }

/* ===== Tiện ích nổi trên Bảng trắng ===== */
.ut2-bt-menu { position: fixed; z-index: 1200; width: 340px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 36px rgba(20, 40, 90, .2); padding: 8px; }
.ut2-bt-menu h6 { margin: 4px 8px 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.ut2-bt-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: 10px; padding: 7px 8px; text-align: left; cursor: pointer; font: inherit; color: var(--text-strong); }
.ut2-bt-menu button:hover, .ut2-bt-menu button:focus-visible { background: #f0f6ff; }
.ut2-bt-menu img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.ut2-bt-menu span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ut2-bt-menu b { font-size: 14px; } .ut2-bt-menu small { font-size: 12px; color: var(--text-muted); }
.ut2-bt-menu em { font-style: normal; font-size: 11.5px; color: #0c6e4f; background: #e5f7ef; border-radius: 99px; padding: 2px 8px; }
.ut2-bt-menu p { margin: 6px 8px 2px; font-size: 12px; color: var(--text-muted); }
/* Vòng quay ở cửa sổ nổi: chỉ giữ Nguồn + Chọn, ẩn cột danh sách để vòng quay đủ lớn */
.tx-vong-quay.is-float .tx-side { display: none; }
.tx-vong-quay.is-float .tx-bar > :not(label:first-child):not(:has([data-a="count"])) { display: none; }
.tx-vong-quay.is-float .tx-bar { padding: 6px 8px; }
.tx-vong-quay.is-float .tx-vq-info { padding: 4px 8px; font-size: 12px; }

/* ===== Bảng điều hành tiết học (ut2-lp-) ===== */
.ut2-lp { gap: 12px; }
.ut2-lp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-xs); }
.ut2-lp-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.ut2-lp-title { display: flex; align-items: center; gap: 10px; }
.ut2-lp-title span { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ut2-lp-title input { flex: 1; min-width: 0; max-width: 560px; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 17px; font-weight: 700; color: var(--text-strong); }
.ut2-lp-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--text); align-items: center; }
.ut2-lp-el b { font-variant-numeric: tabular-nums; color: var(--brand-800); font-size: 16px; }
.ut2-lp-end { color: #b8432b; border-color: #f2bcae; }
.ut2-lp-warn { flex-basis: 100%; }
.ut2-lp-phases { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ut2-lp-ph1 { display: flex; align-items: stretch; background: #fff; border: 1.5px solid var(--border-soft); border-radius: 12px; overflow: hidden; flex: 1 1 150px; min-width: 0; }
.ut2-lp-ph1.cur { border-color: #2b7bfe; box-shadow: 0 0 0 3px rgba(43, 123, 254, .15); }
.ut2-lp-ph1.done { background: #f3faf6; }
.ut2-lp-ph1.skip { opacity: .55; background: #f6f7f9; }
.ut2-lp-ph1.skip span { text-decoration: line-through; }
.ut2-lp-pgo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 10px; font: inherit; cursor: pointer; text-align: left; color: var(--text-strong); }
.ut2-lp-pgo:disabled { cursor: default; }
.ut2-lp-pgo i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef3fb; font-weight: 800; font-size: 13px; flex: none; }
.ut2-lp-ph1.cur .ut2-lp-pgo i { background: var(--grad-cta); color: #fff; }
.ut2-lp-ph1.done .ut2-lp-pgo i { background: #3aa35f; color: #fff; }
.ut2-lp-pgo span { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ut2-lp-pgo small { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ut2-lp-pe { border: 0; border-left: 1px solid var(--border-soft); background: #fbfcff; width: 30px; cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 0; }
.ut2-lp-pe .icon { width: 15px; height: 15px; }
.ut2-lp-pe:hover { background: #eef4ff; color: var(--brand-800); }
.ut2-lp-nav { display: flex; gap: 8px; align-items: center; }
.ut2-lp-main { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(380px, 1.4fr); gap: 12px; min-height: 0; }
.ut2-lp-panel { background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; display: flex; flex-direction: column; min-height: 440px; overflow: hidden; box-shadow: var(--shadow-xs); }
.ut2-lp-ph { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); background: #fbfcff; }
.ut2-lp-ph img { width: 26px; height: 26px; object-fit: contain; }
.ut2-lp-ph b { font-size: 15px; }
.ut2-lp-ib { width: 34px; height: 32px; border-radius: 8px; border: 1.4px solid #bcd0f3; background: #fff; color: var(--brand-800); cursor: pointer; display: grid; place-items: center; }
.ut2-lp-ib .icon { width: 17px; height: 17px; }
.ut2-lp-pb { flex: 1; min-height: 0; display: flex; overflow: auto; }
.ut2-lp-pb > .tx-root { flex: 1; min-width: 0; }
.ut2-lp-flash { animation: ut2-lp-fl 1.2s ease-out; }
@keyframes ut2-lp-fl { 0%, 40% { box-shadow: 0 0 0 4px #f5b400; } 100% { box-shadow: var(--shadow-xs); } }
.ut2-lp-quick { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 10px 14px; }
.ut2-lp-quick > div { display: flex; flex-wrap: wrap; gap: 8px; }
.ut2-lp-q { display: flex; align-items: center; gap: 8px; border: 1.4px solid #d5deec; background: #fff; border-radius: 12px; padding: 6px 12px 6px 6px; font: inherit; cursor: pointer; text-align: left; }
.ut2-lp-q:hover { border-color: #7aa7f7; background: #f5f9ff; }
.ut2-lp-q.on { border-color: #3aa35f; background: #f1fbf5; }
.ut2-lp-q img { width: 32px; height: 32px; object-fit: contain; }
.ut2-lp-q span { font-weight: 650; font-size: 14px; }
.ut2-lp-q small { font-size: 11.5px; color: var(--text-muted); margin-left: 4px; }
.ut2-lp-big { position: fixed; inset: 0; z-index: 900; background: rgba(15, 25, 55, .45); display: flex; flex-direction: column; padding: 24px; }
.ut2-lp-big[hidden] { display: none !important; }
.ut2-lp-bigbar { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px 14px 0 0; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.ut2-lp-bigbar img { width: 32px; height: 32px; } .ut2-lp-bigbar b { font-size: 18px; }
.ut2-lp-bigbody { flex: 1; min-height: 0; background: #fff; border-radius: 0 0 14px 14px; display: flex; overflow: auto; }
.ut2-lp-bigbody > .tx-root { flex: 1; min-width: 0; }
.ut2-lp-sum p { margin: 0 0 10px; }
.ut2-lp-st { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.ut2-lp-st th, .ut2-lp-st td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.ut2-lp-st tr.skip td { color: var(--text-muted); text-decoration: line-through; }
.ut2-lp-con { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ut2-lp-con span { background: #f3f6fb; border-radius: 8px; padding: 4px 10px; font-size: 14px; }
.ut2-lp-sumbtn { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.ut2-lp-saved { background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.ut2-lp-saved > div { display: flex; flex-wrap: wrap; gap: 6px; }
.ut2-lp-sv { display: inline-flex; align-items: center; gap: 6px; background: #f6f8fc; border-radius: 8px; padding: 4px 6px 4px 10px; font-size: 13px; }
.ut2-lp-sv button { border: 0; background: none; cursor: pointer; color: var(--text-muted); }
@media (max-width: 1200px) { .ut2-lp-main { grid-template-columns: 1fr 1fr; } .ut2-lp-wide { grid-column: 1 / -1; } }
@media (max-width: 760px) { .ut2-lp-main { grid-template-columns: 1fr; } .ut2-lp-big { padding: 0; } }

/* =====================================================================
   GIAI ĐOẠN 2 – TƯƠNG TÁC VÀ KIỂM TRA NHANH (ix-, tiền tố riêng từng tiện ích tx-<x>-)
   ===================================================================== */
.ix-tool { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ix-topbar { gap: 10px; }
.ix-title { font-weight: 700; color: var(--text-strong); font-size: 14px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.ix-ctl { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ix-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #eef2f8; color: #49566e; }
.ix-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; opacity: .8; }
.ix-st-open { background: #e2f6ec; color: #0b7a50; } .ix-st-paused { background: #fff3dc; color: #9a5a00; } .ix-st-closed { background: #eceffd; color: #3c4fb8; }
.ix-st-done { background: #eef0f3; color: #475467; } .ix-st-archived { background: #f2f2f2; color: #777; } .ix-st-draft, .ix-st-ready { background: #f1f4fa; color: #5a6782; }
.ix-left { font-variant-numeric: tabular-nums; font-weight: 800; color: #b8432b; background: #fdece8; border-radius: 8px; padding: 4px 10px; }
.ix-prog { font-size: 13.5px; color: var(--text); } .ix-prog b { color: var(--text-strong); }
.ix-new { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ix-nl { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
@container (max-width: 760px) { .ix-nl { grid-template-columns: 1fr; } }
.ix-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ix-card h4 { margin: 0; font-size: 15px; color: var(--text-strong); }
.ix-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ix-row2 label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.ix-qta { min-height: 60px; font-size: 16px; }
.ix-newact { display: flex; align-items: center; gap: 8px; position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%); padding-top: 8px; }
.ix-setf { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.ix-setf > label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.ix-setf > label > span > .tx-in, .ix-setf > label > span > select { width: 100%; }
.ix-setf > .tx-chk { flex-direction: row; color: var(--text); font-weight: 500; grid-column: 1 / -1; }
.ix-setf > .tx-note { grid-column: 1 / -1; margin: 0; }
.ix-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ix-opts li { display: flex; align-items: center; gap: 6px; }
.ix-opts li .tx-in { flex: 1; }
.ix-ofix { flex: 1; font-weight: 600; padding: 0 6px; }
.ix-othumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-soft); }
.ix-corrchk { font-size: 12.5px; color: #0b7a50; font-weight: 700; }
.ix-let { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--c, #4f8cff); color: #fff; font-weight: 800; font-size: 14px; }
.ix-main { padding: 12px 14px; gap: 10px; overflow: auto; }
.ix-q h3 { margin: 0 0 2px; font-size: 20px; color: var(--text-strong); line-height: 1.35; overflow-wrap: anywhere; }
.ix-q small { color: var(--text-muted); font-size: 12.5px; }
.ix-sub { border: 0; background: none; padding: 0; }
.ix-seen { margin: 0; }
.ix-chartbox { background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px; }
/* biểu đồ */
.ix-bars { display: flex; flex-direction: column; gap: 8px; }
.ix-bar { display: grid; grid-template-columns: auto minmax(120px, 1.2fr) minmax(80px, 2fr) 44px 52px; align-items: center; gap: 8px; font-size: 14.5px; padding: 4px; border-radius: 10px; transition: background .3s; }
.ix-bt { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ix-bt img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.ix-bv { height: 22px; background: #eef2f8; border-radius: 99px; overflow: hidden; }
.ix-bv i { display: block; height: 100%; width: var(--w, 0%); background: var(--c); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.ix-bar b, .ix-col b { font-variant-numeric: tabular-nums; text-align: right; font-size: 16px; }
.ix-bar small, .ix-col small { color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; }
.ix-top { background: #fff7dc; } .ix-top .ix-bv, .ix-top .ix-cv { box-shadow: 0 0 0 2px #ffd666 inset; }
.ix-corr { background: #e7f8ef; }
.ix-ok { display: inline-block; font-size: 12px; font-weight: 800; color: #0b7a50; background: #d8f3e5; border-radius: 6px; padding: 1px 6px; }
.ix-cols { display: flex; align-items: flex-end; gap: 12px; min-height: 240px; padding: 6px; overflow-x: auto; }
.ix-col { flex: 1; min-width: 70px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border-radius: 10px; padding: 4px; }
.ix-col .ix-cv { width: 60%; height: 180px; background: #eef2f8; border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
.ix-col .ix-cv i { display: block; width: 100%; height: var(--h, 0%); background: var(--c); border-radius: 10px 10px 0 0; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.ix-col .ix-bt { justify-content: center; font-size: 13px; }
.ix-pie { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ix-pie svg { width: min(240px, 40%); min-width: 140px; animation: ixIn .5s ease; }
.ix-pie ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.ix-pie li { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 8px; }
.ix-pie li .ix-bt { flex: 1; }
.ix-basis { margin: 8px 0 0; }
@keyframes ixIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.ix-chart { animation: ixIn .35s ease; }
/* bảng phụ, lưới nhập hộ */
.ix-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; padding: 0 14px 10px; }
.ix-pcell { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 6px; border: 1px solid var(--border-soft); border-radius: 9px; background: #fff; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; color: var(--text-strong); }
.ix-pcell i { font-style: normal; font-size: 11px; color: var(--text-muted); min-width: 16px; }
.ix-pcell span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-pcell em { font-style: normal; font-weight: 800; color: #0b7a50; font-size: 12px; }
.ix-pcell.ix-has { background: #eefaf3; border-color: #b4e6cf; }
.ix-pcell:hover { border-color: #7aa7f7; }
.ix-pick { margin: 0 14px 10px; padding: 10px; border: 1.5px solid #7aa7f7; border-radius: 12px; background: #f4f8ff; display: flex; flex-direction: column; gap: 8px; }
.ix-pickopts { display: flex; flex-wrap: wrap; gap: 6px; } .ix-pickopts .tx-btn { white-space: normal; height: auto; min-height: 36px; text-align: left; }
.ix-aggf { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 10px; }
.ix-aggf label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; } .ix-aggf label .ix-bt { flex: 1; } .ix-aggf .tx-in { width: 80px; }
.ix-tbl { padding: 0 14px 10px; overflow-x: auto; } .ix-tbl table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ix-tbl th, .ix-tbl td { border: 1px solid var(--border-soft); padding: 4px 6px; text-align: center; } .ix-tbl td:first-child, .ix-tbl th:first-child { text-align: left; }
.ix-histwrap { padding: 14px; } .ix-histwrap h4 { margin: 0 0 10px; }
.ix-hist { display: flex; flex-direction: column; gap: 6px; }
.ix-hrow { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 4px 6px; }
.ix-hrow.tx-sel { border-color: #7aa7f7; background: #f4f8ff; }
.ix-hopen { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; padding: 4px; }
.ix-hopen b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } .ix-hopen small { color: var(--text-muted); font-size: 12px; }
/* trình chiếu */
.ix-pres { display: flex; flex-direction: column; gap: 2cqh; padding: 2cqh 3cqw; flex: 1; }
.ix-pq { font-size: clamp(22px, 3.2cqw, 56px); font-weight: 800; color: var(--text-strong); line-height: 1.25; overflow-wrap: anywhere; text-align: center; }
.ix-popts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 1.6cqw; }
.ix-popts li { display: flex; align-items: center; gap: 14px; background: #fff; border: 3px solid var(--c); border-radius: 18px; padding: 14px 18px; font-size: clamp(18px, 2.2cqw, 40px); font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.ix-popts .ix-let { width: 1.6em; height: 1.6em; font-size: .9em; background: var(--c); }
.ix-popts img { max-height: 18cqh; max-width: 30%; border-radius: 10px; }
.ix-pwait { text-align: center; color: var(--text-muted); font-size: clamp(14px, 1.5cqw, 26px); margin: 0; }
.ix-pchart .ix-bar { font-size: clamp(16px, 2cqw, 34px); grid-template-columns: auto minmax(160px, 1.3fr) minmax(120px, 2fr) 2.4em 3.2em; }
.ix-pchart .ix-bv { height: clamp(22px, 3cqh, 48px); } .ix-pchart .ix-let { width: 1.5em; height: 1.5em; font-size: .85em; }
.ix-pchart .ix-bar b { font-size: 1.15em; } .ix-pchart .ix-basis { font-size: clamp(12px, 1.1cqw, 18px); }
.ix-pchart .ix-col .ix-cv { height: 46cqh; } .ix-pchart .ix-col { font-size: clamp(14px, 1.6cqw, 28px); }
.ix-pchart .ix-pie svg { width: min(46cqh, 40%); } .ix-pchart .ix-pie li { font-size: clamp(16px, 1.8cqw, 30px); }
.tx-root.is-present .ix-tool > .ix-topbar { display: none; }
.tx-root.is-present .tx-side { display: none; }
.ix-view { height: 100%; overflow: auto; }
/* Trạm trả lời (trang học sinh) */
.ix-stpage { overflow: hidden; }
.ix-st { position: fixed; inset: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, #eef5ff, #f9fbff); }
.ix-st-top { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--border-soft); }
.ix-st-top img { width: 34px; height: 34px; object-fit: contain; } .ix-st-top b { font-size: 18px; color: var(--text-strong); }
.ix-st-top .sp { flex: 1; } .ix-st-note { font-size: 12.5px; color: var(--text-muted); }
.ix-st-me { font-weight: 700; color: #1c55c4; background: #e8f0ff; border-radius: 99px; padding: 4px 12px; font-size: 15px; } .ix-st-me:empty { display: none; }
.ix-st-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; padding: 18px max(16px, 3vw); container-type: inline-size; }
.ix-st-msg { margin: auto; text-align: center; max-width: 760px; font-size: 19px; color: var(--text); }
.ix-st-msg b { display: block; font-size: clamp(26px, 4vw, 44px); color: var(--text-strong); margin-bottom: 8px; }
.ix-st-after { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.ix-st-res { margin-top: 18px; text-align: left; } .ix-st-res .tx-root { background: #fff; border-radius: 16px; min-height: 300px; }
.ix-st-pick { max-width: 1200px; width: 100%; margin: 0 auto; text-align: center; }
.ix-st-pick h2 { margin: 0 0 4px; font-size: clamp(22px, 3vw, 36px); color: var(--text-strong); overflow-wrap: anywhere; } .ix-st-pick > p { font-size: 18px; margin: 4px 0 14px; }
.ix-st-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ix-st-nm { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 14px; border-radius: 14px; border: 2px solid #c9d8f5; background: #fff; font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; color: var(--text-strong); }
.ix-st-nm i { font-style: normal; font-size: 14px; color: var(--text-muted); min-width: 22px; } .ix-st-nm span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ix-st-nm em { font-style: normal; font-size: 12.5px; color: #0b7a50; font-weight: 800; } .ix-st-nm.done { background: #f2fbf6; border-color: #b4e6cf; }
.ix-st-nm:active { transform: scale(.98); }
.ix-st-tool { flex: 1; display: flex; flex-direction: column; gap: 14px; max-width: 1100px; width: 100%; margin: 0 auto; }
.ix-st-foot { text-align: center; padding-top: 10px; }
.ix-sq { text-align: center; } .ix-sq h2 { margin: 0; font-size: clamp(22px, 3.4vw, 40px); color: var(--text-strong); line-height: 1.3; overflow-wrap: anywhere; } .ix-sq img { max-height: 28vh; max-width: 100%; border-radius: 12px; margin-bottom: 8px; }
.ix-sopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.ix-sopt { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; border-radius: 18px; border: 3px solid var(--c); background: #fff; font: inherit; font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; color: var(--text-strong); text-align: left; cursor: pointer; }
.ix-sopt .ix-let { width: 44px; height: 44px; font-size: 22px; background: var(--c); }
.ix-sopt img { max-height: 90px; max-width: 30%; border-radius: 10px; } .ix-sot { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ix-sopt.on { background: var(--c); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); } .ix-sopt.on .ix-let { background: #fff; color: var(--c); }
.ix-sopt.on::after { content: "✓"; font-size: 28px; font-weight: 900; }
.ix-sact { display: flex; justify-content: center; } .ix-sact .tx-big { min-width: 260px; height: 60px; font-size: 20px; }
.ix-smsg { text-align: center; margin: 0; } .ix-smsg:empty { display: none; }
@media (max-width: 600px) { .ix-st-note { display: none; } .ix-setf { grid-template-columns: 1fr; } .ix-bar { grid-template-columns: auto minmax(80px, 1fr) minmax(60px, 1fr) 36px 46px; } }

/* ---- G2.3 Đám mây từ khóa ---- */
.ix-wmain { margin: 0 0 10px; }
.ix-wcbox { width: 100%; aspect-ratio: 1000 / 600; background: #fff; border: 1px solid var(--border, #e3e8f2); border-radius: 14px; overflow: hidden; }
.ix-wc { width: 100%; height: 100%; display: block; }
.ix-wc text { font-family: var(--font); font-weight: 700; transition: transform .55s ease, font-size .55s ease, fill .3s; }
.ix-wc text.ix-wnew { animation: ixwIn .6s ease-out; }
.ix-wc .ix-wempty { fill: #8a94a8; font-size: 30px; font-weight: 600; }
@keyframes ixwIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ix-wc text { transition: none; } .ix-wc text.ix-wnew { animation: none; } }
.ix-wover { margin: 6px 2px 0; }
.ix-wpres { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ix-wpres .ix-wcbox { flex: 1; min-height: 0; aspect-ratio: auto; border: 0; background: transparent; }
.ix-wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ix-wlist li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 2fr) 44px; gap: 10px; align-items: center; }
.ix-wlist .ix-bt { font-weight: 700; overflow-wrap: anywhere; }
.ix-wpres .ix-wlist { font-size: clamp(15px, 1.6cqw, 28px); max-width: 1100px; margin: 0 auto; width: 100%; }
.ix-wquick { padding: 0 14px; display: grid; gap: 6px; }
.ix-wtbl td small { display: block; color: var(--text-muted, #6b7489); font-size: 12px; }
.ix-wtbl tr.ix-whid td { opacity: .55; }
.ix-wtbl .ix-wact { white-space: nowrap; }
.ix-wsg { list-style: none; margin: 0; padding: 0 14px; display: grid; gap: 6px; }
.ix-wsg li { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.ix-wpend li { align-items: center; }
.ix-wdet { padding: 0 14px; }
.ix-wst { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; width: 100%; }
.ix-wst label { display: grid; grid-template-columns: 44px 1fr 64px; gap: 10px; align-items: center; }
.ix-wst label > span { width: 40px; height: 40px; border-radius: 12px; background: #e9f0ff; color: #1f5fd6; display: grid; place-items: center; font-weight: 800; }
.ix-wst .tx-in { font-size: 24px; padding: 14px 16px; }
.ix-wst small { color: var(--text-muted, #6b7489); }

/* ---- G2.4 Phản hồi nhanh ---- */
.ix-phsets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ix-phset { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--border, #e3e8f2); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.ix-phset small { color: var(--text-muted, #6b7489); font-size: 12px; }
.ix-phset.tx-sel { border-color: #4f8cff; background: #f1f6ff; box-shadow: 0 0 0 2px #4f8cff33; }
.ix-phic { width: 64px; font-size: 18px; }
.ix-phprev { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.ix-phbtn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--c); color: var(--c); font-weight: 700; background: #fff; }
.ix-phbtn i { font-style: normal; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--c); color: #fff; }
.ix-phbig { justify-content: center; gap: 2cqw; font-size: clamp(18px, 2.4cqw, 40px); }
.ix-phcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 12px; }
.ix-phcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: 16px; border: 2px solid var(--c); background: #fff; text-align: center; }
.ix-phcard i { font-style: normal; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 22px; font-weight: 800; }
.ix-phcard b { font-size: 34px; line-height: 1.1; color: var(--text-strong); }
.ix-phcard span { font-weight: 700; color: var(--c); }
.ix-phcard small { color: var(--text-muted, #6b7489); }
.ix-phcards.ix-phbig { gap: 2cqw; padding: 0 2cqw; }
.ix-phbig .ix-phcard { padding: 2.5cqh 1cqw; } .ix-phbig .ix-phcard i { width: 1.8em; height: 1.8em; font-size: 1.2em; } .ix-phbig .ix-phcard b { font-size: 2.6em; } .ix-phbig .ix-phcard span { font-size: .9em; }
.ix-phround { display: block; font-size: .45em; font-weight: 600; color: var(--text-muted, #6b7489); margin-top: 4px; }
.ix-phhint { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #f6f3ff; border: 1px solid #e2d9fb; }
.ix-phhint ul { margin: 6px 0 0; padding-left: 18px; }
.ix-phh { margin: 4px 0 6px; }
.ix-phdot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; vertical-align: middle; }
.ix-tbl th small, .ix-tbl td small { display: block; color: var(--text-muted, #6b7489); font-size: 11px; }
.ix-phst .ix-sopts { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; width: 100%; }
.ix-phst .ix-sopt { min-height: 96px; font-size: clamp(22px, 2.6vw, 32px); }
.ix-phst .ix-sopt .ix-let { width: 58px; height: 58px; border-radius: 50%; font-size: 28px; }
.ix-phst .ix-sact { display: none; }

/* ---- G2.5 Bức tường ý tưởng ---- */
.ix-wboard { --cw: 220px; --fs: 14.5px; }
.ix-wboard[data-z="1"] { --cw: 170px; --fs: 13px; } .ix-wboard[data-z="3"] { --cw: 300px; --fs: 17px; }
.ix-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cw), 1fr)); gap: 12px; align-items: start; }
.ix-wcols { display: grid; grid-template-columns: repeat(var(--n), minmax(var(--cw), 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.ix-wcol { background: #f3f6fb; border-radius: 14px; padding: 8px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.ix-wcol header { display: flex; align-items: center; gap: 6px; padding: 2px 4px; } .ix-wcol header b { flex: 1; color: var(--text-strong); }
.ix-wcol header small { background: #fff; border-radius: 999px; padding: 0 8px; font-weight: 700; }
.ix-wcolb { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cw), 1fr)); gap: 8px; min-height: 80px; align-content: start; }
.ix-wpresent .ix-wcol header { font-size: var(--fs); }
.ix-wfree { position: relative; background: #f3f6fb; border-radius: 14px; overflow: auto; }
.ix-wfree .ix-wcard { position: absolute; width: min(var(--cw), 16%); min-width: 150px; }
.ix-wcard { position: relative; background: var(--bg, #fff4b8); border-radius: 12px; padding: 10px 12px 8px; box-shadow: 0 2px 6px rgba(20, 30, 60, .1); font-size: var(--fs); color: #1d2433; overflow-wrap: anywhere; cursor: grab; touch-action: none; user-select: none; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s; }
.ix-wcard:hover { box-shadow: 0 6px 16px rgba(20, 30, 60, .16); }
.ix-wcard.ix-drag { z-index: 50; cursor: grabbing; box-shadow: 0 14px 30px rgba(20, 30, 60, .25); opacity: .92; }
.ix-wcard.ix-pin { outline: 2.5px solid #f0a500; }
.ix-wcard.ix-wdim { opacity: .7; border: 2px dashed #b9c2d4; }
.ix-wcard h4 { margin: 0; font-size: 1.05em; line-height: 1.3; }
.ix-wcard p { margin: 0; line-height: 1.45; white-space: normal; }
.ix-wcard img { max-width: 100%; border-radius: 8px; display: block; pointer-events: none; }
.ix-wcard footer { display: flex; gap: 8px; align-items: center; font-size: .82em; color: #4a5368; flex-wrap: wrap; }
.ix-wcard footer > span { flex: 1; font-weight: 600; }
.ix-wcm { font-size: .9em; background: rgba(255, 255, 255, .6); border-radius: 8px; padding: 4px 6px; }
.ix-wtag { align-self: flex-start; font-size: .75em; font-weight: 700; background: rgba(255, 255, 255, .75); border-radius: 999px; padding: 1px 8px; }
.ix-wcst { position: absolute; top: -8px; right: 8px; font-size: 11px; font-weight: 700; background: #6b7489; color: #fff; border-radius: 999px; padding: 1px 8px; }
.ix-wcst.ix-pend { background: #b7791f; }
.ix-wpinm { position: absolute; top: -10px; left: -6px; font-size: 18px; }
.ix-wempty2 { padding: 40px 20px; text-align: center; color: var(--text-muted, #6b7489); background: #f6f8fc; border-radius: 14px; }
.ix-wadd { display: grid; gap: 6px; padding: 0 14px; }
.ix-wfocus { display: grid; place-items: center; padding: 2cqh 4cqw; }
.ix-wfocus .ix-wcard { width: min(900px, 80%); font-size: clamp(18px, 2.4cqw, 38px); cursor: default; }
.ix-wpresent .ix-wboard { --cw: clamp(200px, 18cqw, 340px); --fs: clamp(14px, 1.35cqw, 24px); flex: 1; min-height: 0; overflow: auto; }
.ix-wpresent .ix-wcard { cursor: default; }
.ix-wdetail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
.ix-wdl { background: var(--bg); border-radius: 14px; padding: 16px; overflow-wrap: anywhere; } .ix-wdl img { max-width: 100%; border-radius: 10px; } .ix-wdl h3 { margin: 6px 0; }
.ix-wdr { display: flex; flex-direction: column; gap: 10px; } .ix-wdr label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.ix-wcolors { display: flex; gap: 6px; } .ix-wsw { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #d5dbe7; cursor: pointer; } .ix-wsw.tx-sel { border-color: #1f5fd6; box-shadow: 0 0 0 2px #1f5fd655; }
.ix-wmerge { max-height: 200px; overflow: auto; display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
@media (max-width: 760px) { .ix-wdetail { grid-template-columns: 1fr; } }
.ix-wst2 { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; width: 100%; }
.ix-wst2 .tx-in, .ix-wst2 .tx-ta { font-size: 20px; padding: 12px 14px; }
.ix-wprev { max-width: 360px; } .ix-wprev .ix-wcard { cursor: default; }

/* ---- G2.6 Chuông giành quyền ---- */
.ix-bhead { position: relative; } .ix-bst { color: #1f5fd6; } .ix-bst-open { color: #b7791f; } .ix-bst-answering, .ix-bst-won { color: #0b7a66; }
.ix-btimer { position: absolute; right: 0; top: 0; min-width: 64px; padding: 6px 12px; border-radius: 14px; background: #16213a; color: #fff; font-size: 28px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.ix-bteams { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; }
.ix-bteam { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 18px; border: 3px solid var(--c); background: #fff; font: inherit; color: var(--text-strong); cursor: pointer; transition: transform .15s, box-shadow .2s; }
.ix-bteam b { font-size: 18px; } .ix-bteam kbd { position: absolute; top: 6px; left: 8px; font: 700 12px/1 var(--font); background: #eef2f9; border-radius: 6px; padding: 3px 6px; color: #4a5368; }
.ix-bteam small { color: var(--text-muted, #6b7489); } .ix-bteam:disabled { cursor: default; }
.ix-bteam.ix-win { background: var(--c); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent), 0 10px 30px color-mix(in srgb, var(--c) 45%, transparent); transform: scale(1.04); animation: ixGlow 1.4s ease-in-out infinite; }
.ix-bteam.ix-win kbd { background: rgba(255, 255, 255, .25); color: #fff; } .ix-bteam.ix-win small { color: #fff; }
.ix-bteam.ix-out { opacity: .55; }
@keyframes ixGlow { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--c) 18%, transparent), 0 10px 30px color-mix(in srgb, var(--c) 45%, transparent); } }
@media (prefers-reduced-motion: reduce) { .ix-bteam.ix-win { animation: none; } }
.ix-bbadge { font-size: 13px; font-weight: 700; }
.ix-bres { font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #eef2f9; color: #4a5368; }
.ix-bres.ix-right { background: #d9f5e3; color: #0b6b4f; } .ix-bteam.ix-win .ix-bres { background: rgba(255, 255, 255, .9); }
.ix-bctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ix-bok { font-weight: 700; color: #0b6b4f; }
.ix-bpres { align-items: center; justify-content: center; }
.ix-bbig { display: flex; flex-direction: column; align-items: center; gap: 1.5cqh; padding: 3cqh 4cqw; border-radius: 28px; font-size: clamp(24px, 4cqw, 72px); text-align: center; }
.ix-bbig b { color: var(--text-strong); } .ix-bbell { font-size: 1.6em; line-height: 1; }
.ix-bbig.ix-bglow { background: var(--c); } .ix-bbig.ix-bglow b { color: #fff; }
.ix-bbig.ix-bglow .ix-bbell { animation: ixRing .6s ease-in-out 3; }
@keyframes ixRing { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.ix-bbig .ix-btimer { position: static; font-size: .7em; background: rgba(0, 0, 0, .55); }
.ix-bbig .ix-bres { font-size: .45em; }
.ix-bpres .ix-bteams { width: 100%; font-size: clamp(14px, 1.6cqw, 28px); } .ix-bpres .ix-bteam b { font-size: 1.1em; }
.ix-bst2 { display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
.ix-bst2 h2 { font-size: clamp(26px, 4vw, 48px); margin: 0; }
.ix-bsbtns { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; width: 100%; }
.ix-bsb { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 10px; border-radius: 26px; border: 0; background: var(--c); color: #fff; font: inherit; font-size: clamp(20px, 2.6vw, 34px); font-weight: 800; cursor: pointer; box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 70%, #000); }
.ix-bsb span { font-size: 1.8em; } .ix-bsb:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 70%, #000); }
.ix-bsb:disabled { opacity: .45; cursor: default; } .ix-bsb.ix-win { opacity: 1; outline: 6px solid #fff; box-shadow: 0 0 0 12px var(--c); }
@media (max-width: 760px) { .ix-bsbtns { grid-template-columns: repeat(2, 1fr); } }

/* ===== G2.7 Phiếu cuối tiết (ix-pf…, ix-f…) ===== */
.ix-pfmeta { gap: 12px; flex-wrap: wrap; margin-bottom: 8px; } .ix-pfmeta label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; flex: 1 1 220px; min-width: 0; }
.ix-pfqs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.ix-pfq { border: 1.5px solid var(--border-soft, #e3e8f2); border-radius: 12px; padding: 10px 12px; background: #fbfcff; display: flex; flex-direction: column; gap: 8px; }
.ix-pfqh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ix-pfqh select { width: auto; }
.ix-pfok { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; color: #0b7a66; cursor: pointer; }
.ix-pfrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; } .ix-pfrow .tx-in { width: auto; min-width: 0; } .ix-pfcol { flex-direction: column; align-items: stretch; }
.ix-pfrun { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; }
.ix-pfsum { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ix-pfsum > div { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 10px; border-radius: 12px; background: #f1f6ff; } .ix-pfsum b { font-size: 24px; color: var(--text-strong); } .ix-pfsum span { font-size: 12px; color: var(--text-muted, #6b7489); }
.ix-pfbody { display: flex; flex-direction: column; gap: 12px; }
.ix-pfres { border: 1.5px solid var(--border-soft, #e3e8f2); border-radius: 14px; padding: 10px 12px; background: #fff; } .ix-pfres.ix-pfflag { border-color: #b7791f; background: #fffaf0; }
.ix-pfres .ix-tbl, .ix-pfres .ix-chart { padding-left: 0; padding-right: 0; }
.ix-pftype { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #eef2fa; } .ix-pfqt { margin: 6px 0; font-size: 16px; overflow-wrap: anywhere; }
.ix-pfrate { margin: 6px 0; } .ix-pfwrong ol { margin: 4px 0; padding-left: 22px; } .ix-pfwrong small { color: var(--text-muted, #6b7489); }
.ix-pfopen { margin: 6px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow: auto; } .ix-pfopen li b { margin-right: 6px; } .ix-pfopen li span { overflow-wrap: anywhere; white-space: pre-wrap; }
.ix-pfscale { display: flex; flex-direction: column; gap: 4px; } .ix-pfscale div { display: grid; grid-template-columns: minmax(90px, 200px) 1fr 40px; gap: 8px; align-items: center; font-size: 13px; }
.ix-pfscale i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #4f8cff var(--w), #eef2fa var(--w)); }
.ix-pfnote { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-soft, #e3e8f2); } .ix-pfnote .tx-in { flex: 1 1 220px; min-width: 0; }
.ix-pflesson { flex-direction: column; align-items: stretch; border: 0; } .ix-pflesson label { font-weight: 700; }
.ix-pfst td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; } .ix-pfst td i { font-style: normal; color: var(--text-muted, #6b7489); }
.ix-pfnot { color: var(--text-muted, #6b7489); background: #fafbfd; } .ix-pfok2 { color: #0b7a66; font-weight: 800; } .ix-pfno2 { color: #7a4bd1; font-weight: 800; } .ix-pfnone { color: #b0b6c3; }
.ix-pfsg span { display: inline-block; font-size: 12px; padding: 1px 7px; margin: 1px; border-radius: 99px; background: #f4efff; color: #5b34a8; white-space: nowrap; }
.ix-pfpaper { border: 1.5px solid #4f8cff; border-radius: 14px; padding: 10px 14px; background: #f7faff; display: flex; flex-direction: column; gap: 10px; margin: 0 14px; }
.ix-pfpaper h4 { margin: 0; } .ix-pfpq { display: flex; flex-direction: column; gap: 4px; } .ix-pfch { display: flex; flex-wrap: wrap; gap: 6px 14px; } .ix-pfch label { display: inline-flex; gap: 4px; align-items: center; }
.ix-pfevh { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .ix-pfevh label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; flex: 1 1 200px; min-width: 0; } .ix-pfbh { flex: 2 1 320px !important; }
.ix-pfevt td { text-align: left; vertical-align: top; } .ix-pfevt textarea { min-width: 240px; width: 100%; }
.ix-pfpres { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 18px; width: 100%; } .ix-pfpq h4 { margin: 0 0 8px; font-size: clamp(18px, 1.8vw, 26px); }
/* Trạm */
.ix-fst { display: flex; flex-direction: column; gap: 16px; max-width: 900px; margin: 0 auto; width: 100%; }
.ix-fprog { display: flex; align-items: center; gap: 12px; font-weight: 700; } .ix-fbar { flex: 1; height: 10px; border-radius: 5px; background: #e8edf6; overflow: hidden; } .ix-fbar i { display: block; height: 100%; background: #4f8cff; border-radius: 5px; transition: width .2s; }
.ix-ftime { font-variant-numeric: tabular-nums; color: var(--text-muted, #6b7489); }
.ix-fin { font-size: clamp(18px, 2vw, 24px); padding: 12px 14px; width: 100%; box-sizing: border-box; }
.ix-fscale { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.ix-fsc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 16px; border: 3px solid #4f8cff; background: #fff; font: inherit; cursor: pointer; } .ix-fsc b { font-size: 30px; } .ix-fsc small { font-size: 13px; text-align: center; } .ix-fsc.on { background: #4f8cff; color: #fff; }
.ix-fnav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ix-frev { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ix-frev li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--border-soft, #e3e8f2); } .ix-frev li div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .ix-frev li span { overflow-wrap: anywhere; }
.ix-frev li.ix-fmiss { border-color: #b7791f; background: #fffaf0; }
.ix-fconf { padding: 14px; border-radius: 14px; background: #f1f6ff; border: 2px solid #4f8cff; text-align: center; } .ix-fconf p { margin: 6px 0 12px; }

/* ===== G2.8 Bảng điều hành tiết học V2 ===== */
.ut2-lp-ix { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 10px 14px; }
.ut2-lp-ixbar, .ut2-lp-act { display: flex; flex-direction: column; gap: 8px; }
#lpIxBar { display: flex; flex-wrap: wrap; gap: 8px; }
.ut2-lp-ixb { display: inline-flex; align-items: stretch; border: 1.4px solid #d5deec; border-radius: 12px; overflow: hidden; background: #fff; } .ut2-lp-ixb.on { border-color: #3aa35f; background: #f1fbf5; }
.ut2-lp-ixo { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 10px 6px 6px; font: inherit; font-weight: 600; cursor: pointer; position: relative; } .ut2-lp-ixo img { width: 34px; height: 34px; object-fit: contain; } .ut2-lp-ixo:hover { background: #f5f9ff; }
.ut2-lp-pin { border: 0; border-left: 1px solid #e3e8f2; background: transparent; padding: 0 9px; font-size: 16px; color: #9aa3b5; cursor: pointer; } .ut2-lp-pin.on { color: #f5b400; }
#lpIxAct { display: flex; flex-direction: column; gap: 6px; }
.ut2-lp-ar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: #f6f9ff; border: 1px solid #e3e8f2; flex-wrap: wrap; }
.ut2-lp-ar img { width: 34px; height: 34px; object-fit: contain; } .ut2-lp-ar > div { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; } .ut2-lp-ar small { color: var(--text-muted, #6b7489); }
.ut2-lp-flows summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.ut2-lp-fl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 8px; margin: 6px 0; }
.ut2-lp-flow { border: 1px solid #e3e8f2; border-radius: 12px; padding: 8px 10px; background: #fbfcff; } .ut2-lp-flow.cur { border-color: #4f8cff; background: #f1f6ff; box-shadow: 0 0 0 2px #4f8cff22; }
.ut2-lp-flow ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.ut2-lp-flow button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: var(--text-strong); } .ut2-lp-flow button:hover { color: #1f6fd6; text-decoration: underline; } .ut2-lp-flow img { width: 22px; height: 22px; object-fit: contain; }

/* G2.9 – cửa sổ hẹp (cửa sổ nổi ~420px): cột phụ xuống dưới thay vì ép vùng chính (lỗi tràn nút ở Bốc thăm cửa sổ nổi) */
@container (max-width: 620px) {
  .tx-row { flex-direction: column; }
  .tx-side { width: auto; border-left: 0; border-top: 1px solid var(--border-soft); flex-shrink: 1; }
}
