:root {
  --blue: #1a6cf0; --blue-d: #0f4fc0; --green: #19b24b; --orange: #ff7a00; --pink: #ff3d81; --purple: #7c3aed; --yellow: #ffc400; --teal: #00b8a9;
  --ink: #1b2340; --muted: #5d6786; --line: #e3e7f5; --bg: #f3f5ff; --card: #fff;
  --ok: #12923a; --bad: #e0213f; --radius: 18px;
  --shadow: 0 8px 28px rgba(60, 70, 160, .14);
  --grad: linear-gradient(135deg, #1a6cf0, #7c3aed);
  --grad2: linear-gradient(135deg, #ff7a00, #ff3d81);
  --grad3: linear-gradient(135deg, #19b24b, #00b8a9);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
  background: radial-gradient(1200px 500px at 90% -10%, #ffe8f1 0, transparent 60%), radial-gradient(900px 500px at -10% 10%, #dff1ff 0, transparent 60%), var(--bg); min-height: 100vh; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; font-weight: 800; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1.02rem; }
a { color: var(--blue); } .muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.hidden { display: none !important; }

/* khung */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(185deg, #1a2a8a 0%, #4b2bb5 55%, #8a2bb5 100%); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; color: #fff; text-decoration: none; }
.brand img { width: 44px; background: #fff; border-radius: 14px; padding: 4px; flex: none; }
.brand b { display: block; font-size: 1.02rem; letter-spacing: .02em; line-height: 1.15; } .brand span { font-size: .72rem; opacity: .85; }
.side a.nav { color: #eef0ff; text-decoration: none; padding: 9px 12px; border-radius: 14px; display: flex; align-items: center; gap: 11px; font-weight: 700; transition: background .15s, transform .1s; }
.side a.nav:hover { background: rgba(255,255,255,.14); transform: translateX(2px); }
.side a.nav.on { background: #fff; color: var(--blue-d); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.nav .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; flex: none; background: rgba(255,255,255,.16); }
.nav.on .ico { background: var(--c, var(--blue)); color: #fff; }
.side .sep { margin: 12px 12px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; opacity: .65; font-weight: 800; }
.who { margin-top: auto; background: rgba(255,255,255,.14); border-radius: 16px; padding: 12px; font-size: .88rem; }
.who b { display: block; } .who button { margin-top: 8px; width: 100%; }
main { padding: 24px 28px 60px; max-width: 1180px; width: 100%; min-width: 0; }
.topbar { display: none; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.head h1 { margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* thẻ */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid #fff; }
.card.accent { border-top: 6px solid var(--c, var(--blue)); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { border-radius: var(--radius); padding: 16px 18px; color: #fff; box-shadow: var(--shadow); background: var(--grad); }
.tile:nth-child(4n+2) { background: var(--grad2); } .tile:nth-child(4n+3) { background: var(--grad3); } .tile:nth-child(4n+4) { background: linear-gradient(135deg, #7c3aed, #ff3d81); }
.tile b { display: block; font-size: 2rem; line-height: 1.1; } .tile span { opacity: .92; font-weight: 700; }
a.tile { text-decoration: none; display: block; transition: transform .12s; } a.tile:hover { transform: translateY(-3px); }
.hero { background: var(--grad); color: #fff; border-radius: 22px; padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.hero h1 { color: #fff; -webkit-text-fill-color: #fff; margin: 0 0 4px; }
.starbar { background: rgba(255,255,255,.28); border-radius: 99px; height: 16px; overflow: hidden; min-width: 240px; margin: 8px 0 4px; }
.starbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffe066, #ffc400); border-radius: 99px; transition: width .6s; }
.big-star { font-size: 3rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }

/* nút */
button, .btn { font: inherit; font-weight: 800; border: 0; border-radius: 99px; padding: 9px 18px; cursor: pointer; color: #fff; background: var(--grad); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(26,108,240,.3); transition: transform .1s, box-shadow .1s, filter .1s; }
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.06); } button:active { transform: translateY(1px); }
button.ghost { background: #fff; color: var(--blue-d); box-shadow: inset 0 0 0 2px var(--line); }
button.warm { background: var(--grad2); box-shadow: 0 4px 12px rgba(255,61,129,.3); }
button.green { background: var(--grad3); box-shadow: 0 4px 12px rgba(25,178,75,.3); }
button.danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 2px #ffc9d1; }
button.sm { padding: 5px 12px; font-size: .85rem; } button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* form */
label { display: block; font-weight: 800; font-size: .86rem; margin: 10px 0 4px; color: var(--muted); }
input, select, textarea { font: inherit; width: 100%; padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26,108,240,.15); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--blue); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); margin: 4px 12px 4px 0; cursor: pointer; }
.chk input { margin: 0; }

/* bảng */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
table.plan td, table.plan th { text-align: center; padding: 6px; } table.plan input { width: 64px; text-align: center; padding: 6px; }
table.plan td:first-child, table.plan th:first-child { text-align: left; white-space: nowrap; font-weight: 800; }

/* nhãn */
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .76rem; font-weight: 800; background: #e9eeff; color: var(--blue-d); margin: 0 4px 2px 0; }
.tag.l1 { background: #dff7e6; color: #0b7a30; } .tag.l2 { background: #dff0ff; color: #0b5cb8; } .tag.l3 { background: #fff0d1; color: #a35a00; } .tag.l4 { background: #ffe0e8; color: #b8133e; }
.tag.warn { background: #fff0d1; color: #a35a00; } .tag.ok { background: #dff7e6; color: #0b7a30; } .tag.bad { background: #ffe0e8; color: #b8133e; } .tag.ai { background: #efe3ff; color: #6a21d6; }
.alert { padding: 11px 14px; border-radius: 14px; margin: 10px 0; font-weight: 700; background: #fff0d1; color: #7a4300; }
.alert.bad { background: #ffe0e8; color: #a30f36; } .alert.ok { background: #dff7e6; color: #0b6a2a; }

/* học liệu */
.subj { --c: var(--blue); } .s-Toán { --c: #1a6cf0; } .s-Ngữ { --c: #e0213f; } .s-Tiếng { --c: #ff7a00; } .s-KHTN, .s-Vật, .s-Hoá, .s-Sinh { --c: #19b24b; } .s-Lịch { --c: #7c3aed; } .s-Tin { --c: #00b8a9; }
.mat { display: block; text-decoration: none; color: inherit; transition: transform .12s; } .mat:hover { transform: translateY(-3px); }
.mat .kind { font-size: 1.8rem; }

/* bài thi */
.q { padding: 16px; border-radius: 16px; background: #fff; border: 2px solid var(--line); margin-bottom: 14px; }
.q.right { border-color: #7fdca0; background: #f4fff7; } .q.wrong { border-color: #ffa9b8; background: #fff6f8; } .q.half { border-color: #ffd37a; background: #fffaf0; }
.q .num { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 800; margin-right: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px; margin: 7px 0; cursor: pointer; background: #fff; }
.opt:hover { border-color: var(--blue); } .opt.sel { border-color: var(--blue); background: #eaf1ff; }
.opt.good { border-color: #19b24b; background: #e7fbed; } .opt.miss { border-color: #e0213f; background: #ffecef; }
.opt b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: .85rem; }
.opt.sel b { background: var(--blue); color: #fff; }
.tfrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.tfbtn { padding: 5px 14px; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--ink); box-shadow: none; }
.tfbtn.sel { background: var(--blue); border-color: var(--blue); color: #fff; } .tfbtn.good { background: #19b24b; border-color: #19b24b; color: #fff; }
.timer { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); padding: 10px 14px; border-radius: 0 0 18px 18px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin: -8px 0 16px; }
.timer .clock { font-weight: 800; font-size: 1.3rem; color: var(--orange); font-variant-numeric: tabular-nums; }
.nav-dots { display: flex; flex-wrap: wrap; gap: 5px; } .nav-dots a { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; text-decoration: none; font-weight: 800; font-size: .8rem; background: #e9eeff; color: var(--blue-d); }
.nav-dots a.done { background: var(--blue); color: #fff; }
.score { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.expl { background: #f1f5ff; border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.ai-box { background: #f6efff; border-left: 5px solid var(--purple); border-radius: 12px; padding: 10px 14px; margin-top: 8px; white-space: pre-wrap; }

/* diễn đàn */
.thread { display: block; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); padding: 12px 4px; } .thread:hover { background: #f6f8ff; }
.reply { border-left: 4px solid var(--line); padding: 8px 14px; margin: 12px 0; background: #fafbff; border-radius: 0 14px 14px 0; } .reply.best { border-color: var(--green); background: #f1fff5; }
.rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); font-weight: 800; margin-right: 8px; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* hộp thoại, thông báo */
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,60,.55); display: grid; place-items: start center; padding: 28px 12px; overflow-y: auto; z-index: 50; }
.modal { background: #fff; border-radius: 22px; padding: 22px; width: min(760px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px); background: #1b2340; color: #fff; padding: 11px 20px; border-radius: 99px; font-weight: 800; z-index: 100; opacity: 0; transition: .25s; max-width: 92vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } #toast.bad { background: var(--bad); }
.bell { position: relative; } .bell .n { position: absolute; top: -6px; right: -6px; background: var(--pink); color: #fff; border-radius: 99px; font-size: .7rem; padding: 0 6px; font-weight: 800; }
.notes { position: absolute; right: 0; top: 46px; width: min(340px, 90vw); background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 8px; z-index: 20; color: var(--ink); max-height: 60vh; overflow: auto; }
.notes a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; } .notes a:hover { background: #f1f4ff; } .notes a.un { font-weight: 800; }

/* đăng nhập */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #1a2a8a, #7c3aed 55%, #ff3d81); }
.login .box { background: #fff; border-radius: 28px; padding: 30px 26px; width: min(400px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center; }
.login img { width: 84px; } .login h1 { background: none; color: var(--ink); -webkit-text-fill-color: var(--ink); margin: 8px 0 2px; } .login form { text-align: left; }

/* điện thoại */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 40; transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--grad); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar button { padding: 6px 12px; background: rgba(255,255,255,.2); box-shadow: none; }
  main { padding: 16px 14px 60px; }
  .notes { right: -60px; }
}
@media print { .side, .topbar, .no-print, #toast { display: none !important; } main { padding: 0; } .card { box-shadow: none; border: 1px solid #ccc; } body { background: #fff; } }

/* in đề các mã và phiếu trả lời trắc nghiệm */
#printroot { display: none; }
@media print {
  body.printing > *:not(#printroot) { display: none !important; }
  body.printing #printroot { display: block; color: #000; background: #fff; }
  @page { size: A4; margin: 14mm 14mm; }
  #printroot .pg { page-break-after: always; break-after: page; }
  #printroot .pg:last-child { page-break-after: auto; break-after: auto; }
}
#printroot { font-family: 'Times New Roman', serif; font-size: 12.5pt; line-height: 1.35; }
.paper .ph { width: 100%; border-collapse: collapse; margin-bottom: 8px; text-align: center; font-size: 12pt; }
.paper .ph td { width: 50%; vertical-align: top; padding: 2px 4px; }
.paper .ps { font-weight: 700; margin: 12px 0 4px; }
.paper .ps2 { font-weight: 700; margin: 8px 0 3px; }
.paper .pq { margin: 4px 0 6px; break-inside: avoid; }
.paper .pq-h { margin: 2px 0; }
.paper .po { margin-left: 22px; }
.paper .po.inl { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.paper .po.inl span { min-width: 22%; }
.paper .po > div { margin: 1px 0; }
.paper img.qimg { max-height: 160px; max-width: 70%; display: block; margin: 4px 0 4px 22px; cursor: default; }
.paper .pend { text-align: center; margin-top: 14px; }
.sheet { font-size: 10.5pt; line-height: 1.25; }
.sh-t { text-align: center; font-weight: 700; font-size: 15pt; }
.sh-s { text-align: center; margin-bottom: 8px; }
.sh-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.sh-info { flex: 1; } .sh-info p { margin: 6px 0; }
.sh-grid { text-align: center; } .sh-grid > b { display: block; margin-bottom: 2px; }
.sh-grid .dgs, .sh-sa .cols { display: flex; gap: 3px; justify-content: center; }
.dg { display: flex; flex-direction: column; gap: 1px; align-items: center; }
i.c { display: inline-block; width: 15px; height: 15px; border: 1.2px solid #000; border-radius: 50%; font-size: 7.5pt; line-height: 13px; text-align: center; font-style: normal; box-sizing: border-box; }
i.c.f { background: #000; color: #000; }
.sh-n { font-size: 9.5pt; font-style: italic; margin: 6px 0; }
.sh-p { font-weight: 700; margin: 10px 0 4px; border-top: 1.5px solid #000; padding-top: 4px; }
.sh-cols { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.sh-col { display: flex; flex-direction: column; gap: 3px; }
.sh-q { display: flex; align-items: center; gap: 5px; } .sh-q b { width: 22px; text-align: right; }
.sh-q i.c, .sh-tf i.c { margin-right: 2px; }
.sh-tf { border: 1px solid #000; padding: 3px 6px; } .sh-tf > b { display: block; }
.sh-tf > div { display: flex; align-items: center; gap: 4px; margin: 2px 0; } .sh-tf span { width: 14px; }
.sh-sa { border: 1px solid #000; padding: 3px 6px; } .sh-sa > b { display: block; }
.sh-sa .bx { display: flex; gap: 3px; justify-content: center; margin: 3px 0; } .sh-sa .bx u { display: inline-block; width: 24px; height: 24px; border: 1px solid #000; text-decoration: none; }

/* ma trận, cây chương/bài, ảnh */
.tree { max-height: 420px; overflow-y: auto; border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-top: 10px; }
.tch { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); } .tch button { margin-left: auto; padding: 2px 10px; }
.tls { padding: 4px 0 8px 26px; }
table.mx input { width: 46px; padding: 5px 2px; font-weight: 700; } table.mx th.l1 { color: #0b7a30; } table.mx th.l2 { color: #0b5cb8; } table.mx th.l3 { color: #a35a00; } table.mx th.l4 { color: #b8133e; }
table.mx td:first-child { text-align: left; white-space: normal; font-weight: 400; max-width: 300px; }
.imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; } .imgs img { max-width: 220px; max-height: 180px; border-radius: 12px; border: 2px solid var(--line); object-fit: cover; }
img.thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); }

input.oc { padding: 5px 8px; font-size: .88rem; }

@keyframes flashbg { from { box-shadow: 0 0 0 4px #ffd54a; } to { box-shadow: 0 0 0 0 transparent; } }
.flash { animation: flashbg 2.2s ease-out; border-radius: 12px; }

.progress { height: 18px; border-radius: 99px; background: #e9eeff; overflow: hidden; margin: 4px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a00, #ff3d81); border-radius: 99px; transition: width .5s; }

.srctiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.srctile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; color: var(--ink); border-radius: 18px; padding: 14px 16px; box-shadow: inset 0 0 0 2px var(--line); }
.srctile .si { font-size: 1.7rem; } .srctile b { font-size: 1rem; } .srctile small { color: var(--muted); font-weight: 700; }
.srctile.on { background: var(--c); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); } .srctile.on small { color: rgba(255, 255, 255, .9); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { background: #eef2ff; color: var(--blue-d); box-shadow: none; font-weight: 800; padding: 6px 14px; } .chip small { font-weight: 600; opacity: .8; } .chip.on { background: var(--grad); color: #fff; }
.refdoc { border-left: 6px solid var(--c, var(--blue)); } .refdoc.off { opacity: .55; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; margin: 0; } .switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cfd6ea; border-radius: 99px; transition: .2s; cursor: pointer; } .switch i::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + i { background: var(--ok); } .switch input:checked + i::before { transform: translateX(20px); }

.ppct-hint { background: #e7fbed; color: #0b6a2a; border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.chk.small { font-size: .78rem; margin-top: 4px; }

/* ---- xem trước giáo án: giống bản in, có màu ---- */
.pv-doc { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 28px 34px; box-shadow: 0 6px 24px rgba(30,58,138,.08); font-family: 'Times New Roman', Times, serif; font-size: 1.04rem; line-height: 1.6; color: #1e293b; margin-bottom: 40px; }
.pv-doc h2 { color: #dc2626; font-size: 1.35rem; margin: 1.5em 0 .5em; padding-bottom: 4px; border-bottom: 2px solid #fee2e2; text-transform: uppercase; }
.pv-doc h3 { color: #15803d; font-size: 1.12rem; margin: 1.1em 0 .3em; }
.pv-doc h4 { color: #1d4ed8; font-size: 1rem; margin: .9em 0 .2em; }
.pv-doc ul { margin: .2em 0 .5em; padding-left: 1.3em; } .pv-doc li, .pv-doc p { margin: .25em 0; }
.pv-head { width: 100%; text-align: center; border-collapse: collapse; } .pv-head td { width: 50%; vertical-align: top; padding: 4px; color: #1e3a8a; }
.pv-title { text-align: center; margin: 10px 0 14px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0; } .pv-title h1 { color: #15803d; font-size: 1.6rem; margin: 6px 0; } .pv-chap { font-weight: 700; color: #1e3a8a; } .pv-sub { font-style: italic; color: #64748b; }
.pv-tbl { width: 100%; border-collapse: collapse; margin: .6em 0 1em; font-size: .98rem; } .pv-tbl th { background: #1e3a8a; color: #fff; padding: 9px 12px; text-align: center; font-size: .9rem; } .pv-tbl td { border: 1px solid #cbd5e1; padding: 9px 12px; vertical-align: top; }
.pv-tbl .pv-act { background: #fef3c7; color: #92400e; font-weight: 800; } .pv-step { font-weight: 700; color: #1e3a8a; margin-top: .7em !important; } .pv-gv { color: #b91c1c; } .pv-hs { color: #15803d; }
.pv-act3 { background: #fef3c7; color: #92400e !important; padding: 6px 12px; border-radius: 8px; }
.pv-chip { display: inline-block; background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; border-radius: 999px; padding: 0 8px; font-size: .78em; font-family: Inter, sans-serif; font-weight: 700; margin: 1px 2px; }
@media (max-width: 700px) { .pv-doc { padding: 16px 14px; } .pv-tbl { display: block; overflow-x: auto; } }

/* ---- thanh tiến độ AI nổi ---- */
#aibar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 10000; width: min(440px, calc(100vw - 24px)); background: #fff; border: 2px solid #c7d2fe; border-radius: 16px; padding: 12px 16px; box-shadow: 0 10px 34px rgba(30,41,120,.28); }
#aibar .aib-t { font-weight: 800; color: #1e3a8a; margin-bottom: 6px; }

/* ---- phân quyền giáo viên ---- */
.pfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 14px; margin: 6px 0; }
.pfgrid.pf1 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.aib-tail { font-family: Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }

/* ---- rà soát câu trùng: câu hiện đầy đủ cạnh nhau ---- */
.dpg { border: 2px solid #dbe3ff; margin-bottom: 14px; } .dpg.skip { opacity: .5; }
.dpg-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dpg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; }
.dpm { border: 2px solid #e2e8f0; border-radius: 14px; padding: 10px 12px; background: #fff; }
.dpm.keep { border-color: #86efac; background: #f0fdf4; } .dpm.del { border-color: #fca5a5; background: #fff1f2; }
.dpm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.dpm-body { margin-top: 8px; } .dpm-diff mark { background: #fde68a; padding: 0 3px; border-radius: 4px; } .dpm-diff s { color: #b91c1c; }

/* ---- hình trong câu hỏi ---- */
.qimg { display: block; max-width: min(100%, 460px); max-height: 300px; margin: 8px 0; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: zoom-in; }
.opt .qimg { max-width: 220px; max-height: 150px; margin: 6px 0 2px; }
.qe-img { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.qthumb { position: relative; display: inline-block; } .qthumb img { height: 64px; max-width: 120px; object-fit: contain; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.qthumb button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; padding: 0; border-radius: 50%; line-height: 20px; font-size: .75rem; background: #dc2626; color: #fff; border: 2px solid #fff; }
#lightbox { position: fixed; inset: 0; z-index: 20000; background: rgba(15, 23, 42, .86); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
#lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 10px; }
