/* Muc giao vien Cu Bo (giao-vien.php): khung app + ban in A4 (tdoc.js) + trinh chieu tro choi */
:root {
  --bg: #FFF7E6; --ink: #2B2D42; --muted: #6B6E8A; --card: #FFFFFF; --line: #F0E6D2;
  --orange: #FF9F1C; --orange-d: #E07F00; --teal: #1A7F75; --teal-d: #12615A; --teal-l: #E3F3F1;
  --red: #C8284D; --green: #278253; --purple: #6D3FE0; --yellow: #FFD166;
  --r: 14px; --sh: 0 2px 10px rgba(43, 45, 66, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 600 15px/1.45 Nunito, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .brand { font-family: 'Baloo 2', Nunito, sans-serif; line-height: 1.15; }
a { color: var(--teal-d); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { text-align: center; padding-top: 30vh; font-size: 60px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- khung ---------- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.nav { background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; padding: 0 8px 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; }
.brand small { display: block; font: 800 11px Nunito; color: var(--teal); letter-spacing: .06em; text-transform: uppercase; }
.nav a.it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 800; }
.nav a.it:hover { background: var(--bg); }
.nav a.it.on { background: var(--teal-l); color: var(--teal-d); }
.nav a.it .i { width: 22px; text-align: center; font-size: 18px; }
.nav .grow { flex: 1; }
.quota { margin: 8px 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 13px; }
.quota .bar { height: 6px; background: var(--line); border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.quota .bar i { display: block; height: 100%; background: var(--orange); }
.me { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 13px; }
.me img, .me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--teal-l); display: grid; place-items: center; }
.main { padding: 26px 32px 80px; max-width: 1180px; width: 100%; min-width: 0; }   /* min-width 0: bang rong cuon trong .gb-wrap thay vi day trang tran ngang tren dien thoai */
.tabs { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { display: none; }
  .main { padding: 16px 16px 96px; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
  .tabs a { display: flex; flex-direction: column; align-items: center; padding: 7px 0 6px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 800; }
  .tabs a .i { font-size: 20px; }
  .tabs a.on { color: var(--teal-d); }
  .mtop { display: flex !important; }
}
.mtop { display: none; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* ---------- thanh phan chung ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ph h1 { margin: 0; font-size: 30px; }
.ph p { margin: 4px 0 0; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 800; cursor: pointer; text-decoration: none;
  background: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal-d); transition: transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--teal-d); }
.btn.or { background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); color: #2B2D42; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--line) inset; }
.btn.ghost:hover { box-shadow: 0 0 0 1.5px var(--teal) inset; }
.btn.danger { background: #fff; color: var(--red); box-shadow: 0 0 0 1.5px #f3c4cf inset; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 14px 22px; font-size: 17px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .g2, .g3 { grid-template-columns: 1fr; } }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; background: var(--bg); border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 800; }
.chip.teal { background: var(--teal-l); border-color: transparent; color: var(--teal-d); }
.chip.or { background: #FFEFD5; border-color: transparent; color: var(--orange-d); }
.chip.red { background: #FDE8EC; border-color: transparent; color: var(--red); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 46px; }

/* form */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 800; font-size: 13.5px; margin-bottom: 5px; }
label.f > small { display: block; color: var(--muted); font-weight: 600; margin-top: 4px; }
.in, select.in, textarea.in { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 10px 12px; outline: none; }
.in:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-l); }
textarea.in { min-height: 90px; resize: vertical; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 800; cursor: pointer; }
.seg button.on { border-color: var(--teal); background: var(--teal-l); color: var(--teal-d); }
.err { color: var(--red); font-weight: 800; margin: 8px 0; }

/* chon loai tai lieu */
.kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kind { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 10px; text-align: center; cursor: pointer; text-decoration: none; color: var(--ink); }
.kind:hover { border-color: var(--teal); }
.kind.on { border-color: var(--teal); background: var(--teal-l); }
.kind .ic { font-size: 30px; }
.kind b { display: block; margin-top: 4px; }
.kind small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }

/* anh trang sach */
.shots { display: flex; gap: 8px; flex-wrap: wrap; }
.shot { width: 84px; height: 84px; border-radius: 10px; background: var(--bg) center/cover; position: relative; border: 1.5px solid var(--line); }
.shot button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.shot.add { display: grid; place-items: center; cursor: pointer; font-size: 26px; color: var(--muted); border-style: dashed; }
.shot.up::after { content: '…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.7); font-size: 22px; }

/* danh sach tai lieu */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lib-grp { margin: 0 0 14px; }
.lib-grp > summary { font-weight: 800; font-size: 16px; cursor: pointer; margin-bottom: 10px; }
.cls-docs { margin: 0 0 16px; }
.doc { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; border: 2px solid transparent; }
.doc:hover { border-color: var(--teal); }
.doc .t { font-weight: 900; font-size: 15.5px; display: flex; gap: 8px; }
.doc .t .ic { font-size: 22px; }
.doc .m { color: var(--muted); font-size: 12.5px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .in { width: auto; min-width: 150px; padding: 8px 10px; }

/* lop */
.cls { display: flex; align-items: center; gap: 12px; }
.cls .badge { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font: 800 18px 'Baloo 2'; color: #fff; background: var(--teal); flex: none; }
.cls .info { flex: 1; min-width: 0; }
.cls .info b { display: block; }

/* ---------- xem tai lieu ---------- */
.dv { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.dv > div { min-width: 0; }
@media (max-width: 1100px) { .dv { grid-template-columns: minmax(0, 1fr); } }
.dv-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) { .dv-side { position: static; order: -1; } }
.dv-side .card { padding: 14px; }
.dv-side h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acts .btn { width: 100%; }
.acts .full { grid-column: 1 / -1; }
.toggles { display: flex; flex-direction: column; gap: 8px; }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 14px; cursor: pointer; }
.tg input { width: 40px; height: 22px; appearance: none; background: var(--line); border-radius: 22px; position: relative; cursor: pointer; transition: .15s; flex: none; }
.tg input::after { content: ''; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tg input:checked { background: var(--teal); }
.tg input:checked::after { left: 20px; }
.paper { overflow-x: auto; padding-bottom: 8px; }
.wait { text-align: center; padding: 60px 16px; }
.wait .owl { font-size: 64px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.edit-on .ed { outline: 1.5px dashed #9ad1ca; outline-offset: 1px; border-radius: 3px; min-width: 12px; display: inline-block; }
.edit-on .ed:focus { outline: 2px solid var(--teal); background: #F2FBF9; }
.editbar { background: var(--teal-l); color: var(--teal-d); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 800; font-size: 13.5px; }
.assign-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.assign-row:first-child { border-top: 0; }

/* ---------- ban in A4 (tdoc.js) ---------- */
.sheet { background: #fff; width: 210mm; margin: 0 auto 18px; padding: 13mm 14mm 10mm; box-shadow: 0 2px 14px rgba(43,45,66,.13); color: #222;
  font: 600 12.5pt/1.45 Nunito, Arial, sans-serif; position: relative; }
.sheet h1 { font-size: 19pt; margin: 2px 0 2px; color: #222; }
.sh-head { border-bottom: 2.5px solid var(--orange); padding-bottom: 7px; margin-bottom: 4px; }
.sh-top { display: flex; justify-content: space-between; font-size: 9.5pt; color: #777; min-height: 14px; }
.sh-ver { font-weight: 900; color: var(--orange-d); border: 1.5px solid var(--orange); border-radius: 8px; padding: 0 8px; }
.sh-meta { color: #666; font-size: 10pt; }
.sh-name { display: flex; gap: 16px; margin-top: 9px; font-size: 11pt; }
.sh-name span { flex: 1; border-bottom: 1.3px dotted #888; padding-bottom: 2px; }
.sh-name span:nth-child(n+2) { flex: .45; }
.sh-score { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin-top: 8px; }
.sh-score div { border: 1.3px solid #999; border-radius: 6px; height: 54px; padding: 3px 8px; font-size: 10pt; }
.sec { margin-top: 13px; break-inside: avoid-page; }
.sec h3 { font: 800 12.5pt/1.3 Nunito, Arial, sans-serif; margin: 0 0 7px; display: flex; gap: 8px; align-items: baseline; }
.sec h3 .no { background: var(--teal); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 10.5pt; flex: none; transform: translateY(3px); }
.sec h3 i { font-style: normal; font-weight: 600; color: #777; font-size: 10.5pt; }
.sec h3 .ttl { flex: 1; }
.pts { font-weight: 700; color: #777; font-size: 10pt; white-space: nowrap; }
.passage { background: #FFF8EA; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; white-space: pre-line; line-height: 1.55; }
.wordbox { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 2px solid var(--teal); border-radius: 8px; padding: 5px 12px; margin-bottom: 8px; font-weight: 800; color: var(--teal-d); }
.items { margin: 0; padding-left: 24px; }
.items > li { margin-bottom: 6px; break-inside: avoid; }
.opts { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 2px 22px; justify-content: start; margin-top: 2px; }
.opts.long { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt.right { color: var(--red); font-weight: 900; }
.gap { display: inline-block; min-width: 26mm; border-bottom: 1.3px solid #555; margin: 0 3px; }
.ans-in { color: var(--red); font-weight: 800; }
.ans-line { color: var(--red); font-weight: 800; margin-top: 4px; }
.explain { color: #666; font-weight: 600; font-size: 10.5pt; white-space: pre-line; }
.line { border-bottom: 1.3px dotted #888; height: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 2px; }
.chips span { border: 1.3px dashed var(--orange); background: #FFF8EA; border-radius: 6px; padding: 0 8px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 60px; }
.match .ml, .match .mr { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.match.big .ml, .match.big .mr { min-height: 44px; }
.match .emo { font-size: 26pt; line-height: 1; }
.match .n { color: #888; font-weight: 800; min-width: 18px; }
.match .dot { width: 8px; height: 8px; border-radius: 50%; background: #333; flex: none; }
.match .ml .dot { margin-left: auto; }
table.tf { width: 100%; border-collapse: collapse; }
table.tf td { border-bottom: 1px solid #eee; padding: 4px 4px; }
table.tf td.n { width: 24px; color: #888; }
table.tf td.c { width: 70px; text-align: center; font-weight: 900; white-space: nowrap; }
.hints { color: #555; background: #FFF8EA; border-radius: 8px; padding: 6px 10px; margin: 6px 0; font-size: 11pt; }
.sample { margin-top: 6px; }
.sh-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 16px; border-top: 1px solid #eee; padding-top: 6px; }
.sh-brand { color: #999; font-size: 8.5pt; margin-left: auto; }
.sh-qr { display: flex; align-items: center; gap: 8px; font-size: 9pt; color: #555; }
.sh-qr svg { width: 22mm; height: 22mm; }
.key h2 { font-size: 15pt; margin: 10px 0; }
.key ol { padding-left: 22px; }
.key li { margin-bottom: 8px; }
.key li > div { color: var(--red); font-weight: 700; }

/* flashcard */
.fc-page { padding: 9mm 10mm; }
.fc-hint { display: flex; justify-content: space-between; font-size: 8.5pt; color: #999; margin-bottom: 3mm; }
.fc-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 86mm; }
.fc { border: 1px dashed #bbb; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 5mm; gap: 3mm; }
.fc-emo { font-size: 52pt; line-height: 1.05; min-height: 10px; }
.fc-front { font: 800 22pt/1.15 'Baloo 2', Nunito, sans-serif; }
.fc.back { background: #FFF8EA; }
.fc-back { font: 800 16pt/1.2 Nunito, sans-serif; color: var(--teal-d); }
.fc-ex { font-style: italic; font-size: 11.5pt; color: #444; }
.fc.empty { border-color: transparent; }

/* giao an */
.plan { font-family: 'Times New Roman', Nunito, serif; font-weight: 400; font-size: 13pt; }
.plan-head { text-align: center; margin-bottom: 10px; }
.plan-head .sh-place { text-align: left; font-size: 10pt; color: #777; }
.plan-kind { font-weight: 700; letter-spacing: .04em; margin-top: 4px; }
.plan h1 { font-family: 'Times New Roman', serif; font-size: 17pt; }
.plan h2 { font-size: 13.5pt; margin: 14px 0 4px; font-family: 'Times New Roman', serif; }
.plan h3 { font-size: 13pt; margin: 12px 0 4px; font-family: 'Times New Roman', serif; }
.plan h4 { margin: 6px 0 2px; font-size: 13pt; }
.plan ul { margin: 2px 0 6px; padding-left: 22px; }
.plan p { margin: 3px 0; }
.plan table.steps { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
.plan table.steps th, .plan table.steps td { border: 1px solid #888; padding: 5px 7px; vertical-align: top; width: 50%; text-align: left; white-space: pre-line; }
.plan table.steps th { background: #f4f4f4; text-align: center; }
.plan .act { break-inside: auto; }
.plan-note { margin-top: 10px; padding: 8px 10px; background: #f7f7f7; border-radius: 6px; }

/* slide tro choi */
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.slide-wrap { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; box-shadow: var(--sh); container-type: inline-size; cursor: pointer; }
.sl { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 5cqw; background: var(--bg); gap: 2cqw; }
.sl h1 { font-size: 7.5cqw; margin: 0; }
.sl h2 { font-size: 6cqw; margin: 0; color: var(--teal); }
.sl p, .sl li { font-size: 3.6cqw; }
.sl ol { text-align: left; margin: 0; }
.sl .big { font-size: 4.4cqw; }
.sl-title { background: var(--orange); color: #fff; }
.sl-title h1 { color: #fff; }
.sl-owl { font-size: 12cqw; }
.sl-pill { background: var(--teal); color: #fff; border-radius: 3cqw; padding: .8cqw 4cqw; font: 800 3.4cqw Nunito; }
.sl-prompt { font: 900 5.4cqw/1.25 Nunito; }
.sl-prompt.mono { letter-spacing: .3em; font-size: 7cqw; }
.sl-ask { color: var(--muted); font-size: 3.4cqw; }
.sl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; width: 100%; }
.sl-opts div { background: #fff; border-radius: 1.6cqw; padding: 1.6cqw 2.4cqw; font-size: 3.6cqw; text-align: left; font-weight: 800; }
.sl-a { background: var(--teal); color: #fff; }
.sl-emo { font-size: 15cqw; line-height: 1; }
.sl-ans { font: 900 8cqw/1.1 'Baloo 2', Nunito; }
.sl-sub { font-size: 3.4cqw; opacity: .85; }
.show { position: fixed; inset: 0; background: #111; z-index: 100; display: grid; place-items: center; }
.show .slide-wrap { width: min(100vw, 177.78vh); height: auto; border-radius: 0; cursor: default; }
.show .nav-btns { position: fixed; bottom: 14px; right: 14px; display: flex; gap: 8px; }
.show .nav-btns button { background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 800; cursor: pointer; }
.show .count { position: fixed; bottom: 18px; left: 18px; color: rgba(255,255,255,.6); font-weight: 800; }

/* ---------- ket qua bai giao ---------- */
.stat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 860px) { .stat { grid-template-columns: repeat(2, 1fr); } }
.stat div { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--sh); }
.stat b { display: block; font: 800 26px 'Baloo 2'; }
.stat span { color: var(--muted); font-size: 12.5px; }
table.res { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--sh); font-size: 14px; }
table.res th, table.res td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.res th { background: #FBF4E5; font-size: 12.5px; color: var(--muted); }
table.res tr.click { cursor: pointer; }
table.res tr.click:hover td { background: #FFFBF2; }
.qbar { display: grid; grid-template-columns: 70px 1fr 50px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.qbar .b { height: 10px; background: #FDE8EC; border-radius: 6px; overflow: hidden; }
.qbar .b i { display: block; height: 100%; background: var(--green); }
.big-code { font: 800 40px/1 'Baloo 2'; letter-spacing: .12em; color: var(--teal-d); }
.qr-box { display: grid; place-items: center; padding: 10px; }
.qr-box svg { width: 190px; height: 190px; }
.linkbox { display: flex; gap: 6px; }
.linkbox .in { font-size: 13px; }

/* nghe, tim tu, ma tran de */
.listen-note { background: #EEF4FF; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; font-size: 11pt; }
.play-listen { border: 0; background: var(--teal); color: #fff; border-radius: 8px; padding: 2px 10px; font: 800 12px Nunito; cursor: pointer; margin-left: 6px; }
.passage.script { white-space: pre-line; border-left: 3px solid var(--teal); }
.ws { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ws-grid { border-collapse: collapse; }
.ws-grid td { width: 8mm; height: 8mm; text-align: center; border: 1px solid #ccc; font: 800 12pt Nunito, Arial; }
.ws-grid td.hit { background: #FFE08A; }
.ws-words { display: flex; flex-direction: column; gap: 4px; font-weight: 800; }
.ws-words .miss { color: #bbb; text-decoration: line-through; }
.ans-ws .ws-grid td { width: 5.5mm; height: 5.5mm; font-size: 9pt; }
table.mtx { border-collapse: collapse; width: 100%; font-size: 10.5pt; }
table.mtx th, table.mtx td { border: 1px solid #bbb; padding: 4px 6px; text-align: center; }
table.mtx td:first-child, table.mtx th:first-child { text-align: left; }
@media print { .noprint { display: none !important; } }

/* soan lai 1 phan / 1 cau (che do sua) */
.part-re { border: 1.5px solid #9ad1ca; background: #F2FBF9; color: var(--teal-d); border-radius: 8px; font: 800 11px Nunito; padding: 1px 6px; cursor: pointer; margin-right: 4px; vertical-align: middle; }
.part-re.sec-re { margin-left: auto; font-size: 11.5px; padding: 2px 8px; }
.part-re:hover { background: var(--teal); color: #fff; }
.pending-part { position: relative; opacity: .45; pointer-events: none; }
.pending-part::after { content: 'Dora đang soạn lại…'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--teal); color: #fff; font: 800 12px Nunito; padding: 4px 10px; border-radius: 10px; opacity: 1; white-space: nowrap; }
@media print { .part-re { display: none !important; } }

/* so diem lop (#/lop/:id) */
.gb-wrap { overflow-x: auto; margin-bottom: 8px; }
table.gb th, table.gb td { white-space: nowrap; text-align: center; }
table.gb th:first-child, table.gb td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
table.gb thead th:first-child { background: #FBF4E5; }
table.gb th a { color: var(--ink); text-decoration: none; font-weight: 800; }
table.gb td.gb-miss { color: #c9c2b4; }
table.gb td.gb-low { color: var(--red); font-weight: 800; }
table.gb tfoot td { background: #FBF4E5; }
.gb-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 13px; }
.gb-x:hover { color: var(--teal-d); }

/* huong dan (#/hd) */
.gd-sec { padding: 0; margin-bottom: 10px; overflow: hidden; }
.gd-sec > summary { list-style: none; cursor: pointer; padding: 15px 18px; font: 800 18px/1.25 'Baloo 2', Nunito, sans-serif; display: flex; gap: 10px; }
.gd-sec > summary::-webkit-details-marker { display: none; }
.gd-sec > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.gd-sec[open] > summary::after { transform: rotate(180deg); }
.gd-sec[open] > summary { border-bottom: 1.5px solid var(--line); }
.gd-sec > .gd-body { padding: 4px 18px 16px; }
#gd-intro { margin-bottom: 12px; }
.gd-body { line-height: 1.6; overflow-wrap: anywhere; }
.gd-body h3 { font-size: 17px; margin: 16px 0 4px; color: var(--teal-d); }
.gd-body p { margin: 8px 0; }
.gd-body ul, .gd-body ol { margin: 6px 0; padding-left: 22px; }
.gd-body li { margin: 3px 0; }
.gd-body blockquote { margin: 10px 0; padding: 8px 14px; background: #FFFBEA; border-left: 4px solid var(--yellow); border-radius: 10px; }
.gd-body a { font-weight: 800; }
.gd-tbl { overflow-x: auto; margin: 10px 0; }
.gd-tbl table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 14px; }
.gd-tbl th, .gd-tbl td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.gd-tbl th { background: #FFF1DA; }
.gd-img { display: block; max-width: 100%; margin: 12px auto; border-radius: 12px; border: 2px solid var(--line); box-shadow: var(--sh); cursor: zoom-in; }
.gd-img[src*="-dt"] { max-height: 420px; }
.gd-img[src*="-mb"] { max-width: min(62%, 260px); }
.gd-zoom { position: fixed; inset: 0; z-index: 300; background: rgba(20,14,40,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.gd-zoom img { max-width: 100%; max-height: calc(100% - 50px); border-radius: 10px; }
.gd-zoom p { color: #fff; font-weight: 700; margin: 10px 0 0; text-align: center; }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(43,45,66,.45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal .box { background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal .box h2 { margin: 0 0 12px; font-size: 24px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 200; font-weight: 800; box-shadow: var(--sh); max-width: 90vw; }

/* dang nhap */
.login { max-width: 960px; margin: 0 auto; padding: 40px 16px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; min-height: 100vh; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; padding-top: 24px; } }
.login h1 { font-size: 40px; margin: 10px 0; }
.login .pitch li { margin-bottom: 8px; }
.login .pitch { padding-left: 20px; }
.or-sep { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0; }
/* Vao bang Zalo (teacher.js zaloLogin) */
.zl-in { margin-top: 12px; border: 1px solid #CFE0FF; background: #F3F8FF; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.zl-in .zl-btn { display: block; text-align: center; background: #0068FF; color: #fff; border-radius: 999px; padding: 10px 14px; font-weight: 700; text-decoration: none; margin: 8px 0 6px; }
.zl-in .zl-kw { font-weight: 800; background: #fff; border: 1px dashed #0068FF; border-radius: 6px; padding: 0 6px; }
.zl-in p { margin: 0; }

/* ---------- in ---------- */
@page { size: A4; margin: 10mm 0; }
@page land { size: A4 landscape; margin: 10mm; }   /* slide tro choi in ngang, moi trang 1 slide */
@media print {
  body { background: #fff; }
  .nav, .tabs, .dv-side, .ph, .mtop, .editbar, .toast, .modal, .noprint { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .dv { display: block; }
  .paper { overflow: visible; padding: 0; zoom: 1 !important; }
  .sheet { box-shadow: none; margin: 0; width: 210mm; max-width: none; break-after: page; padding: 2mm 14mm 0; }
  .sheet:last-child { break-after: auto; }
  .fc-page { height: 277mm; overflow: hidden; padding: 0 10mm; }
  .fc-grid { grid-auto-rows: 85mm; }
  .edit-on .ed { outline: 0 !important; }
  .slides { display: block; page: land; }
  .slide-wrap { width: 277mm; height: 156mm; break-after: page; box-shadow: none; border-radius: 0; margin: 0 auto; }
}

/* nhieu mon (t6): cau nhieu dong, doan chuong trinh (Tin hoc), dung/sai 4 y (de TN THPT 2025) */
.qml { white-space: pre-line; }
.code { display: block; white-space: pre-wrap; font: 600 10.5pt/1.45 Consolas, 'Courier New', monospace; background: #F6F7F9; border-radius: 6px; padding: 5px 9px; margin: 3px 0; }
.items.tf4 > li { margin-bottom: 10px; }
table.tf4 { margin-top: 4px; }
table.tf4 td.n { width: 28px; font-weight: 800; }

/* Dot H (27/10/2026) — Dora Teacher: mau chinh tim #5B4FE9 (docs/dora-brand-guide.md). Chi doi khung pro.css (--p), khong doi mau phieu in. */
html body.pro { --p: #5B4FE9; --p-d: #4338CA; --p-l: #EEEDFD; --p-ring: rgba(91,79,233,.18); }
