/* EduMate – giao diện bản 2: gọn, chuyên nghiệp.
   Xanh bảng (#0F5A4C) là màu thương hiệu và mọi nút chính; vàng phấn chỉ dùng để đánh dấu mục đang chọn và nút trong vùng xanh;
   đỏ chỉ dành cho cảnh báo và điểm dưới trung bình. Mỗi khối nội dung là một mặt trắng trên nền xám nhạt. */
:root {
  --xanh: #0f5a4c;
  --xanh-dam: #0a4338;
  --xanh-nhat: #e4f1ed;
  --vang: #f2b632;
  --vang-nhat: #fff5d9;
  --nen: #f1f4f3;
  --mat: #fff;
  --chu: #15201d;
  --mo: #5b6966;
  --vien: #dce3e0;
  --do: #c2362e;
  --do-nhat: #fbeae8;
  --bong: 0 1px 2px rgba(15, 40, 34, .06), 0 0 0 1px rgba(15, 40, 34, .05);
  --chinh: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --day-cao: 62px;
  /* tên cũ còn dùng trong vài chỗ của app.js / cong.css */
  --muc: var(--xanh); --muc-dam: var(--xanh-dam); --muc-nhat: var(--xanh-nhat); --tay: var(--chinh); --bang: #1f4d42; --bang-dam: #173a32; --phan: #f4f1e4;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--chu); font: 400 15.5px/1.55 var(--chinh); background: var(--nen); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--xanh); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--vang); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dang-mo { padding: 40vh 0 0; text-align: center; color: var(--mo); }

/* ---------- Khung ứng dụng ---------- */
.so { padding-bottom: calc(var(--day-cao) + 20px + env(safe-area-inset-bottom)); }
.gay { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--vien); }
.ten-so { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--xanh-dam); text-decoration: none; }
.ten-so i { width: 30px; height: 30px; border-radius: 9px; background: var(--xanh); display: grid; place-items: center; }
.ten-so i::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--vang); box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
.toi { width: 38px; height: 38px; border-radius: 50%; background: var(--xanh-nhat); color: var(--xanh-dam); font-weight: 700; font-size: 14px; display: grid; place-items: center; text-decoration: none; }
.trang { max-width: 880px; margin: 0 auto; padding: 18px 16px 24px; }

.the { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; background: var(--mat); border-top: 1px solid var(--vien); padding: 0 4px env(safe-area-inset-bottom); height: calc(var(--day-cao) + env(safe-area-inset-bottom)); }
.the .the-ten { display: none; }
.the a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--mo); font-size: 11.5px; font-weight: 600; }
.the a span { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 999px; }
.the a[aria-current="page"] { color: var(--xanh-dam); font-weight: 700; }
.the a[aria-current="page"] span { background: var(--xanh-nhat); color: var(--xanh); }

/* ---------- Chữ và tiêu đề ---------- */
.tua { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 4px 0 16px; }
.tua small { display: block; font-size: 14.5px; font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--mo); margin-top: 6px; max-width: 62ch; }
.de { font-size: 16px; font-weight: 700; margin: 26px 2px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.de a, .de button.chu { font-weight: 600; font-size: 13.5px; text-decoration: none; padding: 0; }
.mo { color: var(--mo); }
.nho { font-size: 13.5px; }
.do { color: var(--do); }
.lui { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--mo); text-decoration: none; padding: 6px 0; }
.lui::before { content: "‹"; font-size: 18px; line-height: 1; }
.but-do { background: var(--vang-nhat); color: #5a4200; border-radius: 10px; padding: 11px 14px; margin: 12px 0; font-size: 14.5px; }
.but-do b { font-weight: 700; }
.but-do a, .but-do .chu { color: inherit; font-weight: 600; }
.trong { padding: 16px; color: var(--mo); background: var(--mat); border-radius: 12px; box-shadow: var(--bong); }

/* ---------- Danh sách mục ---------- */
.muc { list-style: none; margin: 0 0 4px; padding: 0; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); overflow: hidden; }
.muc + .muc { margin-top: 10px; }
.muc li + li { border-top: 1px solid var(--vien); }
.muc a, .muc button:not(.chu) { width: 100%; display: grid; grid-template-columns: 1fr 18px; column-gap: 10px; align-items: center; padding: 13px 14px 13px 16px; min-height: 56px; text-decoration: none; color: inherit; background: none; border: 0; text-align: left; cursor: pointer; }
.muc a:hover { background: #f7faf9; }
.muc a::after { content: ""; grid-column: 2; grid-row: 1 / span 2; width: 8px; height: 8px; border-right: 2px solid #9aa8a4; border-top: 2px solid #9aa8a4; transform: rotate(45deg); }
.muc .ten { grid-column: 1; font-weight: 600; overflow-wrap: anywhere; }
.muc .phu { grid-column: 1; font-size: 13.5px; color: var(--mo); overflow-wrap: anywhere; }
.muc .cham { display: none; }
.muc .xep { display: block; padding: 13px 16px; }
.muc .xep .phu { display: block; margin-top: 2px; }
.muc details > summary { list-style: none; cursor: pointer; padding: 13px 16px; min-height: 56px; }
.muc details > summary::-webkit-details-marker { display: none; }
.muc details[open] > summary { background: #f7faf9; }
.muc details > .dien { box-shadow: none; border-radius: 0; border-top: 1px solid var(--vien); margin: 0; }

/* ---------- Biểu mẫu và nút ---------- */
.dien { display: grid; gap: 14px; margin: 0 0 16px; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 16px; }
.o { display: grid; gap: 5px; min-width: 0; }
.o > span { font-size: 13px; font-weight: 600; color: #34423f; }
.o input, .o select, .o textarea { width: 100%; background: var(--mat); border: 1.5px solid var(--vien); border-radius: 9px; padding: 10px 12px; min-height: 46px; transition: border-color .12s; }
.o input:hover, .o select:hover, .o textarea:hover { border-color: #b8c4c0; }
.o input:focus, .o select:focus, .o textarea:focus { outline: none; border-color: var(--xanh); box-shadow: 0 0 0 3px var(--xanh-nhat); }
.o textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.o input::placeholder, .o textarea::placeholder { color: #9aa8a4; }
.o input[type="file"] { padding: 9px; }
.hai { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kiem { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 14.5px; }
.kiem input { width: 20px; height: 20px; accent-color: var(--xanh); flex: none; }
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 18px; background: var(--xanh); color: #fff; border: 1.5px solid var(--xanh); border-radius: 10px; font-weight: 700; cursor: pointer; text-decoration: none; }
.nut:hover { background: var(--xanh-dam); border-color: var(--xanh-dam); }
.nut:disabled { opacity: .55; cursor: progress; }
.nut.phu { background: var(--mat); color: var(--xanh-dam); border-color: var(--vien); }
.nut.phu:hover { background: var(--xanh-nhat); border-color: var(--xanh-nhat); }
.nut.be { min-height: 38px; padding: 6px 13px; font-size: 14px; border-radius: 9px; }
.hang { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button.chu { background: none; border: 0; padding: 6px 0; color: var(--xanh); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
button.chu.do { color: var(--do); }
details > summary.chu { cursor: pointer; color: var(--xanh); font-weight: 600; padding: 8px 2px; }

/* ---------- Trang đầu ---------- */
.chao { background: var(--xanh); color: #fff; border-radius: 16px; padding: 20px 16px 16px; margin: 0 0 14px; background-image: radial-gradient(circle at 100% 0, rgba(242, 182, 50, .22), transparent 46%); }
.chao h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.chao p { color: rgba(255, 255, 255, .78); font-size: 14px; margin: 4px 0 16px; }
.hoi { display: flex; background: var(--mat); border-radius: 12px; padding: 5px; }
.hoi input { flex: 1; min-width: 0; border: 0; padding: 10px 10px; min-height: 44px; background: transparent; color: var(--chu); }
.hoi input:focus { outline: none; }
.hoi button { border: 0; background: var(--vang); color: #3a2a00; font-weight: 700; padding: 0 16px; border-radius: 9px; cursor: pointer; }
.goi-y { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.goi-y::-webkit-scrollbar { display: none; }
.goi-y button { flex: none; background: rgba(255, 255, 255, .13); border: 0; border-radius: 999px; padding: 8px 13px; font-size: 13px; color: #fff; cursor: pointer; min-height: 36px; }
.goi-y button:hover { background: rgba(255, 255, 255, .22); }
.so-lieu { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--mat); border-radius: 12px; box-shadow: var(--bong); margin: 0 0 6px; }
.so-lieu > * { padding: 12px 6px; text-align: center; text-decoration: none; color: inherit; }
.so-lieu > * + * { border-left: 1px solid var(--vien); }
.so-lieu b { display: block; font-size: 20px; font-weight: 800; color: var(--xanh-dam); font-variant-numeric: tabular-nums; }
.so-lieu b.do { color: var(--do); }
.so-lieu span { font-size: 12px; color: var(--mo); }
.so-lieu.ba { grid-template-columns: repeat(3, 1fr); }
.tiet { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--xanh-nhat); color: var(--xanh-dam); display: grid; place-content: center; text-align: center; font-weight: 800; font-size: 17px; line-height: 1.05; }
.tiet small { display: block; font-size: 10px; font-weight: 600; }
.viec { list-style: none; margin: 0; padding: 0; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); }
.viec li { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; min-height: 52px; border-bottom: 1px solid var(--vien); }
.viec input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--xanh); flex: none; }
.viec .ten { flex: 1; font-weight: 500; overflow-wrap: anywhere; }
.viec li.xong .ten { text-decoration: line-through; color: var(--mo); }
.viec .han { font-size: 12.5px; color: var(--mo); white-space: nowrap; }
.viec .han.tre { color: var(--do); font-weight: 600; }
.viec .xoa { background: none; border: 0; color: #9aa8a4; font-size: 20px; line-height: 1; width: 32px; height: 32px; cursor: pointer; border-radius: 8px; }
.viec .xoa:hover { color: var(--do); background: var(--do-nhat); }
.them-viec { display: flex; gap: 8px; padding: 10px 12px; }
.them-viec input { min-width: 0; border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; min-height: 42px; background: var(--mat); }
.them-viec input:focus { outline: none; border-color: var(--xanh); }
.them-viec input[name="text"] { flex: 1; }
.them-viec input[type="date"] { width: 138px; flex: none; }
.them-viec button { flex: none; min-height: 42px; }

/* ---------- Tài liệu ---------- */
.giay { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 22px 18px; margin: 12px 0; overflow-x: auto; line-height: 1.65; }
.giay h1 { font-size: 20px; text-align: center; margin: 0 0 14px; line-height: 1.35; }
.giay h2 { font-size: 17px; margin: 22px 0 8px; color: var(--xanh-dam); }
.giay h3 { font-size: 15.5px; margin: 16px 0 6px; }
.giay p { margin: 8px 0; }
.giay ul, .giay ol { padding-left: 22px; margin: 6px 0; }
.giay hr { border: 0; border-top: 2px dashed var(--vien); margin: 26px 0; }
.giay blockquote { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: var(--vang-nhat); color: #5a4200; font-size: 14.5px; }
.giay table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 14.5px; }
.giay th, .giay td { border: 1px solid #b8c4c0; padding: 6px 8px; vertical-align: top; text-align: left; }
.giay th { background: var(--xanh-nhat); }
.soan-o { width: 100%; min-height: 60vh; border: 1.5px solid var(--vien); border-radius: 12px; padding: 14px; background: var(--mat); line-height: 1.6; font-size: 15px; margin: 12px 0; }
.soan-o:focus { outline: none; border-color: var(--xanh); }
.tieu-de-o { width: 100%; font-weight: 800; font-size: 20px; letter-spacing: -.01em; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 6px 0; }
.tieu-de-o:hover, .tieu-de-o:focus { outline: none; border-bottom-color: var(--xanh); }
.dang-viet { color: var(--xanh-dam); font-weight: 600; padding: 18px 2px; }
.dang-viet::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: cham 1.2s steps(4) infinite; }
@keyframes cham { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Lớp học ---------- */
.tab { display: flex; gap: 2px; background: #e3e9e7; border-radius: 11px; padding: 3px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tab::-webkit-scrollbar { display: none; }
.tab a { flex: 1 0 auto; text-align: center; padding: 9px 12px; text-decoration: none; color: var(--mo); font-weight: 600; font-size: 14px; border-radius: 9px; white-space: nowrap; }
.tab a[aria-current="page"] { color: var(--xanh-dam); background: var(--mat); box-shadow: 0 1px 2px rgba(15, 40, 34, .12); font-weight: 700; }
.hs { list-style: none; margin: 0; padding: 0; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); }
.hs li { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 12px 6px 14px; }
.hs li + li { border-top: 1px solid var(--vien); }
.hs .stt { width: 22px; flex: none; color: var(--mo); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.hs .ten { flex: 1; min-width: 0; font-weight: 500; color: inherit; text-decoration: none; }
.hs a.ten:hover { color: var(--xanh); }
.hs .ten small { display: block; color: var(--mo); font-weight: 400; font-size: 12.5px; }
.tt { flex: none; min-width: 98px; min-height: 40px; border: 1.5px solid var(--vien); background: var(--mat); color: var(--mo); font-weight: 700; font-size: 13.5px; border-radius: 999px; cursor: pointer; }
.tt[data-v="co-mat"] { background: var(--xanh-nhat); color: var(--xanh-dam); border-color: var(--xanh-nhat); }
.tt[data-v="vang-khong-phep"] { background: var(--do); color: #fff; border-color: var(--do); }
.tt[data-v="vang-phep"] { background: var(--do-nhat); color: var(--do); border-color: var(--do-nhat); }
.tt[data-v="muon"] { background: var(--vang-nhat); color: #6b4e00; border-color: var(--vang-nhat); }
.tt[data-v=""] { border-style: dashed; }
.dem { font-weight: 800; font-variant-numeric: tabular-nums; }
.cong-tru { display: flex; align-items: center; gap: 6px; flex: none; }
.cong-tru button { width: 40px; height: 40px; border: 1.5px solid var(--vien); background: var(--mat); color: var(--xanh-dam); font-size: 20px; font-weight: 700; border-radius: 50%; cursor: pointer; }
.cong-tru output { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.luoi button { min-height: 104px; background: var(--mat); color: var(--chu); border: 0; border-radius: 12px; box-shadow: var(--bong); padding: 14px; text-align: left; cursor: pointer; font-weight: 700; font-size: 15.5px; display: flex; flex-direction: column; gap: 4px; }
.luoi button:hover { background: #f7faf9; }
.luoi button svg { color: var(--xanh); margin-bottom: 4px; width: 26px; height: 26px; }
.luoi button small { font-weight: 400; font-size: 13px; color: var(--mo); }

/* Bảng số liệu cuộn ngang: sổ điểm, chuyên cần */
.cuon { overflow-x: auto; margin: 0 -16px 10px; padding: 2px 16px 8px; }
.so-diem { border-collapse: separate; border-spacing: 0; background: var(--mat); font-size: 14.5px; border-radius: 12px; box-shadow: var(--bong); }
.so-diem th, .so-diem td { border-bottom: 1px solid var(--vien); border-right: 1px solid var(--vien); padding: 0; }
.so-diem tr > :last-child { border-right: 0; }
.so-diem tbody tr:last-child > * { border-bottom: 0; }
.so-diem thead th { background: #f7faf9; padding: 9px 8px; font-size: 12.5px; min-width: 78px; max-width: 124px; vertical-align: bottom; font-weight: 700; }
.so-diem thead th:first-child { border-top-left-radius: 12px; position: sticky; left: 0; z-index: 2; text-align: left; padding-left: 14px; }
.so-diem thead th:last-child { border-top-right-radius: 12px; }
.so-diem thead th small { display: block; font-weight: 400; color: var(--mo); }
.so-diem tbody th { position: sticky; left: 0; background: var(--mat); text-align: left; padding: 8px 12px 8px 14px; white-space: nowrap; font-weight: 500; min-width: 136px; z-index: 1; }
.so-diem tbody tr:last-child th { border-bottom-left-radius: 12px; }
.so-diem tbody th a { color: inherit; text-decoration: none; }
.so-diem input { width: 100%; min-width: 64px; height: 44px; border: 0; text-align: center; background: transparent; font-variant-numeric: tabular-nums; }
.so-diem input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--xanh); }
.so-diem input.thap { color: var(--do); font-weight: 700; }
.so-diem td.tb { text-align: center; font-weight: 800; padding: 0 12px; background: #f7faf9; font-variant-numeric: tabular-nums; min-width: 44px; }
.so-diem td.cc { text-align: center; min-width: 38px; height: 40px; font-size: 12.5px; font-weight: 700; }
.so-diem td.cc.k { background: var(--do); color: #fff; } .so-diem td.cc.p { background: var(--do-nhat); color: var(--do); } .so-diem td.cc.m { background: var(--vang-nhat); color: #6b4e00; } .so-diem td.cc.c { color: #9aa8a4; font-weight: 400; }
.so-diem.hep thead th { min-width: 38px; padding: 8px 4px; text-align: center; }
.so-diem.hep thead th:first-child { text-align: left; padding-left: 14px; }

.khoi { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 14px 16px; }
.bd { width: 100%; height: auto; display: block; }
.tia { width: 84px; height: 28px; flex: none; }
.canh-bao { list-style: none; margin: 0; padding: 0; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); overflow: hidden; }
.canh-bao li { padding: 12px 14px 12px 16px; border-left: 4px solid var(--do); }
.canh-bao li + li { border-top: 1px solid var(--vien); }
.canh-bao a { text-decoration: none; color: inherit; }
.canh-bao b { font-weight: 700; }
.canh-bao span { display: block; font-size: 13.5px; color: var(--do); }

/* Hồ sơ học sinh */
.ho-so { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }
.ho-so .anh { width: 60px; height: 60px; border-radius: 50%; background: var(--xanh); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.ho-so h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.ho-so p { color: var(--mo); font-size: 14px; }
.nhat-ky { list-style: none; margin: 0 0 10px; padding: 0; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); }
.nhat-ky li { padding: 12px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; }
.nhat-ky li + li { border-top: 1px solid var(--vien); }
.nhat-ky time { font-size: 12.5px; color: var(--mo); font-variant-numeric: tabular-nums; }
.nhat-ky p { grid-column: 1 / -1; }
.nhat-ky button.chu { padding: 0; font-size: 13px; }

/* Lịch dạy */
.tuan { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.tuan b { font-size: 15px; text-align: center; }
.ngay { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); margin: 0 0 10px; overflow: hidden; }
.ngay h3 { font-size: 14px; font-weight: 700; padding: 10px 16px; background: #f7faf9; border-bottom: 1px solid var(--vien); display: flex; justify-content: space-between; }
.ngay h3 span { font-weight: 400; color: var(--mo); }
.ngay.hom-nay h3 { background: var(--xanh); color: #fff; border-color: var(--xanh); }
.ngay.hom-nay h3 span { color: rgba(255, 255, 255, .8); }
.ngay .dong { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; min-height: 58px; }
.ngay .dong + .dong { border-top: 1px solid var(--vien); }
.ngay .dong .lop { flex: none; width: 74px; font-weight: 700; font-size: 14px; line-height: 1.25; }
.ngay .dong .lop small { display: block; font-weight: 400; color: var(--mo); font-size: 12px; }
.ngay .dong input, .ngay .dong select { flex: 1; min-width: 0; border: 1.5px solid transparent; border-radius: 8px; padding: 8px 10px; min-height: 42px; background: #f3f6f5; }
.ngay .dong input:focus, .ngay .dong select:focus { outline: none; border-color: var(--xanh); background: var(--mat); }
.ngay .rong { padding: 14px 16px; color: var(--mo); font-size: 14px; }

/* Trò chuyện */
.chat { display: grid; gap: 12px; margin: 12px 0; }
.chat .toi-noi { justify-self: end; max-width: 86%; background: var(--xanh); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.chat .may-noi { justify-self: start; max-width: 94%; background: var(--mat); box-shadow: var(--bong); padding: 4px 14px; border-radius: 4px 16px 16px 16px; }
.chat .may-noi.giay { margin: 0; }
.gui { position: sticky; bottom: calc(var(--day-cao) + 10px + env(safe-area-inset-bottom)); display: flex; gap: 6px; background: var(--mat); border-radius: 14px; box-shadow: var(--bong), 0 6px 20px rgba(15, 40, 34, .1); padding: 5px; }
.gui textarea { flex: 1; border: 0; padding: 10px; min-height: 46px; max-height: 160px; resize: none; background: transparent; }
.gui textarea:focus { outline: none; }
.gui button { border: 0; background: var(--xanh); color: #fff; font-weight: 700; padding: 0 16px; border-radius: 10px; cursor: pointer; }

.qr { background: #fff; padding: 10px; width: min(240px, 66vw); margin: 10px 0; border-radius: 12px; box-shadow: var(--bong); }
.qr svg { display: block; width: 100%; height: auto; }
.lien-ket { word-break: break-all; font-size: 14px; background: var(--mat); border: 1.5px dashed #b8c4c0; border-radius: 10px; padding: 10px 12px; }
.nhan { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--xanh-nhat); color: var(--xanh-dam); white-space: nowrap; vertical-align: 1px; }
.nhan.do { background: var(--do-nhat); color: var(--do); }
.nhan.vang { background: var(--vang-nhat); color: #6b4e00; }
.nhan.vip { background: linear-gradient(135deg, #f6d365, #fda085); color: #5a3200; }
.cau { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 13px 16px; margin: 0 0 10px; }
.cau ol { margin: 6px 0 0; padding-left: 24px; list-style: upper-alpha; }
.cau li.dung { font-weight: 700; color: var(--xanh); }

/* ---------- Bảng lớp: công cụ chiếu trong giờ học ---------- */
#bang { position: fixed; inset: 0; z-index: 50; background: #173f36; color: var(--phan); display: flex; flex-direction: column; overflow: auto; background-image: radial-gradient(ellipse at 30% 10%, rgba(255, 255, 255, .07), transparent 60%); }
#bang header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; gap: 10px; }
#bang header b { font-size: 16px; font-weight: 600; opacity: .9; }
#bang .dong { background: rgba(255, 255, 255, .12); border: 0; color: #fff; border-radius: 10px; min-height: 42px; padding: 0 16px; font-weight: 700; cursor: pointer; }
#bang .giua { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; padding: 16px; gap: 18px; }
#bang .to { font-size: clamp(40px, 12vw, 120px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
#bang .so-to { font: 800 clamp(72px, 26vw, 220px)/1 var(--chinh); font-variant-numeric: tabular-nums; letter-spacing: -.03em; color: var(--vang); }
#bang .so-to.het { color: #ff9d8f; }
#bang .phan-nut { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#bang .phan-nut button { background: var(--vang); color: #3a2a00; border: 0; border-radius: 10px; min-height: 48px; padding: 0 18px; font-weight: 800; cursor: pointer; font-size: 15.5px; }
#bang .phan-nut button.vien { background: rgba(255, 255, 255, .12); color: #fff; }
#bang .kiem input { accent-color: var(--vang); }
#bang .nhom { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 6px 16px 20px; text-align: left; }
#bang .nhom section { background: rgba(255, 255, 255, .08); padding: 12px 14px; border-radius: 12px; }
#bang .nhom h3 { font-size: 14px; font-weight: 700; color: var(--vang); margin-bottom: 6px; }
#bang .nhom ul { margin: 0; padding: 0; }
#bang .nhom li { list-style: none; padding: 3px 0; }
#bang .hs { background: rgba(255, 255, 255, .06); box-shadow: none; margin: 0 16px 20px; }
#bang .hs li + li { border-color: rgba(255, 255, 255, .12); }
#bang .hs .stt { color: var(--vang); font-weight: 800; }
#bang .cong-tru button { background: rgba(255, 255, 255, .12); border: 0; color: #fff; }
#bang .qr { margin: 0 auto; box-shadow: none; }
#bang .nho { opacity: .8; }

#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--day-cao) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(92vw, 440px); display: grid; gap: 8px; pointer-events: none; }
#toast div { background: #15201d; color: #fff; padding: 11px 15px; border-radius: 11px; font-size: 14px; box-shadow: 0 8px 24px rgba(15, 40, 34, .25); }
#toast div.loi { background: var(--do); }

/* ---------- Đăng nhập và trang công khai ---------- */
.cua { max-width: 420px; margin: 0 auto; padding: 7vh 18px 40px; min-height: 100dvh; }
.cua .dau { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.cua h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--chu); }
.cua .loi-chao { color: var(--mo); margin: 6px 0 20px; }
.cua .doi { margin-top: 8px; font-size: 14.5px; text-align: center; }
.cua .ba-dieu { list-style: none; padding: 0; margin: 22px 2px 0; display: grid; gap: 10px; font-size: 14px; color: var(--mo); }
.cua .ba-dieu li { display: flex; gap: 10px; align-items: flex-start; }
.cua .ba-dieu svg { color: var(--xanh); width: 20px; height: 20px; margin-top: 1px; }

/* ---------- Máy tính ---------- */
@media (min-width: 960px) {
  .so { padding: 0 0 60px 240px; }
  .gay { background: transparent; border: 0; backdrop-filter: none; position: static; justify-content: flex-end; padding: 0 36px; height: 64px; }
  .gay .ten-so { display: none; }
  .trang { padding: 0 36px 24px; max-width: 980px; margin: 0; }
  .the { top: 0; bottom: 0; right: auto; width: 240px; height: auto; flex-direction: column; gap: 4px; padding: 20px 14px; background: var(--xanh-dam); border: 0; }
  .the .the-ten { display: flex; color: #fff; margin: 0 6px 22px; }
  .the .the-ten i { background: rgba(255, 255, 255, .12); }
  .the a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; height: 46px; border-radius: 10px; color: rgba(255, 255, 255, .72); font-size: 14.5px; }
  .the a span { width: auto; height: auto; }
  .the a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
  .the a[aria-current="page"] { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: inset 3px 0 0 var(--vang); }
  .the a[aria-current="page"] span { background: none; color: var(--vang); }
  .tua { font-size: 28px; }
  .chao { padding: 28px 28px 22px; }
  .chao h1 { font-size: 28px; }
  .giay { padding: 36px 44px; }
  .gui { bottom: 16px; }
  #toast { bottom: 24px; left: calc(50% + 120px); }
  .luoi { grid-template-columns: repeat(4, 1fr); }
  .hai-cot { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
  .lich-luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
  .cuon { margin: 0 0 10px; padding: 2px 2px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- In / lưu PDF: chỉ còn tài liệu ---------- */
@media print {
  body { background: #fff; }
  .gay, .the, .khong-in, #toast { display: none !important; }
  .so { padding: 0; }
  .trang { padding: 0; max-width: none; }
  .giay { box-shadow: none; margin: 0; padding: 0; font-size: 13pt; border-radius: 0; }
  .giay hr { border: 0; break-after: page; margin: 0; }
}
.viec li.them { padding: 0; border: 0; }
.viec li.them form { flex: 1; min-width: 0; }
.viec li:last-child { border-bottom: 0; }

/* ---------- Gọi tên trong giờ (goi-ten.js) – nằm trong bảng lớp ---------- */
.gt-sanh { padding: 4px 16px 24px; display: grid; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.gt-tro { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gt-tro button { text-align: left; background: rgba(255, 255, 255, .09); border: 0; color: #fff; border-radius: 14px; padding: 16px 14px; min-height: 112px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.gt-tro button:hover { background: rgba(255, 255, 255, .16); }
.gt-tro b { font-size: 17px; color: var(--vang); }
.gt-tro small { font-size: 13px; line-height: 1.45; opacity: .85; }
.gt-o { display: grid; gap: 6px; font-size: 13.5px; }
.gt-o input, .gt-dau select { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 10px; padding: 10px 12px; min-height: 46px; }
.gt-o input::placeholder { color: rgba(255, 255, 255, .5); }
.gt-o input:focus { outline: none; border-color: var(--vang); }
.gt-dau { display: flex; gap: 8px; padding: 0 16px 8px; flex-wrap: wrap; }
.gt-dau button, .gt-the button { background: var(--vang); color: #3a2a00; border: 0; border-radius: 9px; min-height: 38px; padding: 0 13px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.gt-dau button.vien, .gt-the button.vien { background: rgba(255, 255, 255, .12); color: #fff; }
.gt-dau select option { color: #15201d; }
.gt-vong { position: relative; width: min(78vw, 56vh, 460px); aspect-ratio: 1; }
.gt-vong svg { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .3)); }
.gt-kim { position: absolute; left: 50%; top: -6px; width: 0; height: 0; margin-left: -13px; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 26px solid #fff; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.gt-song { width: min(92vw, 760px); display: grid; gap: 6px; }
.gt-lan { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; text-align: left; font-size: 13.5px; font-weight: 600; }
.gt-lan span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-duong { position: relative; height: 44px; border-radius: 8px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 18px, rgba(255, 255, 255, .03) 18px 36px); border-right: 4px dashed var(--vang); margin-right: 50px; }
.gt-duong i { position: absolute; left: 0; top: 2px; width: 60px; height: 40px; }
.gt-duong svg { width: 100%; height: 100%; }
.gt-lan.nhat span { color: var(--vang); }
.gt-cay { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(74px, 9vw, 120px), 1fr)); gap: 10px; padding: 6px 16px 14px; }
.gt-hoa { position: relative; aspect-ratio: 1; background: rgba(255, 255, 255, .06); border: 0; border-radius: 14px; cursor: pointer; display: grid; place-items: center; padding: 8px; color: #fff; }
.gt-hoa:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.gt-hoa svg { width: 78%; height: 78%; }
.gt-hoa small { position: absolute; right: 7px; bottom: 5px; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.gt-hoa.da-hai { cursor: default; background: rgba(255, 255, 255, .03); border: 1.5px dashed rgba(255, 255, 255, .22); opacity: .7; }
.gt-hoa.da-hai b { font-size: 12.5px; text-align: center; line-height: 1.25; font-weight: 600; }
.gt-hoa.da-hai.moi { opacity: 1; background: var(--vang); border-color: var(--vang); color: #3a2a00; }
.gt-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 6px 16px 14px; }
.gt-luoi span { background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 12px 8px; text-align: center; font-size: 13.5px; font-weight: 600; }
.gt-luoi span.roi { opacity: .4; }
.gt-luoi span.sang { background: var(--vang); color: #3a2a00; opacity: 1; transform: scale(1.06); }
.gt-mo .to { color: var(--vang); }
.gt-cau { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 16px 18px; text-align: left; max-width: 720px; font-size: clamp(16px, 2.4vw, 22px); line-height: 1.5; }
.gt-cau ol { margin: 10px 0 0; padding-left: 28px; list-style: upper-alpha; display: grid; gap: 6px; }
.gt-cau li.dung { color: var(--vang); font-weight: 700; }
.gt-giai { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .8em; opacity: .9; }
.gt-so { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 16px 12px; }
.gt-so div { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 6px; text-align: center; }
.gt-so b { display: block; font-size: 22px; color: var(--vang); font-variant-numeric: tabular-nums; }
.gt-so span { font-size: 12px; opacity: .8; }
.gt-the { display: flex; gap: 8px; padding: 0 16px 10px; flex-wrap: wrap; }
.gt-ds { flex: none; font-size: 13px; min-width: 52px; text-align: right; }
.gt-ds b { color: var(--vang); font-size: 15px; }
.gt-ds.sai b { color: #ff9d8f; }
#bang .hs .ten small { color: rgba(255, 255, 255, .6); }

/* Cá chép vượt vũ môn */
.gt-loa { margin: 0 16px 8px; align-self: flex-start; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 15px; min-height: 38px; }
.gt-loa.but { background: var(--vang); color: #3a2a00; }
.gt-ao { position: relative; margin: 0 16px; height: min(60vh, 560px); min-height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(#1f6f86, #17566b); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .12); }
.gt-ao::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(176deg, transparent 0 26px, rgba(255, 255, 255, .05) 26px 28px); }
.gt-mon { position: absolute; right: 0; top: 0; bottom: 0; width: 64px; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .28) 0 10px, rgba(255, 255, 255, .1) 10px 20px); border-left: 5px solid #c2362e; display: grid; place-items: center; }
.gt-mon b { writing-mode: vertical-rl; font-style: normal; font-size: 15px; letter-spacing: .12em; color: #fff; background: #c2362e; padding: 10px 5px; border-radius: 6px; }
.gt-sen { position: absolute; width: 34px; height: 22px; border-radius: 50%; background: #2f8f5b; opacity: .55; }
.gt-sen::after { content: ""; position: absolute; left: 12px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #f6a5c0; }
.gt-ca { position: absolute; left: 6px; width: 64px; margin-top: -18px; display: grid; justify-items: center; will-change: transform; }
.gt-ca svg { width: 64px; height: 36px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.gt-ca b { font-size: 11.5px; font-weight: 700; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); margin-top: -3px; }
.gt-ca.but::before { content: ""; position: absolute; right: 58px; top: 12px; width: 46px; height: 12px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8)); border-radius: 6px; }
.gt-ca.but svg { filter: drop-shadow(0 0 6px #fff3b0); }
.gt-ca.nhat { z-index: 3; }
.gt-ca.nhat svg { transform: scale(1.5); filter: drop-shadow(0 0 10px #ffd166); }
.gt-ca.nhat b { color: var(--vang); font-size: 14px; margin-top: 8px; }
.gt-rong { color: #fff; opacity: .85; font-size: 16px; font-weight: 600; }
@media (max-width: 600px) { .gt-ca, .gt-ca svg { width: 48px; } .gt-ca svg { height: 27px; } .gt-ca b { font-size: 10.5px; } .gt-mon { width: 44px; } }

/* ---------- Kéo co kiến thức (keo-co.js) ---------- */
.kc-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kc-ds { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px; border-top: 4px solid var(--m); }
.kc-ds p { font-size: 13px; opacity: .85; margin-top: 6px; line-height: 1.5; }
.kc-ten { width: 100%; background: transparent; border: 0; border-bottom: 1.5px dashed rgba(255, 255, 255, .35); color: #fff; font-weight: 800; font-size: 17px; padding: 4px 0; }
.kc-ten:focus { outline: none; border-bottom-color: var(--vang); }
.kc-che { display: grid; gap: 8px; }
.kc-che label { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 11px 12px; cursor: pointer; border: 1.5px solid transparent; }
.kc-che label:has(input:checked) { border-color: var(--vang); background: rgba(242, 182, 50, .12); }
.kc-che input { accent-color: var(--vang); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.kc-che b { display: block; font-size: 14.5px; }
.kc-che small { font-size: 12.5px; opacity: .8; }
.kc-ba { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gt-o select { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 10px; padding: 10px 12px; min-height: 46px; }
.gt-o select option { color: #15201d; }
.kc-san { flex: 1; display: grid; grid-template-columns: 1fr minmax(220px, .8fr) 1fr; gap: 12px; padding: 0 14px 14px; min-height: 0; }
.kc-ben { background: color-mix(in srgb, var(--m) 30%, #12302a); border: 2px solid var(--m); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: opacity .15s; }
.kc-ben header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kc-ben header b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-diem { background: #fff; color: #15201d; font-weight: 800; border-radius: 999px; min-width: 40px; text-align: center; padding: 2px 10px; font-size: 18px; font-variant-numeric: tabular-nums; }
.kc-de { flex: 1; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: clamp(18px, 2.4vw, 30px); line-height: 1.35; background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 14px; overflow: auto; }
.kc-pa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kc-pa button { position: relative; background: #fff; color: #15201d; border: 0; border-radius: 12px; min-height: 64px; padding: 10px 10px 10px 30px; font-weight: 700; font-size: clamp(14px, 1.6vw, 19px); cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.kc-pa button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.kc-pa kbd { position: absolute; left: 8px; top: 6px; font: 600 11px var(--chinh); color: #8a9793; border: 1px solid #cfd8d5; border-radius: 4px; padding: 0 4px; }
.kc-pa button.dung { background: #cdeee3; }
.kc-pa button.sai { background: #f6c9c5; }
.kc-ben.tuot { opacity: .6; }
.kc-bao { min-height: 22px; font-size: 14px; font-weight: 700; text-align: center; color: var(--vang); }
.kc-giua { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.kc-gio { font: 800 clamp(34px, 5vw, 60px)/1 var(--chinh); font-variant-numeric: tabular-nums; color: var(--vang); background: rgba(0, 0, 0, .25); border-radius: 14px; padding: 8px 18px; }
.kc-gio.gap { color: #ff9d8f; }
.kc-bai { position: relative; flex: 1; width: 100%; min-height: 120px; background: #f4f1e4; border-radius: 16px; overflow: hidden; display: grid; align-items: center; }
.kc-vach { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 3px dashed #2f8f7b; }
.kc-day { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; width: 100%; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.kc-day::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 36%; height: 4px; background: #6b4a2a; border-radius: 2px; }
.kc-day span { position: relative; }
.kc-day svg { width: 100%; display: block; }
.kc-no { position: relative; width: 14px; height: 30px; background: #c2362e; border-radius: 3px; margin-bottom: 26%; transform: translateY(40%); }
@media (max-width: 760px) {
  .kc-ba { grid-template-columns: 1fr 1fr; }
  .kc-san { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1fr; gap: 8px; padding: 0 8px 8px; }
  .kc-san .kc-ben:last-child { order: -1; transform: rotate(180deg); } /* đội bên kia ngồi đối diện */
  .kc-giua { flex-direction: row; order: 0; }
  .kc-giua .nho { display: none; }
  .kc-bai { min-height: 70px; }
  .kc-gio { font-size: 26px; padding: 6px 10px; }
  .kc-de { font-size: 16px; padding: 8px; }
  .kc-pa button { min-height: 50px; font-size: 14px; }
  .kc-pa kbd { display: none; }
  .kc-pa button { padding-left: 10px; }
  .kc-ben { padding: 10px; gap: 8px; }
}

.kc-day { padding: 0 14%; }
@media (max-width: 760px) { .kc-day { padding: 0 6%; } }

/* ---------- Nối toa tàu (doan-tau.js) ---------- */
.gt-o textarea { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 10px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.gt-o textarea::placeholder { color: rgba(255, 255, 255, .45); }
.gt-o textarea:focus { outline: none; border-color: var(--vang); }
.dt-gio { align-self: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .22); border-radius: 999px; padding: 6px 12px; }
.dt-san { margin: 0 16px; border-radius: 16px; background: linear-gradient(#8fd3e8 0 46%, #7fbf7a 46% 80%, #6b5a45 80%); overflow-x: auto; padding: 18px 14px 26px; position: relative; }
.dt-ray { display: flex; align-items: flex-end; gap: 6px; width: max-content; min-width: 100%; position: relative; padding-bottom: 10px; }
.dt-ray::after { content: ""; position: absolute; left: -14px; right: -14px; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, #3a2a1a 0 10px, #9c8a70 10px 22px); border-top: 3px solid #d9d2c2; }
.dt-ray.chay { animation: tau-chay 2.6s ease-in .5s forwards; }
@keyframes tau-chay { to { transform: translateX(120vw); } }
.dt-dau { flex: none; display: flex; align-items: flex-end; gap: 0; }
.dt-dau svg { width: 110px; height: 77px; display: block; }
.dt-dau .dt-phai { width: 150px; margin-left: -6px; border-radius: 10px; min-height: 77px; margin-bottom: 9px; }
.dt-toa, .dt-o { position: relative; flex: none; width: 226px; min-height: 86px; border-radius: 10px; margin-bottom: 9px; }
.dt-toa { display: grid; grid-template-columns: 90px 1fr; padding: 0; border: 2px solid #15201d; background: #fff; color: #15201d; cursor: pointer; overflow: visible; text-align: center; font: inherit; }
.dt-toa::before, .dt-toa::after, .dt-dau .dt-phai::after { content: ""; position: absolute; bottom: -11px; width: 18px; height: 18px; border-radius: 50%; background: #15201d; box-shadow: inset 0 0 0 5px #f2b632; }
.dt-toa::before { left: 20px; } .dt-toa::after { right: 20px; }
.dt-trai { display: grid; place-items: center; padding: 6px; background: #0f5a4c; color: #fff; font-weight: 800; font-size: 14px; line-height: 1.25; border-radius: 8px 0 0 8px; overflow-wrap: break-word; min-width: 0; }
.dt-phai { display: grid; place-items: center; padding: 6px 8px; background: #fff; color: #15201d; font-weight: 600; font-size: 13.5px; line-height: 1.3; border-radius: 0 8px 8px 0; overflow-wrap: anywhere; position: relative; }
.dt-phai.ga { background: var(--vang); font-weight: 800; }
.dt-toa.dung { border-color: #2f8f7b; box-shadow: 0 0 0 3px rgba(47, 143, 123, .45); }
.dt-toa.sai { border-color: var(--do); box-shadow: 0 0 0 3px rgba(194, 54, 46, .6); animation: lac .3s 2; }
@keyframes lac { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.dt-o { border: 2.5px dashed rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .22); color: #fff; font-weight: 800; font-size: 26px; cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.dt-bai { display: flex; flex-wrap: wrap; gap: 16px 10px; padding: 6px 16px 10px; min-height: 100px; align-items: flex-start; }
.dt-bai .dt-toa { margin-bottom: 6px; }
@media (max-width: 600px) { .dt-toa, .dt-o { width: 170px; } .dt-toa { grid-template-columns: 62px 1fr; } .dt-trai { font-size: 13.5px; } .dt-phai { font-size: 12.5px; } .dt-dau svg { width: 84px; height: 59px; } .dt-dau .dt-phai { width: 120px; min-height: 60px; } }
@media (prefers-reduced-motion: reduce) { .dt-ray.chay { animation: none; } }

/* ---------- Sáng kiến kinh nghiệm (skkn.js) ---------- */
.sk-buoc { display: flex; gap: 4px; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 10px 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.sk-buoc::-webkit-scrollbar { display: none; }
.sk-buoc a { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--mo); font-size: 12px; font-weight: 600; padding: 2px 8px; min-width: 64px; text-align: center; }
.sk-buoc i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 14px; background: #e3e9e7; color: var(--mo); }
.sk-buoc a.xong i { background: var(--xanh-nhat); color: var(--xanh-dam); }
.sk-buoc a[aria-current] { color: var(--xanh-dam); font-weight: 700; }
.sk-buoc a[aria-current] i { background: var(--xanh); color: #fff; }
.sk-chon { border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; min-height: 38px; background: var(--mat); }
.sk-dy { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--vien); align-items: center; }
.sk-dy:first-child { border-top: 0; }
.sk-dy input, .sk-dy textarea { width: 100%; border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; background: var(--mat); }
.sk-dy input { font-weight: 600; min-height: 42px; }
.sk-dy.lon input { font-weight: 800; background: #f7faf9; }
.sk-dy textarea { grid-column: 1 / -1; min-height: 58px; font-size: 14px; line-height: 1.5; resize: vertical; }
.sk-dy input:focus, .sk-dy textarea:focus, .sk-muc textarea:focus { outline: none; border-color: var(--xanh); }
.sk-muc { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 14px 16px; margin: 0 0 10px; display: grid; gap: 8px; }
.sk-muc h3 { font-size: 15.5px; font-weight: 700; }
.sk-muc textarea { width: 100%; min-height: 150px; border: 1.5px solid var(--vien); border-radius: 9px; padding: 10px 12px; line-height: 1.6; resize: vertical; background: var(--mat); }

/* ===== Giáo án mầm non ===== */
.mn-tab { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #e3e9e7; border-radius: 12px; padding: 4px; margin: 0 0 14px; }
.mn-tab a { text-align: center; text-decoration: none; color: var(--mo); font-weight: 600; font-size: 14.5px; padding: 10px 8px; border-radius: 9px; }
.mn-tab a[aria-current] { background: var(--mat); color: var(--xanh-dam); font-weight: 700; box-shadow: var(--bong); }
.mn-buoc a.xong i { font-size: 15px; }
.mn-goi { color: var(--mo); font-size: 13px; }
.o > span small { font-weight: 400; font-size: 12.5px; }
.o > span em { font-style: normal; font-weight: 600; color: var(--do); font-size: 12px; margin-left: 4px; }
.o:not(.mn-loi) > span em { display: none; }
.o.mn-loi input, .o.mn-loi select { border-color: var(--do); }
.mn-thieu { background: var(--do-nhat); color: #7c1d17; border-radius: 10px; padding: 11px 14px; font-size: 14.5px; }
.mn-thieu ul { margin: 4px 0 6px; padding-left: 20px; }
.mn-thieu .chu { color: inherit; font-weight: 700; padding: 0; }
.mn-chip { display: flex; flex-wrap: wrap; gap: 7px; }
.mn-chip button { border: 1.5px solid var(--vien); background: var(--mat); border-radius: 999px; padding: 7px 14px; min-height: 38px; font-weight: 600; font-size: 14px; color: #34423f; text-align: left; }
.mn-chip button:hover { border-color: #b8c4c0; }
.mn-chip button[aria-pressed="true"] { background: var(--m, var(--xanh)); border-color: var(--m, var(--xanh)); color: #fff; }
.mn-chip.nho-chu button { font-weight: 400; font-size: 13.5px; border-radius: 10px; padding: 6px 11px; line-height: 1.4; }
.mn-chip.nho-chu button[aria-pressed="true"] { background: var(--xanh-nhat); border-color: var(--xanh-nhat); color: var(--mo); }
.mn-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.mn-th { display: grid; gap: 2px; text-align: left; border: 1.5px solid var(--vien); border-left: 5px solid var(--m); border-radius: 10px; background: var(--mat); padding: 9px 12px; min-height: 64px; }
.mn-th b { color: var(--m); font-size: 14.5px; }
.mn-th span { font-size: 12.5px; color: var(--mo); line-height: 1.4; }
.mn-th:hover { border-color: var(--m); }
.mn-th[aria-pressed="true"] { background: var(--m); border-color: var(--m); }
.mn-th[aria-pressed="true"] b, .mn-th[aria-pressed="true"] span { color: #fff; }
.mn-doan { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--vien); border-radius: 10px; overflow: hidden; }
.mn-doan button { display: grid; gap: 1px; border: 0; background: var(--mat); padding: 9px 6px; min-height: 52px; }
.mn-doan button + button { border-left: 1.5px solid var(--vien); }
.mn-doan button span { font-size: 12px; color: var(--mo); }
.mn-doan button[aria-pressed="true"] { background: var(--xanh); color: #fff; }
.mn-doan button[aria-pressed="true"] span { color: #d5ebe5; }
.mn-dong { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 0 0 6px; }
.mn-tep { background: var(--xanh-nhat); border-radius: 8px; padding: 5px 10px; font-size: 13.5px; }
.mn-o-chon { display: flex; gap: 9px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.mn-o-chon input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--xanh); flex: none; }
.mn-ls { flex: 1 1 100%; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 10px 14px; }
.mn-ls summary { font-weight: 700; cursor: pointer; }
.mn-ls .muc { box-shadow: none; margin: 8px 0 0; }
.mn-thuoc { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 12px 14px; margin: 12px 0 0; }
.mn-thuoc p { margin: 8px 0 0; font-size: 13.5px; color: var(--mo); }
.mn-thuoc.lech p { color: var(--do); }
.mn-vach { display: flex; gap: 3px; height: 30px; }
.mn-vach i { display: grid; place-items: center; border-radius: 6px; font-style: normal; min-width: 30px; color: #fff; font-size: 12.5px; }
.mn-vach .m0 { background: var(--xanh); } .mn-vach .m1 { background: #2f8573; } .mn-vach .m2 { background: var(--vang); color: #4a3500; }
.mn-giay h4 { font-size: 15px; margin: 14px 0 4px; color: #34423f; }
.mn-tha { display: grid; justify-items: center; gap: 8px; text-align: center; border: 2px dashed #b8c4c0; border-radius: 12px; padding: 22px 14px; }
.mn-tha.dang { border-color: var(--xanh); background: var(--xanh-nhat); }
.mn-tha > span { color: var(--mo); font-size: 14px; }
.mn-chen { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); border-left: 5px solid var(--m); padding: 12px 14px; margin: 0 0 10px; display: grid; gap: 8px; }
.mn-chen p { margin: 0; }
.mn-chen textarea { width: 100%; min-height: 84px; border: 1.5px solid var(--vien); border-radius: 9px; padding: 9px 11px; line-height: 1.55; resize: vertical; background: var(--mat); }
.mn-chen textarea:focus { outline: none; border-color: var(--m); }
.mn-chen.tat { opacity: .55; border-left-color: var(--vien); }
@media (max-width: 600px) { .mn-luoi { grid-template-columns: 1fr 1fr; } .mn-th span { display: none; } .mn-th { min-height: 46px; align-content: center; } .mn-doan button span { font-size: 11px; } }
@media print { .mn-tab, .mn-buoc, .mn-thuoc, #mn, .mn-ls { display: none !important; } }

/* ===== Tích hợp NLS, NL AI vào KHGD, PPCT (khgd.js) ===== */
.kh-plan { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kh-the { min-height: 78px; }
.mn-tha.kh-xong { border-style: solid; border-color: #2f9e6e; background: #eaf7f0; }
.mn-tha.kh-xong > b { color: #1d7a52; }
.kh-ds { display: grid; gap: 8px; }
.kh-bang { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border: 1.5px solid var(--vien); border-radius: 10px; padding: 10px 12px; }
.kh-bang.tat { opacity: .6; }
.kh-bang small { line-height: 1.45; }
.kh-nhan { font-style: normal; font-size: 12px; background: var(--vang-nhat); color: #7a5600; border-radius: 6px; padding: 1px 7px; }
.kh-co { color: #1d7a52; }
.kh-lop { display: grid; gap: 2px; font-size: 13px; color: var(--mo); }
.kh-lop select { min-height: 38px; border: 1.5px solid var(--vien); border-radius: 8px; padding: 4px 8px; background: var(--mat); }
.kh-lop.mn-loi select { border-color: var(--do); }
.o.mn-loi > input, .o.mn-loi > select { border-color: var(--do); }
.kh-h2 { font-size: 18px; }
.kh-chay { background: linear-gradient(135deg, #f2b632, #e89a10); border-color: #e89a10; color: #3a2700; }
.kh-chay:hover { background: #e89a10; border-color: #d48a08; }
.kh-tien { height: 8px; background: #e3e9e7; border-radius: 99px; overflow: hidden; }
.kh-tien i { display: block; height: 100%; background: var(--xanh); transition: width .3s; }
.kh-loc { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin: 4px 0 10px; }
.kh-dx { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); border-left: 5px solid var(--m); padding: 12px 14px; margin: 0 0 10px; display: grid; gap: 8px; }
.kh-dx.tat { opacity: .55; }
.kh-dx.tat textarea, .kh-dx.tat input:not([type]) { text-decoration: line-through; }
.kh-dx-dau { display: flex; gap: 12px; align-items: flex-start; }
.kh-dx-dau b { color: var(--m); }
.kh-cot { color: var(--mo); background: #f3f5f4; border-radius: 6px; padding: 1px 7px; }
.kh-dx-o { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.kh-dx-o:not(:has(.kh-ma)) { grid-template-columns: 1fr; }
.kh-dx textarea, .kh-dx input.kh-ma, .kh-vt select { width: 100%; border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; color: var(--m); background: var(--mat); }
.kh-dx textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.kh-dx input.kh-ma { font-weight: 700; align-self: start; }
.kh-vt { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--mo); }
.kh-vt select { width: auto; color: var(--chu); padding: 5px 8px; }
.kh-cong { position: relative; flex: none; width: 44px; height: 26px; cursor: pointer; margin-top: 2px; }
.kh-cong input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kh-cong i { position: absolute; inset: 0; background: #c9d3d0; border-radius: 99px; transition: background .2s; }
.kh-cong i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.kh-cong input:checked + i { background: var(--m, var(--xanh)); }
.kh-cong input:checked + i::after { transform: translateX(18px); }
.kh-cong input:focus-visible + i { outline: 3px solid var(--vang); outline-offset: 2px; }
.kh-bc { border: 1.5px solid var(--vien); border-radius: 10px; padding: 9px 12px; }
.kh-bc summary { font-weight: 700; cursor: pointer; }
.kh-bc pre { white-space: pre-wrap; font: 13.5px/1.5 var(--chinh); background: #f6f8f7; border-radius: 8px; padding: 10px; max-height: 320px; overflow: auto; }
@media (max-width: 600px) { .kh-dx-o { grid-template-columns: 1fr; } .kh-bang { grid-template-columns: 1fr; } .mn-luoi.kh-plan, .mn-luoi.kh-opts { grid-template-columns: 1fr; } .kh-plan .mn-th span, .kh-opts .mn-th span { display: block; } }

/* =====================================================================
   GIAO DIỆN BẢN 3 – thanh bên xanh đậm có logo và câu "Tri thức kiến tạo tương lai", thanh trên có tìm kiếm,
   chuông thông báo, lời chào; trang Tổng quan có banner, thẻ chào xanh, 4 thẻ số liệu màu, khối thẻ bo tròn.
   Ghi đè lên bản 2 ở trên, giữ nguyên tên lớp nên các trang khác tự hưởng giao diện mới.
   ===================================================================== */
:root {
  --nen: #f2f6f5;
  --bong: 0 6px 22px rgba(16, 64, 50, .07), 0 0 0 1px rgba(16, 64, 50, .045);
  --the-rong: 248px;
  --chu-tay: "Dancing Script", "Be Vietnam Pro", cursive;
}
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muc, .dien, .trong, .canh-bao, .sk-buoc, .mn-ls, .kh-dx { border-radius: 16px; }

/* ---------- Thanh trên ---------- */
.gay { height: auto; min-height: 60px; flex-wrap: wrap; padding: 8px 14px; gap: 8px 10px; background: rgba(255, 255, 255, .96); box-shadow: 0 1px 0 var(--vien); border: 0; }
.gay .ten-so { font-size: 19px; color: #0b4d3b; }
.gay .ten-so .logo-hinh { width: 34px; height: 30px; background: #0b4d3b; border-radius: 9px; padding: 3px 3px 2px; }
.gay-nut { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; color: #24433b; cursor: pointer; }
.gay-nut:hover { background: #eef4f2; }
.gay-nut .ic { width: 25px; height: 25px; }
.gay-menu { display: none; }
.chuong b { position: absolute; top: 3px; right: 3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #e5342b; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.gay-phai { display: flex; align-items: center; gap: 6px; position: relative; margin-left: auto; }
.toi { width: auto; height: auto; background: none; border-radius: 99px; display: flex; align-items: center; gap: 10px; padding: 3px; color: #1d2b28; }
.toi i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 16px; color: #fff; background: linear-gradient(135deg, #2fa36f, #0b5a43); box-shadow: 0 0 0 3px #e4f1ed; }
.toi span, .toi > .ic { display: none; }
.toi span small { display: block; font-weight: 400; color: var(--mo); font-size: 13px; }
.tim { position: relative; order: 5; flex: 1 1 100%; display: flex; align-items: center; height: 44px; background: #eff3f5; border-radius: 99px; padding: 0 16px; gap: 10px; color: #6b7a77; }
.tim input { flex: 1; min-width: 0; border: 0; background: transparent; height: 100%; color: var(--chu); font-size: 15px; }
.tim input:focus { outline: none; }
.tim:focus-within { background: #fff; box-shadow: 0 0 0 2px #bfe0d3; }
.tim-kq, .tb-hop { position: absolute; z-index: 40; top: calc(100% + 8px); background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(16, 50, 40, .18), 0 0 0 1px rgba(16, 50, 40, .06); padding: 6px; }
.tim-kq { left: 0; right: 0; max-height: 60vh; overflow: auto; }
.tim-kq a, .tb-hop a { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--chu); }
.tim-kq a:hover, .tim-kq a.dau, .tb-hop a:hover { background: #eef6f3; }
.tim-kq small { color: var(--mo); font-size: 12.5px; }
.tim-kq p, .tb-hop p { margin: 0; padding: 10px 12px; color: var(--mo); font-size: 14px; }
.tb-hop { right: 0; width: min(360px, 92vw); max-height: 70vh; overflow: auto; }
.tb-hop .tb-tua { display: block; padding: 8px 12px 6px; font-size: 15px; }
.tb-hop a { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; }
.tb-hop a i { color: var(--xanh); margin-top: 1px; }
.tb-hop a.do i, .tb-hop a.do span { color: var(--do); }

/* ---------- Thanh bên / thanh dưới ---------- */
.the .the-trang { display: none; }
.the em { font-style: normal; }
.the a[aria-current="page"] span { background: #e1f3ea; color: #0b6b4b; }

/* ---------- Banner ---------- */
.bn { position: relative; height: 150px; border-radius: 20px; overflow: hidden; margin: 0 0 16px; box-shadow: var(--bong); background: #dff2ff; }
.bn-hinh { position: absolute; inset: 0; width: 100%; height: 100%; }
.bn-chu { position: absolute; left: 6%; top: 50%; transform: translateY(-58%); max-width: 62%; }
.bn-chu h2 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #0b4d3b; text-shadow: 0 2px 0 rgba(255, 255, 255, .6); }
.bn-cau { margin: 6px 0 0; font: 700 16px/1.25 var(--chu-tay); color: #0d5642; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.bn-cau.hien { animation: hien .6s ease; }
@keyframes hien { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bn-vet { display: block; width: 78%; height: 10px; margin-top: 4px; border-bottom: 3px solid #f5b82e; border-radius: 0 0 60% 40% / 0 0 100% 100%; }
.bn-cham { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.bn-cham button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(11, 77, 59, .15); cursor: pointer; transition: width .25s; }
.bn-cham button[aria-current] { width: 30px; background: #0b4d3b; }

/* ---------- Thẻ chào ---------- */
.chao { position: relative; overflow: hidden; border-radius: 20px; padding: 20px 18px 16px; background: linear-gradient(115deg, #0a4f3c 0%, #0f6b4e 55%, #1b8a5c 100%); box-shadow: 0 10px 30px rgba(11, 77, 59, .22); }
.chao::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 92% 18%, rgba(255, 230, 140, .25), transparent 28%), radial-gradient(circle at 70% 100%, rgba(255, 255, 255, .08), transparent 40%); pointer-events: none; }
.chao-sach { display: none; }
.chao-dau { position: relative; display: flex; align-items: center; gap: 14px; }
.chao-sao { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #ffc65a, #f08a1c); border: 4px solid rgba(255, 255, 255, .28); color: #fff; box-shadow: 0 6px 16px rgba(240, 138, 28, .35); }
.chao-sao .ic { width: 28px; height: 28px; fill: #fff; stroke: #fff; }
.chao h1 { font-size: 22px; color: #fff; }
.chao p { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; font-size: 15px; color: rgba(255, 255, 255, .88); }
.chao p .ic { width: 19px; height: 19px; }
.hoi { position: relative; margin-top: 16px; align-items: center; border-radius: 14px; padding: 5px 5px 5px 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.hoi > span { color: #7d8b88; display: grid; }
.hoi button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 11px; font-size: 15.5px; background: linear-gradient(180deg, #ffcf47, #f4ab18); color: #1f2a20; box-shadow: 0 3px 10px rgba(244, 171, 24, .35); }
.hoi button .ic { width: 19px; height: 19px; fill: #1f2a20; }
.goi-y { position: relative; gap: 10px; padding-top: 14px; }
.goi-y button { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); padding: 8px 15px; font-size: 13.5px; }
.goi-y button .ic { width: 17px; height: 17px; color: #ffd166; }
.goi-y button:first-child .ic { color: #ff9a3c; fill: #ffb547; }

/* ---------- Số liệu ---------- */
.so-lieu { grid-template-columns: 1fr 1fr; gap: 12px; background: none; box-shadow: none; margin: 16px 0 6px; }
.so-lieu > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px; background: #fff; border-radius: 18px; box-shadow: var(--bong); text-align: left; transition: transform .15s, box-shadow .15s; }
.so-lieu > * + * { border-left: 0; }
.so-lieu > a:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 64, 50, .12); }
.so-lieu i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.so-lieu i .ic { width: 25px; height: 25px; stroke-width: 2; }
.so-lieu span { font-size: 14px; color: #4b5b58; line-height: 1.25; }
.so-lieu b { font-size: 26px; color: #18252b; line-height: 1.1; }
.so-lieu > a > .ic { color: #9aa6a4; width: 20px; }
.sl-xd i { background: linear-gradient(145deg, #7dbcff, #2f7fe8); box-shadow: 0 0 0 6px #e6f1ff; }
.sl-xl i { background: linear-gradient(145deg, #6fdca6, #17a160); box-shadow: 0 0 0 6px #e3f7ec; }
.sl-tm i { background: linear-gradient(145deg, #bb97ff, #7a48e0); box-shadow: 0 0 0 6px #f0e9ff; }
.sl-cm i { background: linear-gradient(145deg, #ffbd6e, #f2761a); box-shadow: 0 0 0 6px #fff0e0; }

/* ---------- Khối thẻ trang Tổng quan ---------- */
.khoi { background: #fff; border-radius: 18px; box-shadow: var(--bong); padding: 16px 16px 14px; margin: 16px 0 0; }
.khoi-dau { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17.5px; font-weight: 700; }
.khoi-dau > .ic { color: #0f7a55; width: 24px; height: 24px; }
.khoi-dau > a { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #0f7a55; text-decoration: none; }
.khoi-dau > a .ic { width: 18px; height: 18px; }
.khoi .canh-bao, .khoi .viec, .khoi .muc { box-shadow: none; border-radius: 0; }
.tiet-the { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 0 0 10px; border-radius: 14px; background: linear-gradient(90deg, #e3f5ec, #f1faf6); text-decoration: none; color: var(--chu); border: 1px solid #d6efe2; transition: background .15s; }
.tiet-the:hover { background: #dcf2e6; }
.loa-hinh { width: 64px; height: 56px; flex: none; }
.tiet-the span { flex: 1; min-width: 0; }
.tiet-the b { display: block; font-size: 18px; }
.tiet-the small { color: #4b5b58; font-size: 14.5px; }
.tiet-the > i { width: 34px; height: 34px; border-radius: 50%; background: #17a160; color: #fff; display: grid; place-items: center; flex: none; }
.tiet-the > i .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.meo { display: flex; gap: 12px; align-items: flex-start; margin: 12px 2px 0; font-size: 14.5px; color: #4b5b58; }
.meo i { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #fff3d1; color: #e0a100; display: grid; place-items: center; }
.meo a { color: #0f7a55; font-weight: 600; }
.viec-the .viec { display: flex; flex-direction: column; }
.viec-the .viec li { border-bottom: 0; border-top: 1px solid #edf1f0; padding-left: 4px; padding-right: 4px; }
.viec-the .viec li.them { order: -1; border-top: 0; padding: 0 0 6px; min-height: 0; }
.viec-the .them-viec { width: 100%; padding: 0; flex-wrap: wrap; }
.viec-the .them-viec input { min-height: 46px; border-radius: 12px; }
.viec-the .them-viec input[name="text"] { flex: 1 1 200px; padding-left: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa6a4' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.3l2.7 2.7L16.5 9'/%3E%3C/svg%3E") 12px 50% / 20px no-repeat; }
.viec-the .them-viec input[type="date"] { flex: 0 1 170px; }
.viec-the .them-viec button { min-height: 46px; padding: 0 22px; background: #0b5a43; border-color: #0b5a43; color: #fff; border-radius: 12px; }
.viec-the .them-viec button:hover { background: #084634; }
.vua-soan { list-style: none; margin: 0; padding: 0; }
.vua-soan li + li { border-top: 1px solid #edf1f0; }
.vua-soan a { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 10px 4px; text-decoration: none; color: inherit; border-radius: 10px; }
.vua-soan a:hover { background: #f6faf8; }
.vua-soan a > .ic { color: #6b7a77; width: 20px; }
.vua-soan i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.vua-soan b { display: block; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.vua-soan small { color: var(--mo); font-size: 13px; }
.vs-xd { background: #e6f0ff; color: #2f7fe8; } .vs-xl { background: #e3f7ec; color: #17a160; } .vs-tm { background: #efe7ff; color: #7a48e0; } .vs-cm { background: #fff0e0; color: #f2761a; }
.khoi .trong { box-shadow: none; padding: 8px 4px; }

@media (min-width: 640px) {
  .so-lieu { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .so-lieu > a { padding: 18px 18px; gap: 16px; }
  .so-lieu i { width: 58px; height: 58px; }
  .so-lieu i .ic { width: 28px; height: 28px; }
  .so-lieu b { font-size: 30px; }
  .so-lieu span { font-size: 15.5px; }
  .bn { height: 210px; }
  .bn-chu h2 { font-size: 60px; }
  .bn-cau { font-size: 30px; }
  .chao { padding: 26px 30px 22px; }
  .chao-sach { display: block; position: absolute; right: 26px; top: 16px; width: 190px; opacity: .97; }
  .chao-dau, .hoi, .goi-y { margin-right: 210px; }
  .chao h1 { font-size: 28px; }
  .chao-sao { width: 66px; height: 66px; }
}

/* ---------- Máy tính: thanh bên ---------- */
@media (min-width: 960px) {
  .so { padding: 0 0 48px var(--the-rong); transition: padding .2s; }
  .so.gon { --the-rong: 84px; }
  .gay { position: sticky; top: 0; z-index: 15; flex-wrap: nowrap; justify-content: flex-start; height: 78px; padding: 0 30px; gap: 22px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); box-shadow: 0 1px 0 #e6ecea; }
  .gay .ten-so { display: none; }
  .gay-menu { display: grid; }
  .tim { order: 0; flex: 0 1 560px; height: 50px; }
  .toi span { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
  .toi > .ic { display: block; width: 18px; color: #4b5b58; }
  .toi i { width: 48px; height: 48px; }
  .gay-phai { gap: 14px; }
  .trang { max-width: 1420px; padding: 22px 30px 24px; }
  .the { width: var(--the-rong); padding: 22px 14px 16px; gap: 8px; overflow: hidden; background: linear-gradient(180deg, #0c5442 0%, #0a4436 60%, #083a2e 100%); transition: width .2s; }
  .the .the-ten { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; margin: 0 0 26px; color: #fff; text-decoration: none; }
  .the .the-ten .logo-hinh { width: 78px; height: 66px; margin-bottom: 4px; }
  .the .the-ten b { font-size: 29px; font-weight: 800; letter-spacing: -.02em; }
  .the .the-ten small { font-size: 12px; color: rgba(255, 255, 255, .82); white-space: nowrap; }
  .the a:not(.the-ten) { height: 56px; gap: 16px; padding: 0 18px; border-radius: 16px; font-size: 16.5px; font-weight: 600; color: rgba(255, 255, 255, .88); }
  .the a:not(.the-ten) .ic { width: 26px; height: 26px; }
  .the a:not(.the-ten):hover { background: rgba(255, 255, 255, .08); }
  .the a[aria-current="page"] { background: linear-gradient(90deg, #239a64, #1c8a58); box-shadow: inset 4px 0 0 #f5b82e, 0 6px 16px rgba(0, 0, 0, .18); color: #fff; }
  .the a[aria-current="page"] span { background: none; color: #fff; }
  .the .the-trang { display: block; margin-top: auto; position: relative; text-align: center; color: #fff; padding-bottom: 8px; }
  .the .the-trang .sach-hinh { width: 190px; opacity: .2; filter: grayscale(.2); margin: 0 auto -18px; display: block; }
  .the .the-trang p { font: 700 27px/1.15 var(--chu-tay); transform: rotate(-5deg); text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
  .the .the-trang p::after { content: ""; display: block; width: 150px; height: 8px; margin: 2px auto 0; border-bottom: 2px solid #f5b82e; border-radius: 0 0 60% 40% / 0 0 100% 100%; }
  .so.gon .the { padding: 22px 10px; }
  .so.gon .the em, .so.gon .the .the-ten b, .so.gon .the .the-ten small, .so.gon .the .the-trang { display: none; }
  .so.gon .the .the-ten .logo-hinh { width: 48px; height: 42px; }
  .so.gon .the a:not(.the-ten) { justify-content: center; padding: 0; }
  #toast { left: calc(50% + var(--the-rong) / 2); }
  .hai-cot { gap: 0 22px; }
  .hai-cot .khoi:first-child { margin-top: 18px; }
  .bn { height: 236px; }
  .bn-chu h2 { font-size: 74px; }
  .bn-cau { font-size: 34px; }
  .chao-sach { width: 230px; right: 40px; top: 10px; }
  .chao-dau, .hoi, .goi-y { margin-right: 250px; }
}
@media print { .bn, .chao, .so-lieu { display: none !important; } }
@media (min-width: 960px) {
  .the .the-ten { height: auto; padding: 0; flex: none; }
  .the .the-ten .logo-hinh { flex: none; }
}

/* ===== Học vui (hoc-vui.js) ===== */
.hv-tab { grid-template-columns: repeat(4, 1fr); }
.hv-ma { font-family: ui-monospace, Menlo, monospace; font-size: 1.08em; letter-spacing: .08em; background: var(--vang-nhat); color: #6a4a00; border-radius: 6px; padding: 1px 7px; }
.hv-hai { display: grid; gap: 0 18px; align-items: start; }
.hv-hai > section, .hv-hai > form { min-width: 0; }
.hv-nhap3 { display: grid; gap: 14px; }
.hv-nhap3 > div { display: grid; gap: 6px; align-content: start; }
.hv-nhan { font-weight: 700; font-size: 14px; }
.hv-nh { display: grid; gap: 8px; max-height: 380px; overflow: auto; border-top: 1px solid var(--vien); padding-top: 10px; }
.hv-giao { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hv-giao li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: #f6faf8; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.hv-giao li span { color: var(--mo); flex: 1; }
.hv-pa { display: grid; gap: 8px; }
.hv-pa1 { display: flex; align-items: center; gap: 8px; }
.hv-pa1 b { width: 22px; text-align: center; color: var(--xanh); }
.hv-pa1 input:not([type]) , .hv-pa1 input[data-a] { flex: 1; min-width: 0; border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; min-height: 42px; }
.hv-pa1 input[type="radio"] { width: 20px; height: 20px; accent-color: #17a160; }
.hv-cau-ds { list-style: none; counter-reset: c; margin: 0; padding: 0; display: grid; gap: 8px; }
.hv-cau-ds li { counter-increment: c; display: flex; gap: 10px; justify-content: space-between; background: var(--mat); border-radius: 14px; box-shadow: var(--bong); padding: 12px 14px; }
.hv-cau-ds li > div::before { content: counter(c) ". "; font-weight: 800; color: var(--xanh); }
.hv-cau-ds p { margin: 4px 0; font-weight: 600; }
.hv-loai { font-size: 12.5px; background: #efe9ff; color: #5b3fd1; border-radius: 6px; padding: 1px 7px; }
.hv-dung { color: #1d7a52; }
.hv-nut { display: flex; align-items: flex-start; gap: 2px; flex: none; }
.hv-chip { text-decoration: none; border: 1.5px solid var(--vien); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; color: #34423f; background: var(--mat); }
.hv-chip[aria-current] { background: var(--xanh); border-color: var(--xanh); color: #fff; }
.hv-bang { width: 100%; border-collapse: collapse; background: var(--mat); border-radius: 14px; overflow: hidden; box-shadow: var(--bong); font-size: 14.5px; }
.hv-bang th, .hv-bang td { padding: 9px 12px; border-bottom: 1px solid #edf1f0; text-align: left; }
.hv-bang th { background: #f3f7f5; font-size: 13px; color: var(--mo); }
.hv-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: c; }
.hv-tl li { counter-increment: c; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 10px 14px; display: grid; gap: 4px; }
.hv-tl p { margin: 0; font-weight: 600; } .hv-tl p::before { content: counter(c) ". "; color: var(--xanh); }
.hv-thanh { position: relative; height: 22px; background: #edf1f0; border-radius: 8px; overflow: hidden; }
.hv-thanh i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; }
.hv-thanh span { position: relative; display: block; text-align: center; font-size: 13px; font-weight: 700; line-height: 22px; }
.hv-game-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hv-game { display: flex; flex-direction: column; gap: 6px; background: var(--mat); border-radius: 18px; box-shadow: var(--bong); padding: 16px; border-top: 6px solid var(--g); }
.hv-game .icon { font-size: 42px; line-height: 1; }
.hv-game b { font-size: 17px; }
.hv-game p { margin: 0 0 6px; color: var(--mo); font-size: 14px; flex: 1; }
.hv-bo-cau { margin: 0; padding: 0 0 0 22px; display: grid; gap: 10px; }
.hv-bo-cau li { background: var(--mat); border-radius: 14px; box-shadow: var(--bong); padding: 12px; display: grid; gap: 8px; }
.hv-bo-cau textarea { width: 100%; min-height: 48px; border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; font-weight: 600; }
.hv-bo-cau .hv-pa { grid-template-columns: 1fr 1fr; }
.hv-bxh { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hv-bxh li { display: flex; align-items: center; gap: 12px; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 10px 14px; }
.hv-bxh span { width: 30px; text-align: center; font-weight: 800; } .hv-bxh b { flex: 1; } .hv-bxh em { font-style: normal; font-weight: 800; color: #5b3fd1; }
.hv-phieu { display: none; }
@media (min-width: 900px) { .hv-hai { grid-template-columns: 1fr 1fr; } .hv-hai.rong { grid-template-columns: 1.1fr 1fr; } .hv-nhap3 { grid-template-columns: 1fr 1fr 1.3fr; } }
@media (max-width: 600px) { .hv-tab { grid-template-columns: 1fr 1fr; } .hv-bo-cau .hv-pa { grid-template-columns: 1fr; } }
.hv-nhap3 select, .hv-nhap3 input:not([type="file"]) { min-height: 40px; border: 1.5px solid var(--vien); border-radius: 9px; padding: 6px 10px; background: var(--mat); max-width: 100%; }
.hv-nhap3 select { flex: 1; min-width: 0; }

/* ===== Trộn đề từ file Word (tron-de/web/giao-dien.js) ===== */
.tw-phan { font-size: 15.5px; margin: 14px 0 6px; }
.tw-xem { margin: 0; padding-left: 4px; list-style: none; display: grid; gap: 8px; font-size: 14.5px; }
.tw-xem li { background: #f8fbfa; border-radius: 10px; padding: 8px 12px; }
.tw-xem .tw-dan { background: #fff7e0; }
.tw-pa { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--mo); }
.tw-pa .dung { color: #1d7a52; font-weight: 700; }
.tw-bang td, .tw-bang th { text-align: center; }

/* ===== MÔ HÌNH 3D TƯƠNG TÁC (mo-hinh-3d/) ===== */
.mh-goi { display: flex; flex-wrap: wrap; gap: 8px; }
.mh-goi button { border: 1.5px solid var(--vien); background: var(--mat); border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #34423f; cursor: pointer; }
.mh-goi button:hover { border-color: var(--xanh); color: var(--xanh); }
.mh-hai { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.mh-tao .hang small { flex: 1; min-width: 200px; }
.mh-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mh-the { background: var(--mat); border-radius: 14px; box-shadow: var(--bong); overflow: hidden; display: flex; flex-direction: column; }
.mh-anh { position: relative; display: block; height: 170px; background: radial-gradient(90% 120% at 50% 20%, #17406b, #0a1830 60%, #060d1a); overflow: hidden; }
.mh-anh i { position: absolute; left: 12px; top: 12px; font-style: normal; font-size: 12px; font-weight: 700; color: #04121f; background: var(--c); padding: 2px 9px; border-radius: 20px; }
.mh-sua { position: absolute; left: 50%; top: 26px; width: 150px; height: 70px; margin-left: -75px; border-radius: 75px 75px 18px 18px / 70px 70px 18px 18px; background: radial-gradient(60% 80% at 50% 30%, #e9f6ffcc, #7fd8ff55 60%, #7fd8ff22); box-shadow: 0 0 40px #38d3f566, inset 0 -6px 14px #ff7fd155; animation: mh-boi 3.2s ease-in-out infinite; }
.mh-sua::before { content: ""; position: absolute; left: 50%; top: 18px; width: 60px; height: 26px; margin-left: -30px; border-radius: 50%; border: 6px solid #ff7fd1aa; border-left-color: transparent; border-right-color: transparent; }
.mh-sua::after { content: ""; position: absolute; left: 10px; right: 10px; top: 66px; height: 70px; background: repeating-linear-gradient(90deg, #f6dcff99 0 1.5px, transparent 1.5px 7px); -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); }
@keyframes mh-boi { 50% { transform: translateY(-8px) scaleX(.94); } }
.mh-noi { padding: 12px 14px 14px; display: grid; gap: 6px; }
.mh-noi small { color: var(--mo); font-size: 13px; }
.mh-ds { display: grid; gap: 8px; }
.mh-dong { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); text-decoration: none; color: inherit; }
.mh-dong:hover { box-shadow: var(--bong), 0 0 0 2px var(--xanh-nhat); }
.mh-dong .w { min-width: 0; flex: 1; }
.mh-dong b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-dong small { color: var(--mo); font-size: 12.5px; }
.mh-tt { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, #38bdf8, #6366f1); }
.mh-tt.loi { background: var(--do); }
.mh-tt.dang-tao, .mh-tt.dang-sua { background: #0f2742; }
.mh-quay { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #ffffff33; border-top-color: #38d3f5; animation: mh-q 0.9s linear infinite; }
@keyframes mh-q { to { transform: rotate(360deg); } }
.mh-tua { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mh-tua small { flex-basis: 100%; }
.mh-tua .chu { font-size: 13px; font-weight: 600; }
.mh-nut { margin-bottom: 12px; }
.mh-khung { position: relative; display: flex; flex-direction: column; height: min(84vh, 880px); min-height: 480px; border-radius: 14px; overflow: hidden; background: #060d1a; box-shadow: var(--bong); margin-bottom: 16px; }
.mh-thanh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 7px 14px; background: #0b1426; border-bottom: 1px solid #1f2d48; color: #cfd9ee; font-size: 13.5px; font-weight: 600; flex: none; }
.mh-thanh span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mh-tc { flex: none; border: 0; border-radius: 9px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; color: #04121f; background: linear-gradient(135deg, #38d3f5, #60a5fa); box-shadow: 0 4px 14px #38d3f544; }
.mh-tc:hover { filter: brightness(1.08); }
.mh-tc.on { background: #f87171; color: #fff; box-shadow: 0 4px 14px #f8717155; }
.mh-vung { position: relative; flex: 1; min-height: 0; }
.mh-vung iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.mh-khung:fullscreen { height: 100vh; min-height: 0; border-radius: 0; margin: 0; }
.mh-khung:-webkit-full-screen { height: 100vh; min-height: 0; border-radius: 0; margin: 0; }
.mh-khung.mh-phu { position: fixed; inset: 0; z-index: 9999; height: auto; min-height: 0; border-radius: 0; margin: 0; }
body.mh-dang-tc { overflow: hidden; }
.mh-cho { display: flex; gap: 14px; align-items: center; background: #0f2742; color: #e7eefc; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.mh-cho small { display: block; color: #a9bad9; }
.mh-loi { background: var(--do-nhat); color: var(--do); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.mh-chia { display: flex; gap: 16px; align-items: center; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 12px 14px; margin-bottom: 14px; }
.mh-chia .qr { width: 110px; flex: none; }
.mh-chia .qr svg { width: 100%; height: auto; display: block; }
.mh-chia > div:last-child { display: grid; gap: 6px; min-width: 0; justify-items: start; }
.mh-chia code { font-size: 13.5px; word-break: break-all; background: var(--xanh-nhat); padding: 3px 8px; border-radius: 6px; }
.mh-chia small { color: var(--mo); }
.mh-nguon { min-height: 420px; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; tab-size: 2; }
@media (max-width: 700px) { .mh-hai { grid-template-columns: 1fr 1fr; } .mh-khung { height: 76svh; min-height: 400px; } .mh-tc { padding: 7px 10px; font-size: 12.5px; } .mh-chia { flex-direction: column; align-items: flex-start; } }
.mh-loi-chay { background: #fff1f1; border: 1px solid #fecaca; align-items: center; }
.mh-loi-chay > div { display: grid; gap: 6px; min-width: 0; flex: 1; }
.mh-loi-chay code { display: block; font-size: 12.5px; color: #7f1d1d; background: #fee2e2; padding: 6px 9px; border-radius: 7px; white-space: pre-wrap; word-break: break-word; }
.mh-loi-chay small { color: #7a4b4b; }
.mh-anh-he-mat-troi { background: radial-gradient(90% 120% at 50% 50%, #12203f, #070d1c 60%, #02050d); }
.mh-anh-he-mat-troi .mh-sua { top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff7cc, #fbbf24 45%, #f97316 80%); box-shadow: 0 0 30px #fbbf24aa; animation: none; }
.mh-anh-he-mat-troi .mh-sua::before { width: 150px; height: 56px; margin-left: -75px; left: 50%; top: -5px; border: 1px solid #6f8cc466; border-radius: 50%; }
.mh-anh-he-mat-troi .mh-sua::after { left: 50%; top: -38px; width: 250px; height: 120px; margin-left: -125px; right: auto; border: 1px solid #6f8cc444; border-radius: 50%; background: radial-gradient(circle at 92% 50%, #d8a26c 0 9px, transparent 10px), radial-gradient(circle at 18% 70%, #3b82f6 0 5px, transparent 6px); -webkit-mask: none; mask: none; }

/* ===== LOGO EDUMATE (ảnh) ===== */
img.logo-hinh, img.logo-day { display: block; object-fit: contain; }
.gay .ten-so img.logo-hinh { width: 36px; height: 36px; padding: 0; background: none; border-radius: 50%; box-shadow: 0 1px 4px rgba(11, 77, 59, .18); }
.the .the-ten img.logo-hinh { display: none; }
.the .the-ten img.logo-day { width: 150px; height: 150px; border-radius: 50%; background: #fff; box-shadow: 0 6px 22px rgba(0, 0, 0, .25), 0 0 0 4px rgba(255, 255, 255, .12); }
.so.gon .the .the-ten img.logo-day { display: none; }
.so.gon .the .the-ten img.logo-hinh { display: block; width: 48px; height: 48px; border-radius: 50%; }
.cua .cua-logo { justify-content: center; margin-bottom: 14px; }
.cua .cua-logo img { width: 168px; height: 168px; filter: drop-shadow(0 8px 20px rgba(11, 77, 59, .16)); }
.cua h1 { text-align: center; }
.cua .loi-chao { text-align: center; }
.mh-anh-tim-nguoi { background: radial-gradient(90% 120% at 50% 40%, #3b1220, #12070d 65%, #050206); }
.mh-anh-tim-nguoi .mh-sua { top: 28px; width: 120px; height: 120px; margin-left: -60px; border-radius: 0; background: none; box-shadow: none; display: grid; place-items: center; font-size: 84px; animation: mh-dap 1.1s ease-in-out infinite; }
.mh-anh-tim-nguoi .mh-sua::before { content: "🫀"; position: static; width: auto; height: auto; margin: 0; border: 0; }
.mh-anh-tim-nguoi .mh-sua::after { display: none; }
@keyframes mh-dap { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 30% { transform: scale(.97); } }
.mh-sf { border: 1.5px dashed #9ec9f5; background: linear-gradient(180deg, #f3f9ff, #fff); }
.mh-sf-dau { display: grid; gap: 4px; }
.mh-sf-dau b { font-size: 15.5px; color: #0b4a7a; }
.mh-sf-dau small { color: var(--mo); font-size: 13px; }
.mh-sf-ghi { margin: -4px 0 10px; font-size: 13.5px; }
/* ngân hàng mô hình chung */
.mh-kho { background: linear-gradient(180deg, #eef7f3, #fff); border: 1.5px solid #cfe5db; border-radius: 18px; padding: 16px; margin-bottom: 22px; }
.mh-kho-dau { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.mh-kho-dau h2 { font-size: 19px; color: #0b4d3b; margin: 0 0 2px; }
.mh-kho-dau small { color: var(--mo); font-size: 13px; display: block; max-width: 640px; }
.mh-loc { display: flex; flex-wrap: wrap; gap: 8px; }
.mh-loc select, .mh-loc input { min-height: 40px; border: 1.5px solid var(--vien); border-radius: 11px; padding: 6px 10px; background: #fff; font: inherit; font-size: 14px; }
.mh-loc input { min-width: 190px; }
.mh-kho-anh { background: #0b1426; }
.mh-kho-anh img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mh-kho-bieu { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; background: radial-gradient(90% 120% at 50% 30%, #17406b, #0a1830 60%, #060d1a); }
.mh-kho-anh i { z-index: 1; background: #fbbf24; }
.mh-an { position: absolute; right: 10px; top: 10px; z-index: 1; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: #7f1d1d; padding: 2px 9px; border-radius: 20px; }
.mh-kho-the.an { opacity: .7; }
.mh-kho-the[hidden] { display: none; }
.mh-cd { color: #0b4d3b !important; font-weight: 600; }
.mh-so { font-size: 12px !important; }
.mh-sf-hop { margin: 4px 0 18px; }
.mh-sf-hop > summary { cursor: pointer; font-weight: 700; color: #0b4a7a; padding: 8px 2px; }
.mh-kho-qt { border: 1.5px dashed #f5b82e; background: linear-gradient(180deg, #fffaf0, #fff); margin-bottom: 16px; }
.mh-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin: 4px 0 8px; }
.mh-goi-y-kho { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

/* ---------- Atlas cơ thể người 3D (#/giai-phau) ---------- */
.mh-gp { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; background: linear-gradient(110deg, #fff4f0, #fff 60%); border: 1.5px solid #f1d3c8; border-radius: 16px; padding: 14px 18px; margin: 4px 0 22px; }
.mh-gp > span:first-child { font-size: 34px; }
.mh-gp > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mh-gp small { color: #5b6b66; }
.mh-gp i { font-style: normal; font-weight: 600; color: #b4533d; white-space: nowrap; }
.mh-gp:hover { border-color: #e2a996; box-shadow: 0 6px 18px #b4533d14; }
.gp-bai { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.gp-bai button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1.5px solid #dbe5e1; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.gp-bai button small { color: #6b7a75; font-size: 12px; }
.gp-bai button:hover { border-color: #0f5a4c66; }
.gp-bai button.on { border-color: #0f5a4c; background: #eef7f3; box-shadow: inset 0 0 0 1px #0f5a4c; }
.gp-nut { align-items: center; }
.gp-dv.on { background: #fff4d6; border-color: #e0b84a; }
.gp-trang .mh-khung { background: #f3f4f4; }
.gp-nguon { font-size: 12.5px; margin-top: 14px; }
@media (max-width: 640px) { .gp-bai { grid-template-columns: 1fr 1fr; } .gp-trang .mh-khung { height: 78vh; } }

/* ---------- Mô hình .glb (tải lên / Hyper3D Rodin) ---------- */
.mh-glb-hai { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 22px; }
.mh-glb-hai .dien { margin: 0; }
.mh-hai-nho { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.mh-rd-qt { margin-top: 10px; border-top: 1px dashed #d5e3dc; padding-top: 10px; }
.mh-rd-qt summary { cursor: pointer; font-weight: 600; color: #0b4d3b; }

/* ---------- Hộp thoại (thay confirm/alert/prompt) ---------- */
dialog.hop { border: 0; border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--mat); color: var(--chu); box-shadow: 0 24px 60px rgba(10, 40, 34, .28), 0 0 0 1px rgba(15, 40, 34, .06); }
dialog.hop::backdrop { background: rgba(9, 30, 25, .45); backdrop-filter: blur(2px); }
dialog.hop[open] { animation: hop-vao .16s ease-out; }
@keyframes hop-vao { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.hop form { padding: 22px 22px 18px; display: grid; gap: 12px; }
.hop-tua { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--chu); }
.hop-noi { color: var(--mo); font-size: 14.5px; line-height: 1.55; }
.hop-o { width: 100%; padding: 10px 12px; border: 1.5px solid var(--vien); border-radius: 10px; background: #fff; font-size: 15px; }
.hop-o:focus { border-color: var(--xanh); outline: none; box-shadow: 0 0 0 3px var(--xanh-nhat); }
.hop-o[readonly] { background: var(--nen); font-family: ui-monospace, Menlo, monospace; }
.hop-nut { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.hop-nut .nut { min-width: 92px; justify-content: center; }
.hop-nut .nut.do { background: var(--do); border-color: var(--do); color: #fff; }
.hop-nut .nut.do:hover { filter: brightness(1.08); }

/* ===== Luyện nhớ, AI soạn bộ câu hỏi (nhân bản từ FunLinga) ===== */
.hv-ai, .ln-ai { background: #f6f2ff; border: 1.5px dashed #b7a3f0; border-radius: 12px; padding: 10px 14px; }
.hv-ai summary, .ln-ai summary, #ln-f details summary { cursor: pointer; font-weight: 700; color: #4b2fb3; }
.hv-ai[open], .ln-ai[open] { display: grid; gap: 12px; }
#ln-f details { display: grid; gap: 10px; }
#ln-f textarea, .hv-ai textarea, .ln-ai textarea, .ln-the-ds textarea, .ln-the-ds input { width: 100%; border: 1.5px solid var(--vien); border-radius: 9px; padding: 8px 10px; font: inherit; background: var(--mat); }
.ln-the-ds [data-f] { font-weight: 700; }
.ln-the-ds .hai { gap: 8px; }

/* ===== Thẻ trò chơi sang trọng (kho trò chơi, Học vui, Góc học sinh) ===== */
.gc-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 0 0 8px; }
.gc { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 16px; border-radius: 22px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #1d3ba8 0%, #2a55d6 55%, #4777ec 100%); box-shadow: 0 10px 24px rgba(29, 59, 168, .28), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .15s, box-shadow .15s; }
.gc::after { content: ""; position: absolute; width: 230px; height: 230px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, .09); pointer-events: none; }
.gc:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(29, 59, 168, .36), inset 0 1px 0 rgba(255, 255, 255, .18); }
.gc-dau { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.gc-ic { flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #ffb85c, #e8762c 70%); box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 6px 14px rgba(0, 0, 0, .22); }
.gc-chu { display: grid; gap: 5px; min-width: 0; }
.gc-nhan { justify-self: start; background: linear-gradient(#ffe07a, #f6c94a); color: #6b3a00; font-weight: 800; font-size: 12.5px; letter-spacing: .02em; padding: 3px 12px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); white-space: nowrap; }
.gc-ten { font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.gc-mo { position: relative; z-index: 1; margin: 0; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .86); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gc-nut { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: auto; }
.gc-nut a, .gc-nut button, .gc-nut span { flex: 1; display: block; text-align: center; padding: 9px 12px; border-radius: 999px; border: 0; background: rgba(8, 22, 92, .42); color: #fff; font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.gc-nut a:hover, .gc-nut button:hover { background: rgba(8, 22, 92, .62); }
.gc-nut .vang { background: linear-gradient(#ffe07a, #f6c94a); color: #5a3200; }
.gc.tim-tim { background: linear-gradient(135deg, #4b2bb3 0%, #6a3fe0 55%, #8e6af2 100%); box-shadow: 0 10px 24px rgba(75, 43, 179, .28); }
.gc.xanh-la { background: linear-gradient(135deg, #0b5a43 0%, #148a63 55%, #27b07f 100%); box-shadow: 0 10px 24px rgba(11, 90, 67, .28); }
.gc-muc { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 2px 10px; }
.gc-muc h2 { margin: 0; font-size: 17px; font-weight: 800; }
.gc-muc select { min-height: 38px; border: 1.5px solid #d5dfdc; border-radius: 10px; padding: 4px 10px; background: #fff; font: inherit; }

/* ===== Gọn trang để vừa màn hình (bớt thanh cuộn dọc) ===== */
.tua { margin: 2px 0 12px; }
.tua small { margin-top: 3px; }
.lui { padding: 2px 0; }
.dien { gap: 11px; padding: 14px 16px; margin: 0 0 12px; }
.o { gap: 4px; }
.o input, .o select, .o textarea { min-height: 42px; padding: 8px 12px; }
.o textarea { min-height: 84px; }
.nut { min-height: 42px; padding: 8px 18px; }
.de { margin: 18px 2px 8px; }
@media (min-width: 960px) {
  .so { padding-bottom: 16px; }
  .gay { height: 64px; }
  .trang { padding: 12px 30px 12px; }
  .tua { font-size: 26px; margin: 0 0 10px; }
  .hai.ba { grid-template-columns: repeat(3, 1fr); }
  .the .the-ten { margin-bottom: 16px; }
  .the a:not(.the-ten) { height: 50px; }
}
@media (min-width: 960px) and (max-height: 820px) {
  .o textarea { min-height: 70px; }
  .the .the-trang { display: none; }
  .the .the-ten img.logo-day { width: 112px; height: 112px; }
}
@media (min-width: 960px) {
  .so { padding-bottom: 8px; }
  .muc a, .muc button:not(.chu) { min-height: 48px; padding: 9px 14px 9px 16px; }
  /* danh sách dài: 2 cột cho đỡ cuộn */
  .muc:has(> li:nth-child(6)) { display: grid; grid-template-columns: 1fr 1fr; }
  .muc:has(> li:nth-child(6)) > li { border-top: 1px solid var(--vien); }
  .muc:has(> li:nth-child(6)) > li:nth-child(-n+2) { border-top: 0; }
  .muc:has(> li:nth-child(6)) > li:nth-child(odd) { border-right: 1px solid var(--vien); }
}
@media (max-width: 959px) { .the a em[data-ngan] { font-size: 0; } .the a em[data-ngan]::after { content: attr(data-ngan); font-size: 11.5px; } }
@media (min-width: 960px) { :root { --the-rong: 262px; } .the a:not(.the-ten) { gap: 12px; padding: 0 14px; font-size: 15.5px; } .the a:not(.the-ten) em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.gc.cam { background: linear-gradient(135deg, #8a3b12 0%, #c2571d 55%, #e9853a 100%); box-shadow: 0 10px 24px rgba(138, 59, 18, .26); }
.gc.cam .gc-ic { background: radial-gradient(circle at 35% 30%, #ffe3a3, #f2b33d 70%); }
/* Sinh hoạt chuyên môn */
.sh-loai { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0 0 12px; }
.sh-loai button { text-align: left; background: var(--mat); border: 1.5px solid var(--vien); border-radius: 12px; padding: 9px 12px; cursor: pointer; display: grid; gap: 2px; font: inherit; color: inherit; }
.sh-loai button b { font-size: 14px; } .sh-loai button small { font-size: 12px; color: var(--mo); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-loai button[aria-pressed="true"] { border-color: var(--xanh); background: var(--xanh-nhat, #e3f2ee); box-shadow: inset 0 0 0 1px var(--xanh); }
.sh-cap { display: inline-block; background: #fff1d6; color: #7a4a00; border-radius: 6px; padding: 0 6px; font-size: 11.5px; font-weight: 700; }
@media (min-width: 960px) { .hai.bon { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
/* Nền thanh trên: mạng nơ-ron, mạch điện tử nhẹ (chủ đề AI), lặp ngang để chỗ trống nào cũng thấy */
.gay { background: url(/assets/nen-ai.svg) left -120px center / auto 100% repeat-x, linear-gradient(100deg, rgba(255, 255, 255, .97) 0%, rgba(240, 249, 245, .97) 55%, rgba(226, 243, 236, .97) 100%); }
@media (min-width: 960px) { .gay-phai { background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .88) 22%); border-radius: 40px; padding: 4px 4px 4px 34px; } }
/* Lịch học kỳ */
.lk-so { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; }
.lk-so > div { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 10px 14px; display: grid; gap: 6px; }
.lk-so small { color: var(--mo); font-size: 12.5px; } .lk-to { font-size: 22px; font-weight: 800; }
.lk-ds { list-style: none; margin: 0 0 6px; padding: 0; background: var(--mat); border-radius: 12px; box-shadow: var(--bong); overflow: hidden; }
.lk-ds li { display: grid; grid-template-columns: 52px 5px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; }
.lk-ds li + li { border-top: 1px solid var(--vien); }
.lk-ds li.xong { opacity: .55; } .lk-ds li.xong .lk-chu b { text-decoration: line-through; }
.lk-ds li.qh { background: #fff3f2; } .lk-ds li.nay { background: #f0f8f5; }
.lk-ngay { display: grid; text-align: center; line-height: 1.15; } .lk-ngay b { font-size: 15px; } .lk-ngay small { font-size: 11.5px; color: var(--mo); }
.lk-loai { width: 5px; height: 34px; border-radius: 4px; background: var(--m); }
.lk-chu { display: grid; gap: 2px; min-width: 0; } .lk-chu small { color: var(--mo); font-size: 12.5px; } .lk-chu em { font-style: normal; font-size: 12.5px; color: #34423f; }
.lk-nhan { display: inline-block; color: var(--m); font-weight: 700; margin-right: 6px; }
.lk-nut { display: flex; gap: 8px; white-space: nowrap; font-size: 13px; }
.lk-ds.gon li { grid-template-columns: 44px 4px 1fr; padding: 7px 4px; }
.lk-cfg { margin-left: auto; } .lk-cfg summary { cursor: pointer; font-size: 13.5px; color: var(--mo); }
@media (max-width: 700px) { .lk-so { grid-template-columns: 1fr; } .lk-ds li { grid-template-columns: 44px 4px 1fr; } .lk-nut { grid-column: 3; } }
/* Rèn luyện */
.rl-dau { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; } .rl-dau nav { flex: 1; min-width: 280px; }
.rl-dem { display: inline-block; margin-left: 10px; font-size: 13px; }
.rl-bang td { vertical-align: middle; } .rl-bang select { min-height: 34px; border: 1.5px solid var(--vien); border-radius: 8px; padding: 2px 6px; }
.rl-bang textarea { width: 100%; min-width: 220px; border: 1.5px solid var(--vien); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13.5px; resize: vertical; }
/* Tuần của tôi */
.tu-uu { background: #fff8e6; border: 1.5px solid #f3d27a; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.tu-uu ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; } .tu-uu li.qh { color: #b3261e; font-weight: 600; }
.tu-luoi { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tu-ngay { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 180px; }
.tu-ngay.nay { box-shadow: 0 0 0 2px var(--xanh), var(--bong); } .tu-ngay.rong { opacity: .6; }
.tu-ngay h3 { margin: 0 0 2px; font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; } .tu-ngay h3 small { color: var(--mo); font-weight: 500; }
.tu-tiet { display: grid; background: #eef6f3; border-radius: 8px; padding: 5px 7px; font-size: 13px; text-decoration: none; color: inherit; } .tu-tiet small { color: var(--mo); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-sk { border-left: 4px solid var(--m); background: #f7f8fb; border-radius: 6px; padding: 4px 7px; font-size: 12.5px; display: grid; } .tu-sk small { color: var(--m); font-weight: 700; font-size: 11px; } .tu-sk.xong { opacity: .5; }
.tu-viec { font-size: 12.5px; display: flex; gap: 5px; align-items: flex-start; } .tu-viec.xong { text-decoration: line-through; opacity: .6; }
.tu-them { margin-top: auto; align-self: flex-start; font-size: 12.5px; }
@media (max-width: 900px) { .tu-luoi { grid-template-columns: 1fr; } .tu-ngay { min-height: 0; } .tu-ngay.rong { display: none; } }
/* Lịch học kỳ theo tuần */
.lk-tuan { display: grid; gap: 6px; margin-top: 10px; }
.lk-tuan a { display: grid; grid-template-columns: 70px 92px 1fr; gap: 10px; align-items: center; background: var(--mat); border-radius: 10px; box-shadow: var(--bong); padding: 7px 12px; text-decoration: none; color: inherit; }
.lk-tuan a.nay { box-shadow: 0 0 0 2px var(--xanh); } .lk-tuan small { color: var(--mo); font-size: 12px; }
.lk-tuan span { display: flex; flex-wrap: wrap; gap: 4px; } .lk-tuan i { font-style: normal; font-size: 12px; border-left: 3px solid var(--m); background: #f4f6f8; padding: 1px 6px; border-radius: 4px; } .lk-tuan i.xong { opacity: .5; text-decoration: line-through; } .lk-tuan em { color: #b8c4c0; font-style: normal; }
/* Họp phụ huynh */
.hp-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.hp-phieu { background: var(--mat); border-radius: 12px; box-shadow: var(--bong); padding: 10px 14px; display: grid; gap: 4px; font-size: 13.5px; }
.hp-phieu header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--vien); padding-bottom: 4px; margin-bottom: 2px; } .hp-phieu header > b { font-size: 15px; }
.hp-dong { display: grid; grid-template-columns: 96px 1fr; gap: 8px; } .hp-dong > span:first-child { color: var(--mo); font-size: 12.5px; }
.hp-goi { display: grid; gap: 3px; margin-top: 4px; } .hp-goi span { font-size: 12.5px; color: var(--mo); } .hp-goi textarea { border: 1.5px solid var(--vien); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; resize: vertical; }
.hp-tq > div { gap: 3px; }

/* ===== Thanh bên: menu → submenu dạng xổ (accordion) + năm học (17/11/2026) ===== */
.the-nhom { display: none; }
@media (max-width: 959px) {
  .the .the-cuon, .the .the-khoi, .the .the-con, .the .the-con > div { display: contents; }
  .the a:not(.the-chinh):not(.the-ten) { display: none; }
}
@media (min-width: 960px) {
  .the { padding: 16px 12px 12px; gap: 0; }
  .the .the-ten { margin: 0 0 12px; }
  .the .the-ten img.logo-day { width: 72px; height: 72px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25), 0 0 0 3px rgba(255, 255, 255, .12); }
  .the .the-trang { display: none; }
  .the .the-cuon { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 0 6px 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
  /* menu cấp 1 */
  .the-nhom { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 12px 0 14px; border: 0; border-radius: 13px; background: transparent; color: rgba(255, 255, 255, .9); font: inherit; font-size: 15.5px; font-weight: 700; text-align: left; cursor: pointer; }
  .the-nhom > span { display: grid; place-items: center; }
  .the-nhom .ic { width: 22px; height: 22px; }
  .the-nhom em { flex: 1; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .the-nhom:hover { background: rgba(255, 255, 255, .08); }
  .the-nhom:focus-visible { outline: 2px solid #f5b82e; outline-offset: -2px; }
  .the-mui { display: grid; place-items: center; font-style: normal; opacity: .7; transition: transform .25s; }
  .the-mui .ic { width: 16px; height: 16px; }
  .the-khoi.mo > .the-nhom { background: rgba(255, 255, 255, .1); color: #fff; }
  .the-khoi.mo .the-mui { transform: rotate(180deg); opacity: 1; }
  .the-khoi.co > .the-nhom { color: #fff; }
  .the-khoi.co > .the-nhom > span { color: #f5b82e; }
  /* submenu: xổ ra mượt bằng grid-template-rows */
  .the-con { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
  .the-con > div { overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding-left: 18px; margin-left: 24px; border-left: 1px solid rgba(255, 255, 255, .14); }
  .the-khoi.mo > .the-con { grid-template-rows: 1fr; }
  .the-khoi.mo > .the-con > div { padding-top: 4px; padding-bottom: 6px; }
  .the-khoi:not(.mo) .the-con a { visibility: hidden; }
  .the .the-con a:not(.the-ten) { height: 38px; min-height: 38px; border-radius: 10px; font-size: 14.5px; font-weight: 600; padding: 0 12px; gap: 10px; color: rgba(255, 255, 255, .8); }
  .the .the-con a .ic { width: 18px; height: 18px; }
  .the .the-con a[aria-current="page"] { background: linear-gradient(90deg, #239a64, #1c8a58); color: #fff; box-shadow: inset 3px 0 0 #f5b82e, 0 4px 12px rgba(0, 0, 0, .16); }
  /* thanh bên thu gọn: chỉ còn biểu tượng menu cấp 1, bấm là mở mục đầu */
  .so.gon .the-con { display: none; }
  .so.gon .the-nhom { justify-content: center; padding: 0; }
  .so.gon .the-nhom em, .so.gon .the-mui { display: none; }
  .so.gon .the-khoi.co > .the-nhom { background: linear-gradient(90deg, #239a64, #1c8a58); box-shadow: inset 3px 0 0 #f5b82e; }
  .so.gon .the .the-ten img.logo-hinh { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) { .the-con, .the-mui { transition: none; } }

.nam-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--xanh-nhat); color: var(--xanh-dam); text-decoration: none; font-weight: 800; font-size: 14px; white-space: nowrap; }
.nam-chip .ic { width: 18px; height: 18px; }
.nam-chip span small { display: block; font-size: 10.5px; font-weight: 600; opacity: .75; line-height: 1; }
.nam-chip.cu { background: #fff1d6; color: #8a5a00; box-shadow: inset 0 0 0 1.5px #f5b82e; }
@media (max-width: 600px) { .nam-chip span small { display: none; } .nam-chip { padding: 0 10px; font-size: 13px; } }

.nh-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 6px 0 16px; }
.nh-the { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--mat); border: 1px solid var(--vien); }
.nh-the b { font-size: 21px; color: var(--xanh-dam); }
.nh-the small { color: var(--mo); font-size: 12.5px; }
.nh-the p { margin: 4px 0 8px; font-size: 14px; }
.nh-the .nhan, .nh-the .nut { align-self: flex-start; }
.nh-the.dang { border: 2px solid var(--xanh); background: linear-gradient(180deg, #f2fbf7, #fff); }
.nh-the.them { border-style: dashed; justify-content: center; }
.nh-the.them input { font: inherit; padding: 8px 10px; border: 1px solid var(--vien); border-radius: 9px; margin: 6px 0; }
.nh-kc form.hang { align-items: flex-end; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.nh-kc form .ten { flex: 1 1 180px; font-weight: 700; }
.nh-kc form .ten small { display: block; color: var(--mo); font-weight: 500; }
.nh-kc form .o { flex: 0 1 170px; margin: 0; }
.nh-kc form .nut { flex: none; width: auto; }
.nh-kc form .kiem { margin: 0 0 8px; }
.so-lieu.bon { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) { .so-lieu.bon { grid-template-columns: repeat(2, 1fr); } }
.cn-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.cn-luoi a { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 13px; background: var(--mat); border: 1px solid var(--vien); text-decoration: none; color: inherit; }
.cn-luoi a:hover { border-color: var(--xanh); }
.cn-luoi i { grid-row: span 2; font-style: normal; font-size: 22px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--xanh-nhat); }
.cn-luoi b { font-size: 14.5px; }
.cn-luoi small { color: var(--mo); font-size: 12.5px; }
.hk-chon { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.chip { font: inherit; font-size: 14px; font-weight: 700; height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--vien); background: var(--mat); color: var(--xanh-dam); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--xanh); }
.chip[aria-pressed="true"] { background: var(--xanh); border-color: var(--xanh); color: #fff; }
.loai-cot { display: inline-block; margin: 3px 4px 0 0; padding: 1px 7px; border-radius: 999px; border: 0; font: 800 10.5px/1.6 inherit; cursor: pointer; background: #e7eef9; color: #1d5fb0; }
.loai-cot.l-gk { background: #fff1d6; color: #8a5a00; }
.loai-cot.l-ck { background: #fde4e1; color: #b2281e; }
.hs-loc { align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.hs-loc .o { margin: 0; }
.dg-bang th small { display: block; font-weight: 500; color: var(--mo); }
.dg-bang td, .dg-bang th { vertical-align: middle; padding: 8px 10px; white-space: nowrap; }
.dg-bang td:last-child { white-space: normal; min-width: 160px; }
.dg-bang .nhan { margin: 1px 2px; text-decoration: none; }
.dg-thanh { display: flex; height: 18px; border-radius: 6px; overflow: hidden; background: #eef2f1; }
.dg-thanh i { background: var(--m); color: #fff; font: 700 11px/18px inherit; font-style: normal; text-align: center; min-width: 16px; }
.dg-chu { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 13px; }
.dg-chu i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dg-chu small { flex-basis: 100%; }
table tr.dang th, table tr.dang td { background: #f2fbf7; font-weight: 700; }

/* Đồng ý điều khoản (#39) */
.dong-y { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; margin: 4px 0 12px; cursor: pointer; }
.dong-y input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.bao-dk { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff7df; border: 1px solid #f0d58a; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14.5px; }
.bao-dk a { font-weight: 700; }
/* Vận hành (#39): thẻ số liệu, biểu đồ cột theo giờ, bảng */
.vh-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.vh-the { background: var(--mat); border: 1px solid var(--vien); border-radius: 12px; padding: 10px 12px; }
.vh-the small { display: block; color: var(--mo); font-size: 12.5px; } .vh-the b { font-size: 18px; }
.vh-the.xau { border-color: var(--do); background: var(--do-nhat); }
.vh-cot { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin: 10px 0 4px; }
.vh-cot i { flex: 1; background: var(--xanh, #1d8a6f); border-radius: 2px 2px 0 0; min-width: 2px; opacity: .8; }
.vh-cot i.loi { background: var(--do); opacity: 1; }
.vh-bang td, .vh-bang th { white-space: nowrap; font-size: 13.5px; } .vh-bang code { font-size: 12.5px; }
a.chip { display: inline-flex; align-items: center; text-decoration: none; height: 32px; padding: 0 12px; font-size: 13px; }
.chip.on { background: var(--xanh-dam); color: #fff; border-color: var(--xanh-dam); }
/* Zalo (#40) */
.zl-cua { margin-top: 14px; }
.zl-hoac { display: flex; align-items: center; gap: 10px; color: var(--mo); font-size: 13px; margin: 6px 0 12px; }
.zl-hoac::before, .zl-hoac::after { content: ""; flex: 1; border-top: 1px solid var(--vien); }
.zl-cua .nut { width: 100%; justify-content: center; margin-bottom: 8px; display: flex; text-decoration: none; }
.nut.zl-nut { background: #0068ff; border-color: #0068ff; color: #fff; }
.zl-nut b, .zl-app b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #fff; color: #0068ff; font-weight: 900; margin-right: 6px; font-size: 14px; }
.zl-app b { background: #0068ff; color: #fff; }
.zl-ma { background: #f0f6ff; border: 1px solid #c9dcff; border-radius: 14px; padding: 14px; margin-top: 10px; text-align: center; }
.zl-so { font: 800 34px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; color: #0b3d91; margin: 4px 0 10px; user-select: all; }
/* Tài khoản GĐ2 */
.oi-nut b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; margin-right: 6px; font-weight: 900; font-size: 14px; color: #fff; }
.oi-nut b.gg { background: #4285f4; } .oi-nut b.ms { background: #2f2f2f; }
.moi-link { flex: 1; min-width: 200px; padding: 9px 12px; border-radius: 10px; background: #f3f6f5; border: 1px solid var(--vien); font-size: 13.5px; overflow-x: auto; white-space: nowrap; }
/* Phiếu đồng ý phụ huynh (GĐ2-5) */
select.dy-xanh { border-color: #138a48; color: #0c6b37; font-weight: 700; }
select.dy-vang { border-color: #e0a100; color: #7a5600; font-weight: 700; }
select.dy-do { border-color: var(--do); color: var(--do); font-weight: 700; }
/* Giai đoạn 3: nhiệm vụ, thi đua, học liệu */
.nv-bai .ten { display: block; }
.nv-chu { background: var(--mat); border: 1px solid var(--vien); border-radius: 10px; padding: 8px 10px; margin: 6px 0; white-space: normal; font-size: 14.5px; }
.nv-tep { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.nv-tep img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--vien); }
/* Bảng thi đua cả năm: cột tháng gọn, tên học sinh không xuống dòng */
.td-bang th, .td-bang td { min-width: 0; width: auto; padding: 6px 8px; text-align: center; }
.td-bang td:nth-child(2), .td-bang th:nth-child(2) { text-align: left; white-space: nowrap; min-width: 150px; }
