/* =====================================================================
   Animo ♥ — phong cách "Decor": ảnh nền đầu trang, chữ mảnh, góc vuông,
   tiêu đề mục căn giữa có đường kẻ, màu xanh xám nhạt.
   ===================================================================== */

/* ===== Màu: 5 bộ, đổi bằng data-theme trên <html> =====
   --c   : màu nền nút/khối có chữ trắng (đủ tương phản)
   --c-d : đậm hơn, dùng khi rê chuột
   --c-m : màu nhấn nhẹ (thanh tiến độ, đường kẻ, viền)
   --c-l : nền nhạt
   --c-t : chữ màu nhấn (nhãn nhỏ, liên kết)                         */
:root, [data-theme="decor"] { --c: #5F8479; --c-d: #44655B; --c-l: #EFF5F3; --c-m: #ACC7BF; --c-t: #6B9085; }
[data-theme="ngoc"]         { --c: #0F6E56; --c-d: #085041; --c-l: #E1F5EE; --c-m: #1D9E75; --c-t: #0F6E56; }
[data-theme="bien"]         { --c: #185FA5; --c-d: #0C447C; --c-l: #E6F1FB; --c-m: #378ADD; --c-t: #185FA5; }
[data-theme="am"]           { --c: #993C1D; --c-d: #712B13; --c-l: #FAECE7; --c-m: #D85A30; --c-t: #993C1D; }
[data-theme="hong"]         { --c: #993556; --c-d: #72243E; --c-l: #FBEAF0; --c-m: #D4537E; --c-t: #993556; }

:root {
  --nen: #FFFFFF; --nen-2: #F7F7F7; --the: #FFFFFF;
  --tieu: #242424; --chu: #333333; --phu: #767676; --vien: #EDEDED; --vien-d: #DDDDDD;
  --do: #A32D2D; --do-l: #FCEBEB; --luc: #3B6D11; --luc-l: #EAF3DE; --vang: #854F0B; --vang-l: #FAEEDA;
  --f-tieu: "Lexend", "Segoe UI", Arial, sans-serif;
  --f-than: "Mulish", "Segoe UI", Arial, sans-serif;
  --bk: 0px; font-size: 16px;
}
[data-co="nho"] { font-size: 15px; }
[data-co="lon"] { font-size: 18px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--nen); color: var(--chu); font-family: var(--f-than); line-height: 1.7; border-top: 3px solid var(--c-m); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-tieu); font-weight: 400; line-height: 1.25; margin: 0; color: var(--tieu); }
h1 { font-size: 1.8rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--chu); }
a:hover { color: var(--c-t); }
p { margin: 0; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }
.phu { color: var(--phu); font-size: .92rem; }
.nho { font-size: .85rem; }
.giua-chu { text-align: center; margin-bottom: 1rem; }
:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

/* ===== Nút: chữ in hoa, góc vuông ===== */
.nut { font: inherit; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #3E3E3E; background: #F3F3F3; border: 0; border-radius: 0; padding: .7rem 1.2rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; transition: background .2s, color .2s; }
.nut:hover { background: #E6E6E6; color: #3E3E3E; }
.nut-tran { background: transparent; color: var(--phu); }
.nut-tran:hover { background: transparent; color: var(--tieu); }
.nut-chinh { background: var(--c); color: #fff; }
.nut-chinh:hover { background: var(--c-d); color: #fff; }
.nut-rong { width: 100%; padding: .9rem; margin-top: 1.4rem; font-size: .82rem; }
.nut[aria-pressed="true"] { background: var(--c); color: #fff; }

/* ===== Đăng nhập: ảnh nền phủ tối, thẻ trắng góc vuông ===== */
.man-dang-nhap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url("/img/anh-nen.jpg") center / cover, var(--nen-hero); position: relative; }
.the-dang-nhap { width: min(420px, 100%); background: #fff; padding: 2.4rem 2rem; position: relative; }
.the-dang-nhap h1 { margin: .6rem 0 .3rem; font-weight: 300; font-size: 2rem; text-align: center; }
.the-dang-nhap .phu { text-align: center; }
.the-dang-nhap label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--tieu); margin: 1.1rem 0 .35rem; }
.the-dang-nhap input { width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid var(--vien-d); border-radius: 0; background: #fff; color: var(--chu); }
.the-dang-nhap input:focus { border-color: var(--c-m); outline: none; }
.logo-dn { width: 48px; height: 48px; margin: 0 auto; border: 1px solid var(--c-m); color: var(--c); display: grid; place-items: center; font-size: 1.2rem; border-radius: 50%; }
.dn-thu { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--vien); text-align: center; }
.dn-thu .hang-nut { margin-top: .5rem; }
.loi { color: var(--do); background: var(--do-l); padding: .6rem .8rem; margin-top: 1rem; font-size: .9rem; }

/* ===== Ảnh nền đầu trang (hero) ===== */
:root { --nen-hero:
  radial-gradient(ellipse at 22% 30%, rgba(172,199,191,.30), transparent 55%),
  radial-gradient(ellipse at 80% 75%, rgba(255,255,255,.10), transparent 50%),
  linear-gradient(135deg, #3d4a46 0%, #59665f 45%, #7b847d 100%); }
.hero { --anh-nen: url("/img/anh-nen.jpg"); position: relative; min-height: 340px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 110px 1.25rem 3rem; background: var(--nen-hero); background-size: cover; background-position: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--anh-nen); background-size: cover; background-position: center 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.hero.lon { min-height: 460px; }
.hero-noi { position: relative; z-index: 1; max-width: 900px; }
.hero h1 { color: #fff; font-weight: 300; font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.01em; line-height: 1.15; }
.hero h1, .hero-phu, .duong-dan, .dau:not(.dac) .nv-dong, .dau:not(.dac) .thuong-hieu, .dau:not(.dac) .dau-phai > .nut, .dau:not(.dac) .menu-nho > .nut { text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero-phu { margin-top: .9rem; font-size: 1.05rem; color: rgba(255,255,255,.88); }
.duong-dan { margin-top: .9rem; font-size: .9rem; color: rgba(255,255,255,.8); display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.duong-dan a { color: rgba(255,255,255,.8); text-decoration: none; }
.duong-dan a:hover { color: #fff; }
.duong-dan b { color: #fff; font-weight: 700; }

/* ===== Đầu trang: trong suốt trên ảnh nền, thành nền trắng khi cuộn ===== */
.dau { position: fixed; top: 3px; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: 0 2rem; height: 76px; background: transparent; transition: background .25s, box-shadow .25s, height .25s; }
.dau.dac { background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.08); height: 64px; top: 0; }
.thuong-hieu { display: flex; align-items: center; gap: .35rem; font-family: var(--f-tieu); font-weight: 400; font-size: 1.6rem; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.dau.dac .thuong-hieu { color: var(--tieu); }
.tim-nho { color: var(--c-m); font-size: 1.1rem; }
.nav-tren { display: flex; align-items: center; justify-content: center; gap: .1rem; flex: 1; }
.nv-muc { position: relative; }
.nv-dong { display: flex; align-items: center; gap: .3rem; padding: 0 .75rem; height: 44px; color: #fff; text-decoration: none; white-space: nowrap; font: inherit; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; background: none; border: 0; cursor: pointer; transition: opacity .2s, color .2s; }
.nv-dong:hover { color: #fff; opacity: .75; }
.nv-dong[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--c-m); }
.dau.dac .nv-dong { color: var(--tieu); }
.dau.dac .nv-dong:hover { color: var(--c-t); opacity: 1; }
.nv-con { display: none; position: absolute; top: 100%; left: .5rem; min-width: 200px; background: #fff; padding: .7rem 0; z-index: 35; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.nv-muc:hover .nv-con, .nv-muc:focus-within .nv-con { display: block; }
.nv-con a { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 1.2rem; color: var(--phu); text-decoration: none; font-size: .9rem; }
.nv-con a:hover, .nv-con a[aria-current="page"] { color: var(--tieu); background: var(--nen-2); }
body.sap-xep .nv-con { display: none !important; }
body.sap-xep .nv-muc[draggable="true"] { cursor: grab; outline: 1px dashed rgba(255,255,255,.6); }
body.sap-xep .dau.dac .nv-muc[draggable="true"] { outline-color: var(--vien-d); }
.nv-muc.dang-keo { opacity: .4; } .nv-muc.keo-vao { background: rgba(172,199,191,.35); }
.dem { background: var(--c-m); color: #fff; border-radius: 50%; font-size: .66rem; width: 17px; height: 17px; display: inline-grid; place-items: center; letter-spacing: 0; }
.dau.dac .dem { background: var(--c); }
.tay-keo { display: none; cursor: grab; user-select: none; letter-spacing: -2px; opacity: .7; }
body.sap-xep .tay-keo { display: inline-block; }
.dau-phai { display: flex; align-items: center; gap: .2rem; }
.dau-phai > .nut, .menu-nho > .nut { background: none; color: #fff; padding: .5rem .7rem; font-size: .75rem; }
.dau-phai > .nut:hover, .menu-nho > .nut:hover { opacity: .75; }
.dau.dac .dau-phai > .nut, .dau.dac .menu-nho > .nut { color: var(--tieu); }
.ten-nguoi { color: rgba(255,255,255,.85); font-size: .78rem; font-weight: 700; text-transform: uppercase; padding: 0 .4rem; }
.dau.dac .ten-nguoi { color: var(--phu); }
.menu-nho { position: relative; }
.bang { position: absolute; right: 0; top: calc(100% + 10px); width: 320px; background: #fff; padding: 1.2rem; z-index: 40; box-shadow: 0 8px 30px rgba(0,0,0,.14); color: var(--chu); }
.bang h3 { font-family: var(--f-than); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tieu); margin: 1rem 0 .55rem; }
.bang h3:first-child { margin-top: 0; }
.mau-luoi { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.mau-o { border: 1px solid transparent; background: none; padding: .4rem .1rem; cursor: pointer; font: inherit; font-size: .7rem; color: var(--phu); display: grid; justify-items: center; gap: .3rem; }
.mau-o i { width: 28px; height: 28px; border-radius: 50%; display: block; }
.mau-o[aria-pressed="true"] { border-color: var(--tieu); color: var(--tieu); }
.hang-nut { display: flex; gap: .4rem; }
.hang-nut .nut { flex: 1; padding: .55rem .3rem; }

/* ===== Thân trang ===== */
.khung { max-width: 1222px; margin: 0 auto; padding: 4rem 1.5rem 1rem; }
.noi-dung { min-width: 0; outline: none; }
.chan { border-top: 1px solid var(--vien); max-width: none; margin: 3rem 0 0; padding: 1.6rem 2rem 5.5rem; display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; color: var(--phu); font-size: .85rem; text-align: center; }
.chan-ten { font-family: var(--f-tieu); color: var(--tieu); }
.chan .nut { padding: .3rem .6rem; font-size: .72rem; }

/* ===== Tiêu đề mục: nhãn nhỏ màu nhấn + tiêu đề in hoa có đường kẻ ===== */
.khoi { margin-bottom: 4.5rem; position: relative; }
.dau-muc { text-align: center; margin-bottom: 2rem; }
.dm-phu { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-t); margin-bottom: .35rem; }
.dm-tieu { display: flex; align-items: center; gap: 1.4rem; font-family: var(--f-tieu); font-weight: 500; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .01em; color: var(--tieu); }
.dm-tieu::before, .dm-tieu::after { content: ""; flex: 1; border-top: 1px solid var(--vien); }
.dm-mota { color: var(--phu); margin: .6rem auto 0; max-width: 680px; }
.xem-het-duoi { text-align: center; margin-top: 1.6rem; }
.xem-het-duoi a { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-t); text-decoration: none; border-bottom: 1px solid var(--c-m); padding-bottom: 2px; }
.xem-het-duoi a:hover { color: var(--tieu); border-color: var(--tieu); }
.khoi-cc { display: none; gap: .25rem; position: absolute; right: 0; top: -2.3rem; }
body.sap-xep .khoi-cc { display: flex; }
body.sap-xep .khoi { outline: 1px dashed var(--vien-d); outline-offset: 12px; }
.khoi.dang-keo { opacity: .4; }
.khoi.keo-vao { outline: 2px solid var(--c-m) !important; }
.khoi.da-an { opacity: .45; }
.nut-nho { font: inherit; font-size: .72rem; font-weight: 700; text-transform: uppercase; border: 1px solid var(--vien-d); background: #fff; padding: .2rem .55rem; cursor: pointer; color: var(--chu); }
.nut-nho:hover { border-color: var(--tieu); }
.bao-sap-xep { text-align: center; color: var(--c-t); margin-bottom: 3rem; }

/* ===== Thẻ ===== */
.luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.luoi-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.the { background: #fff; border: 1px solid var(--vien); padding: 1.3rem 1.4rem; text-align: left; font: inherit; color: inherit; width: 100%; transition: box-shadow .25s, border-color .25s; }
button.the { cursor: pointer; }
button.the:hover, a.the:hover { box-shadow: 0 8px 26px rgba(0,0,0,.08); border-color: transparent; }
a.the { display: block; text-decoration: none; color: inherit; }
.the .tieu { font-family: var(--f-tieu); font-weight: 400; font-size: 1.08rem; color: var(--tieu); margin: .55rem 0 .25rem; }
.nhan { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .55rem; background: var(--c-l); color: var(--c-d); white-space: nowrap; }
.nhan.do { background: var(--do-l); color: var(--do); } .nhan.luc { background: var(--luc-l); color: var(--luc); } .nhan.vang { background: var(--vang-l); color: var(--vang); }
.moi { background: var(--c); color: #fff; }

.chip-hang { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; align-items: center; }
.chip-hang.giua { justify-content: center; }
.vach { width: 1px; height: 22px; background: var(--vien-d); margin: 0 .4rem; }
.chip { font: inherit; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .5rem .95rem; border: 1px solid var(--vien-d); background: #fff; color: var(--chu); cursor: pointer; text-decoration: none; transition: all .2s; }
.chip:hover { border-color: var(--tieu); color: var(--tieu); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--tieu); color: #fff; border-color: var(--tieu); }
.o-tim, select { font: inherit; font-size: .92rem; padding: .55rem .85rem; border: 1px solid var(--vien-d); border-radius: 0; background: #fff; color: var(--chu); }
.o-tim { min-width: min(340px, 100%); }
.o-tim:focus, select:focus { border-color: var(--c-m); outline: none; }

/* ===== Tiến độ & số ===== */
.tien-do { height: 6px; background: var(--vien); position: relative; margin: .55rem 0 .3rem; }
.tien-do > span { display: block; height: 100%; background: var(--c-m); }
.tien-do > i { position: absolute; top: -5px; width: 2px; height: 16px; background: var(--tieu); opacity: .6; }
.so-luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.so { background: var(--nen-2); padding: 1.6rem 1.4rem; text-align: center; }
.so .nn { color: var(--phu); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.so .lon { font-family: var(--f-tieu); font-size: 2.4rem; font-weight: 300; line-height: 1.3; color: var(--tieu); margin: .2rem 0; }
.tang { color: var(--luc); font-size: .85rem; } .giam { color: var(--do); font-size: .85rem; }
table.bang-so { width: 100%; border-collapse: collapse; font-size: .95rem; }
.bang-so th { text-align: right; font-weight: 700; color: var(--tieu); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; padding: .7rem .6rem; border-bottom: 2px solid var(--vien); }
.bang-so td { text-align: right; padding: .85rem .6rem; border-bottom: 1px solid var(--vien); }
.bang-so th:first-child, .bang-so td:first-child { text-align: left; }
.bang-so td a { text-decoration: none; color: var(--tieu); font-weight: 700; }
.bang-so tr.tong td { font-weight: 700; color: var(--tieu); border-bottom: 0; background: var(--nen-2); }
.cot-xh { display: flex; gap: 1rem; align-items: flex-end; height: 180px; padding-top: .5rem; max-width: 760px; margin: 0 auto; }
.cot-xh .th { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .75rem; font-weight: 700; color: var(--phu); }
.cot-xh .hai { display: flex; gap: 4px; align-items: flex-end; height: 140px; margin-bottom: .4rem; }
.cot-xh .hai b { width: 18px; display: block; background: var(--c-m); }
.cot-xh .hai b.hh { background: var(--c); }
.chu-giai { display: flex; gap: 1.4rem; justify-content: center; font-size: .8rem; color: var(--phu); margin-top: 1rem; }
.chu-giai i { display: inline-block; width: 11px; height: 11px; background: var(--c-m); margin-right: .35rem; vertical-align: -1px; }
.chu-giai i.hh { background: var(--c); }
.hang-mt { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 10rem; gap: 1rem; align-items: center; padding: .9rem 0; border-top: 1px solid var(--vien); text-decoration: none; color: inherit; }
.hang-mt:first-of-type { border-top: 0; }
.hang-mt > span:first-child { font-weight: 700; color: var(--tieu); }
.hang-mt .pt { text-align: right; font-family: var(--f-tieu); font-size: 1.1rem; color: var(--tieu); }
.hang-mt .pt .nhan { font-family: var(--f-than); vertical-align: 2px; }
a.hang-mt:hover > span:first-child { color: var(--c-t); }
.ghi-chu { background: var(--c-l); color: var(--c-d); padding: 1rem 1.2rem; margin-top: 1.2rem; }
.trong { text-align: center; color: var(--phu); padding: 2.2rem 1rem; }

/* ===== Video TP ===== */
.vd-luoi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
.vd-luoi.bon { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.vd-luoi.bon figcaption { font-size: .95rem; }
.vd { margin: 0; }
.vd-khung { aspect-ratio: 16 / 9; overflow: hidden; background: #2a2a2a; position: relative; }
.vd-khung iframe { width: 100%; height: 100%; border: 0; display: block; }
.vd-nut { width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #2a2a2a center / cover no-repeat; display: grid; place-items: center; transition: transform .5s; }
.vd-nut:hover { transform: scale(1.04); }
.vd-play { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--tieu); display: grid; place-items: center; font-size: 1rem; padding-left: 4px; transition: background .2s, color .2s; }
.vd-nut:hover .vd-play, .vd-nut:focus-visible .vd-play { background: var(--c); color: #fff; }
.vd-trong { height: 100%; display: grid; place-items: center; color: #aaa; font-size: .9rem; text-align: center; padding: 1rem; background: var(--nen-2); }
.vd figcaption { margin-top: .8rem; font-family: var(--f-tieu); font-size: 1.05rem; color: var(--tieu); text-align: center; }

/* ===== Trudo: ban ngành ===== */
.ban-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.2rem; }
.ban-the { background: #fff; border: 1px solid var(--vien); padding: 2.2rem 1rem 1.8rem; text-align: center; text-decoration: none; color: inherit; display: block; transition: box-shadow .25s, border-color .25s; }
.ban-the:hover { box-shadow: 0 8px 26px rgba(0,0,0,.08); border-color: transparent; color: inherit; }
.ban-ky { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--c-m); color: var(--c-t); display: grid; place-items: center; margin: 0 auto 1rem; font-family: var(--f-tieu); font-size: 1.1rem; transition: all .25s; }
.ban-the:hover .ban-ky { background: var(--c-m); color: #fff; border-color: var(--c-m); }
.ban-the .tieu { font-family: var(--f-tieu); font-size: 1.15rem; color: var(--tieu); }
.ban-the .nhan { margin-top: .5rem; }

/* ===== Hộp xem tài liệu ===== */
dialog { border: 0; border-radius: 0; padding: 0; width: min(980px, 96vw); max-height: 94vh; background: #fff; color: var(--chu); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.hop-dau { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--vien); }
.hop-dau h2 { flex: 1; font-size: 1.15rem; }
#hop-than { padding: 1.2rem 1.4rem 1.4rem; overflow: auto; max-height: calc(94vh - 64px); }
.khung-xem { background: #000; aspect-ratio: 16 / 9; }
.khung-xem.cao { aspect-ratio: auto; height: min(72vh, 640px); background: #fff; border: 1px solid var(--vien); }
.khung-xem iframe { width: 100%; height: 100%; border: 0; display: block; }
.thanh-xem { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; align-items: center; }
.thanh-xem .gian { flex: 1; }

/* ===== Chatbot: Thiên sứ hỗ trợ ===== */
.ts-icon { width: 24px; height: 24px; display: block; }
.chat-nut { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: .55rem; padding: .6rem 1.2rem .6rem .75rem; border-radius: 35px; border: 0; background: #1C1C1C; color: #fff; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: background .2s; }
.chat-nut .ts-icon { color: var(--c-m); }
.chat-nut:hover { background: #000; }
.chat-nut[aria-expanded="true"] { display: none; }
.chat { position: fixed; right: 24px; bottom: 24px; z-index: 45; width: 390px; height: min(620px, calc(100vh - 48px)); background: #fff; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,.2); }
.chat-dau { display: flex; align-items: center; gap: .65rem; padding: .9rem .9rem .9rem 1.1rem; background: #1C1C1C; color: #fff; }
.chat-dau .nut-tran { color: rgba(255,255,255,.8); font-size: .68rem; padding: .35rem .5rem; }
.chat-dau .nut-tran:hover { color: #fff; }
.chat-avt { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--c-m); color: var(--c-m); display: grid; place-items: center; flex: none; }
.chat-ten { flex: 1; line-height: 1.35; } .chat-ten b { font-family: var(--f-tieu); font-weight: 400; font-size: 1.05rem; display: block; } .chat-ten span { font-size: .75rem; opacity: .8; }
.cham-xanh { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c-m); margin-right: .35rem; vertical-align: 1px; }
.chat-tin { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--nen-2); }
.tin { max-width: 86%; padding: .65rem .9rem; font-size: .92rem; line-height: 1.6; }
.tin.bot { background: #fff; border: 1px solid var(--vien); align-self: flex-start; }
.tin.ban { background: var(--c); color: #fff; align-self: flex-end; }
.tin a { color: var(--c-t); font-weight: 700; }
.tin ul { margin: .35rem 0 0; padding-left: 1.1rem; } .tin li { margin: .2rem 0; }
.dang-go span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--phu); margin: 0 2px; animation: nhay 1s infinite; }
.dang-go span:nth-child(2) { animation-delay: .15s; } .dang-go span:nth-child(3) { animation-delay: .3s; }
@keyframes nhay { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.chat-goi-y { display: flex; gap: .35rem; flex-wrap: wrap; padding: .6rem .9rem 0; }
.chat-goi-y .chip { font-size: .66rem; padding: .3rem .6rem; }
.chat-form { display: flex; gap: .4rem; padding: .7rem .9rem .35rem; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: .92rem; padding: .6rem .8rem; border: 1px solid var(--vien-d); border-radius: 0; background: #fff; color: var(--chu); }
.chat-form input:focus { border-color: var(--c-m); outline: none; }
.chat-chu { font-size: .7rem; color: var(--phu); text-align: center; padding: 0 0 .6rem; }

.bao { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: .4rem; z-index: 60; pointer-events: none; }
.bao div { background: #1C1C1C; color: #fff; padding: .65rem 1.1rem; font-size: .88rem; }

/* ===== Màn nhỏ ===== */
@media (max-width: 1100px) {
  .dau { flex-wrap: wrap; height: auto; padding: .7rem 1rem .2rem; row-gap: 0; }
  .dau.dac { height: auto; }
  .nav-tren { order: 3; flex: 0 0 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -.5rem; }
  .nav-tren::-webkit-scrollbar { display: none; }
  .nv-con { display: none !important; }
  .dau-phai { margin-left: auto; }
  .hero { padding-top: 140px; }
}
@media (max-width: 880px) {
  .khung { padding: 3rem 1rem 1rem; }
  .ten-nguoi { display: none; }
  .hang-mt { grid-template-columns: 1fr; gap: .2rem; } .hang-mt .pt { text-align: left; }
  .vd-luoi { grid-template-columns: 1fr; }
  .vd-luoi.bon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-tieu { gap: .8rem; font-size: 1.1rem; }
  .hero, .hero.lon { min-height: 300px; }
  .khoi-cc { position: static; justify-content: center; margin-bottom: .8rem; }
  .bang-so { font-size: .85rem; } .bang-so th, .bang-so td { padding: .6rem .3rem; }
}
@media (max-width: 520px) {
  .thuong-hieu { font-size: 1.35rem; }
  .chat { right: 0; bottom: 0; width: 100%; height: 88vh; }
  .chat-nut span { display: none; } .chat-nut { padding: .75rem; }
  .luoi-2 { grid-template-columns: 1fr; }
  .ban-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .ban-the { padding: 1.4rem .6rem 1.2rem; }
  .ban-ky { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .dau, .chan, .chat, .chat-nut, .hero { display: none; } }

/* =====================================================================
   Bố cục chung (đặt bằng wireframe): lưới 12 cột, đầu trang, ảnh nền, nút chat
   ===================================================================== */
.luoi-khoi { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 3rem; }
.luoi-khoi > .khoi { grid-column: span var(--span, 12); container-type: inline-size; min-width: 0; }
@container (max-width: 760px) { .vd-luoi.bon { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 440px) {
  .vd-luoi, .vd-luoi.bon { grid-template-columns: 1fr; }
  .so-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .so .lon { font-size: 1.8rem; }
  .hang-mt { grid-template-columns: 1fr; gap: .2rem; } .hang-mt .pt { text-align: left; }
  .ban-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.hero-vua .hero.lon { min-height: 340px; }
body.hero-vua .hero { min-height: 290px; }
body.hero-thap .hero, body.hero-thap .hero.lon { min-height: 230px; padding-bottom: 1.6rem; }
body.hero-thap .hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
body.hero-an .hero { display: none; }
body.hero-an .khung { padding-top: 120px; }
body.chat-trai .chat-nut, body.chat-trai .chat { right: auto; left: 24px; }
body.menu-trai .nav-tren { justify-content: flex-start; }
body.menu-phai .nav-tren { justify-content: flex-end; }
@media (min-width: 1101px) {
  body.logo-giua .dau, body.logo-giua .dau.dac { flex-wrap: wrap; height: auto; padding-top: .8rem; }
  body.logo-giua .thuong-hieu { flex: 0 0 100%; justify-content: center; font-size: 2rem; }
  body.logo-giua .dau-phai { position: absolute; right: 2rem; top: 1rem; }
  body.logo-giua .nav-tren { flex: 0 0 100%; margin-left: 0; }
  body.logo-giua .hero { padding-top: 160px; }
  body.logo-giua.hero-an .khung { padding-top: 170px; }
}
@media (max-width: 880px) { .luoi-khoi > .khoi { grid-column: span 12; } }
@media (max-width: 520px) { body.chat-trai .chat { left: 0; } }

/* ===== Trình wireframe ===== */
.wf-thanh { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.2rem; }
.wf-thanh .wf-nhom-nut { margin-right: auto; }
.wf-trang-thai { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--luc); }
.wf-trang-thai.doi { color: var(--vang); }
.nut:disabled { opacity: .45; cursor: default; }
.wf-nhom-nut { display: flex; flex-wrap: wrap; gap: 0; }
.wf-nhom-nut .nut { padding: .55rem .8rem; border: 1px solid var(--vien-d); margin-left: -1px; background: #fff; }
.wf-nhom-nut .nut:first-child { margin-left: 0; }
.wf-nhom-nut .nut[aria-pressed="true"] { background: var(--tieu); color: #fff; border-color: var(--tieu); position: relative; }
.wf-vung { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1.5rem; align-items: start; }
.wf-khung-ngoai { background: #ECECEA; padding: 1.4rem; overflow: hidden; }
.wf-trang { background: #fff; position: relative; padding-bottom: 3.6rem; user-select: none; box-shadow: 0 2px 14px rgba(0,0,0,.06); margin: 0 auto; transition: width .25s; }
.wf-trang.dt { width: 390px; max-width: 100%; }
.wf-trang [tabindex]:focus-visible { outline: 2px solid var(--c); outline-offset: -2px; }
.wf-dau { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-bottom: 1px dashed #C9C9C9; cursor: pointer; }
.wf-logo { font-family: var(--f-tieu); font-size: 1rem; color: var(--tieu); white-space: nowrap; }
.wf-menu { display: flex; gap: .35rem; flex: 1; flex-wrap: wrap; justify-content: center; }
.wf-menu i { font-style: normal; font-size: .62rem; font-weight: 700; text-transform: uppercase; color: #8a8a8a; background: #F2F2F2; padding: .15rem .4rem; white-space: nowrap; }
.wf-phai { display: flex; gap: .3rem; } .wf-phai i { width: 26px; height: 9px; background: #E2E2E2; display: block; }
.wf-dau.menu-trai .wf-menu { justify-content: flex-start; } .wf-dau.menu-phai .wf-menu { justify-content: flex-end; }
.wf-dau.logo-giua { flex-wrap: wrap; position: relative; }
.wf-dau.logo-giua .wf-logo { flex: 0 0 100%; text-align: center; font-size: 1.15rem; }
.wf-dau.logo-giua .wf-phai { position: absolute; right: .9rem; top: .9rem; }
.wf-hero { background: repeating-linear-gradient(135deg, #E9E9E7 0 10px, #E1E1DF 10px 20px); display: grid; place-content: center; text-align: center; gap: .2rem; color: #6b6b6b; cursor: pointer; }
.wf-hero b { font-family: var(--f-tieu); font-weight: 400; font-size: 1.05rem; color: #555; }
.wf-hero small { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.wf-hero.h-lon { height: 150px; } .wf-hero.h-vua { height: 112px; } .wf-hero.h-thap { height: 74px; }
.wf-hero-an { border: 1px dashed #C9C9C9; margin: .6rem; padding: .35rem; text-align: center; font-size: .75rem; color: #8a8a8a; cursor: pointer; }
.wf-luoi { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; padding: 1rem; }
.wf-khoi { grid-column: span var(--span, 12); position: relative; border: 1px dashed #BDBDBD; background: #FAFAFA; padding: .55rem .65rem .7rem; cursor: grab; transition: box-shadow .15s, opacity .15s; min-width: 0; }
.wf-khoi:hover { border-color: #8f8f8f; }
.wf-khoi.chon, .wf-dau.chon, .wf-hero.chon, .wf-hero-an.chon, .wf-chat.chon { outline: 2px solid var(--c); outline-offset: -2px; }
.wf-khoi.an { opacity: .5; background: repeating-linear-gradient(135deg, #FAFAFA 0 8px, #F1F1F1 8px 16px); }
.wf-k-dau { display: flex; align-items: center; gap: .4rem; margin-bottom: .45rem; min-width: 0; }
.wf-k-dau b { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--tieu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-tay { color: #9a9a9a; cursor: grab; touch-action: none; padding: 0 .1rem; font-size: 1rem; line-height: 1; }
.wf-co { margin-left: auto; font-size: .64rem; font-weight: 700; color: var(--c-t); background: var(--c-l); padding: 0 .35rem; white-space: nowrap; }
.wf-an { font-size: .62rem; font-weight: 700; color: var(--vang); white-space: nowrap; }
.wf-keo-rong { position: absolute; top: 0; right: -7px; width: 14px; height: 100%; cursor: ew-resize; touch-action: none; display: grid; place-items: center; z-index: 2; }
.wf-keo-rong::after { content: ""; width: 4px; height: 34px; border-radius: 3px; background: #B5B5B5; }
.wf-khoi:hover .wf-keo-rong::after, body.wf-dang-rong .wf-keo-rong::after { background: var(--c); }
body.wf-dang-rong, body.wf-dang-rong * { cursor: ew-resize !important; }
body.wf-dang-keo-chuot, body.wf-dang-keo-chuot * { cursor: grabbing !important; }
.wf-khoi.wf-dang-keo { opacity: .3; }
.wf-khoi.wf-vao-truoc.ngang { box-shadow: -6px 0 0 -1px var(--c); }
.wf-khoi.wf-vao-sau.ngang { box-shadow: 6px 0 0 -1px var(--c); }
.wf-khoi.wf-vao-truoc.doc { box-shadow: 0 -6px 0 -1px var(--c); }
.wf-khoi.wf-vao-sau.doc { box-shadow: 0 6px 0 -1px var(--c); }
.wf-bong { position: fixed; z-index: 100; pointer-events: none; opacity: .9; box-shadow: 0 12px 30px rgba(0,0,0,.18); background: #fff; transform: rotate(1deg); }
.sk { display: block; background: #E6E6E6; font-style: normal; }
.sk-luoi { display: grid; gap: 6px; }
.sk-luoi.bon { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sk-luoi.hai { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-luoi.nam { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sk.vd { aspect-ratio: 16 / 9; } .sk.the { height: 46px; } .sk.so { height: 30px; }
.sk.tron { aspect-ratio: 1; border-radius: 50%; max-width: 34px; justify-self: center; width: 100%; }
.sk-dong { display: grid; gap: 7px; } .sk.thanh { height: 7px; }
.wf-trang.dt .sk-luoi.bon, .wf-khoi[style*="--span:4"] .sk-luoi.bon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wf-khoi[style*="--span:4"] .sk-luoi.hai { grid-template-columns: 1fr; }
.wf-chan { margin: 0 1rem; border-top: 1px dashed #C9C9C9; padding: .5rem; text-align: center; font-size: .7rem; color: #9a9a9a; text-transform: uppercase; }
.wf-chat { position: absolute; bottom: .7rem; right: .8rem; background: #1C1C1C; color: #fff; font-size: .65rem; font-weight: 700; padding: .3rem .7rem; border-radius: 20px; cursor: pointer; }
.wf-chat.trai { right: auto; left: .8rem; }
.wf-bang { background: #fff; border: 1px solid var(--vien); padding: 1.1rem 1.2rem; position: sticky; top: 84px; }
.wf-bang h3 { font-family: var(--f-than); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 1.3rem 0 .6rem; padding-top: 1rem; border-top: 1px solid var(--vien); }
.wf-bang h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.wf-bang h3.sang { color: var(--c-t); }
.wf-bang label { display: block; font-size: .78rem; color: var(--phu); margin: .7rem 0 .3rem; }
.wf-ten-chon { font-family: var(--f-tieu); color: var(--tieu); }
.wf-goi-y { color: var(--phu); font-size: .85rem; margin-top: 1rem; text-align: center; }
@media (max-width: 1000px) {
  .wf-vung { grid-template-columns: 1fr; }
  .wf-bang { position: static; }
  .wf-khung-ngoai { padding: .6rem; }
}
