/* BKACAD – danh mục đào tạo. Ngôn ngữ thiết kế: kim cương cắt giác, ánh đỏ hồng ngọc và xanh ngọc lục bảo trên nền trắng sáng. */
:root {
  --ruby: #B5122F; --ruby-2: #E0233F; --ruby-deep: #7A0C22; --ruby-soft: #FDECEF;
  --emerald: #0E9F6E; --emerald-2: #19C27F; --emerald-deep: #06603F; --emerald-soft: #E3F8EE;
  --ink: #1B2333; --ink-2: #4A556B; --ink-3: #7B869B;
  --line: #E3E8F0; --paper: #F6F8FB; --white: #fff; --amber: #B26A00; --amber-soft: #FFF4DF;
  --r-sm: 6px; --r: 10px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(27,35,51,.06), 0 8px 24px -12px rgba(27,35,51,.18);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--ink); background: var(--paper);
  background-image: linear-gradient(118deg, rgba(181,18,47,.035) 0 22%, transparent 22% 100%), linear-gradient(242deg, rgba(14,159,110,.04) 0 18%, transparent 18% 100%);
  background-attachment: fixed; min-height: 100vh; }
a { color: var(--ruby); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid rgba(14,159,110,.55); outline-offset: 2px; border-radius: 4px; }
.ico { vertical-align: -3px; flex: none; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- thanh trên ---- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { height: 35px; width: auto; }
.brand .bt { line-height: 1.1; }
.brand .bt small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-3); letter-spacing: 0; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--ink-2); padding: 7px 11px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--paper); text-decoration: none; color: var(--ink); }
.nav a.on { color: var(--ruby); background: var(--ruby-soft); }
.top .qs { flex: 1; max-width: 360px; margin-left: auto; position: relative; }
.top .qs input { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; font-size: 14px; }
.top .qs .ico { position: absolute; left: 11px; top: 10px; color: var(--ink-3); }
.cartbtn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--emerald-soft); color: var(--emerald-deep); font-weight: 700; font-size: 14px; white-space: nowrap; }
.cartbtn b { background: var(--emerald); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; min-width: 22px; text-align: center; }
.cartbtn:hover { text-decoration: none; background: #CDF2DF; }
.cartbtn.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.usermenu { position: relative; }
.usermenu > button { display: flex; align-items: center; gap: 6px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; padding: 6px 8px; border-radius: var(--r-sm); }
.usermenu > button:hover { background: var(--paper); }
.dropdown { position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 230px; padding: 6px; display: none; }
.usermenu.open .dropdown { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--paper); text-decoration: none; }
.dropdown .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; color: var(--ink-3); }
.dropdown .who b { display: block; color: var(--ink); font-size: 14px; }
.burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 26px 20px 80px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-2); }
.crumbs .ico { width: 12px; height: 12px; }

/* ---- nút & ô nhập ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: #C9D2DF; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ruby); border-color: var(--ruby); color: #fff; }
.btn.primary:hover { background: var(--ruby-deep); }
.btn.green { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.btn.green:hover { background: var(--emerald-deep); }
.btn.picked { background: var(--emerald-soft); border-color: #A9E6C9; color: var(--emerald-deep); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(27,35,51,.05); }
.btn.danger { color: var(--ruby); border-color: #F3C4CD; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 12px 20px; font-size: 15px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
label.f > span { display: block; margin-bottom: 5px; }
input[type=text], input[type=password], input[type=search], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; font-size: 14px; color: var(--ink); background: #fff; font-weight: 400; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(14,159,110,.15); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--emerald); }

/* ---- nhãn ---- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.hot { background: linear-gradient(135deg, #FFE1E6, #FFF); color: var(--ruby); border-color: #F7C3CC; }
.tag.cert { background: var(--emerald-soft); color: var(--emerald-deep); border-color: #BDEBD5; }
.tag.warn { background: var(--amber-soft); color: var(--amber); border-color: #F6DDAE; }
.tag.st-draft { background: #EEF1F6; } .tag.st-active { background: var(--emerald-soft); color: var(--emerald-deep); border-color: #BDEBD5; }
.tag.st-sunset { background: var(--amber-soft); color: var(--amber); border-color: #F6DDAE; } .tag.st-replaced, .tag.st-archived { background: #F1F2F5; color: var(--ink-3); }
.code { font-weight: 600; font-size: 12.5px; color: var(--ink-3); letter-spacing: .01em; }

/* ---- trang chủ ---- */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 30px; align-items: center; padding: 18px 0 30px; }
.hero h1 { font-size: 44px; line-height: 1.08; margin-bottom: 14px; max-width: 14ch; }
.hero p.lead { font-size: 17px; color: var(--ink-2); max-width: 48ch; margin-bottom: 22px; }
.bigsearch { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); max-width: 560px; }
.bigsearch input { border: 0; font-size: 16px; padding: 10px 12px; }
.bigsearch input:focus { box-shadow: none; }
.hero-stat { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.hero-stat b { color: var(--ink); }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.domains { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.domain { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); position: relative; transition: border-color .15s, transform .15s; min-height: 156px; }
.domain:hover { text-decoration: none; border-color: #F0B7C1; transform: translateY(-2px); }
.domain .gem { margin-left: -4px; }
.domain b { font-size: 15px; line-height: 1.3; }
.domain .n { font-size: 13px; color: var(--ink-3); margin-top: auto; }
.domain.first { grid-column: span 2; background: linear-gradient(140deg, #fff 55%, #FFF0F2); border-color: #F3CAD1; }
.domain.first p { font-size: 13.5px; color: var(--ink-2); margin: 0; max-width: 40ch; }
.domain.empty { opacity: .62; }

/* ---- danh sách khóa ---- */
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 26px; align-items: start; }
.side { position: sticky; top: 76px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; max-height: calc(100vh - 96px); overflow: auto; }
.tree a { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--r-sm); color: var(--ink); font-size: 14px; line-height: 1.35; }
.tree a:hover { background: var(--paper); text-decoration: none; }
.tree a.on { background: var(--ruby-soft); color: var(--ruby-deep); font-weight: 700; }
.tree a .c { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.tree .l1 { font-weight: 600; }
.tree .kids { margin: 0 0 6px 30px; border-left: 1px solid var(--line); padding-left: 6px; }
.tree .kids a { font-size: 13.5px; padding: 5px 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; align-items: center; }
.filters select { width: auto; padding: 6px 10px; font-size: 13.5px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.list { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: center; }
.row:first-child { border-top: 0; }
.row:hover { background: #FBFCFE; }
.row .t { font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.4; }
.row .t:hover { color: var(--ruby); }
.row .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 5px; font-size: 13px; color: var(--ink-3); align-items: center; }
.row .sum { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.group-title { padding: 10px 18px; background: var(--paper); font-weight: 700; font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--line); display: flex; justify-content: space-between; }
.group-title:first-child { border-top: 0; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.empty-state .gem { margin-bottom: 10px; opacity: .85; }

/* ---- trang khóa học ---- */
.course { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.course-head { margin-bottom: 18px; }
.course-head h1 { font-size: 32px; max-width: 26ch; }
.course .body { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; }
.course .body h3 { margin-top: 22px; color: var(--ruby-deep); }
.course .body h3:first-child { margin-top: 0; }
.course .body ul { padding-left: 20px; margin: 0 0 10px; }
.course .body li { margin-bottom: 4px; }
.outline { counter-reset: m; list-style: none; padding: 0 !important; }
.outline > li { counter-increment: m; padding: 10px 0 10px 44px; border-top: 1px dashed var(--line); position: relative; }
.outline > li:first-child { border-top: 0; }
.outline > li::before { content: counter(m); position: absolute; left: 0; top: 9px; width: 30px; height: 30px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--emerald-soft); color: var(--emerald-deep); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.facts { position: sticky; top: 76px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.facts dl { display: grid; grid-template-columns: 110px 1fr; gap: 9px 10px; margin: 0 0 18px; font-size: 14px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; }
.facts .btn { width: 100%; justify-content: center; }
.notice { padding: 12px 14px; border-radius: var(--r); background: var(--amber-soft); color: #6B4300; font-size: 14px; margin-bottom: 14px; border: 1px solid #F6DDAE; }
.notice.info { background: #EEF6FF; color: #1F4E7A; border-color: #CFE3F7; }
.notice.ok { background: var(--emerald-soft); color: var(--emerald-deep); border-color: #BDEBD5; }

/* ---- bộ khóa ---- */
.bundles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bundle { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.bundle h3 { margin: 0; }
.bundle ol { margin: 4px 0 6px; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
.bundle .btns { margin-top: auto; }

/* ---- bảng ---- */
.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FAFBFD; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: #FBFCFE; }
.tblwrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.kpi b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi span { font-size: 13px; color: var(--ink-3); }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 150px; padding-top: 10px; }
.bars div { background: linear-gradient(180deg, var(--ruby-2), var(--ruby)); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.bars-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 4px; }
.hbar { display: grid; grid-template-columns: 1fr 60px; gap: 8px; align-items: center; font-size: 13.5px; margin-bottom: 6px; }
.hbar i { display: block; height: 8px; border-radius: 4px; background: var(--emerald); margin-top: 3px; }

/* ---- admin ---- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.admin-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.admin-nav a:hover { background: #fff; text-decoration: none; }
.admin-nav a.on { background: #fff; color: var(--ruby); box-shadow: inset 3px 0 0 var(--ruby); }
.admin-nav .sep { height: 1px; background: var(--line); margin: 6px 0; }
.admin-nav .badge { background: var(--ruby); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 300px; }
.toolbar select { width: auto; }
.atree .n { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); margin-bottom: 6px; }
.atree .n.l2 { margin-left: 34px; }
.atree .n.hidden-node { opacity: .6; border-style: dashed; }
.atree .n .nm { font-weight: 600; flex: 1; }
.atree .n .cd { font-size: 12.5px; color: var(--ink-3); min-width: 64px; font-weight: 600; }
.atree .n.dragging { opacity: .4; }
.atree .n.over { box-shadow: 0 0 0 2px var(--emerald); }
.atree .handle { cursor: grab; color: var(--ink-3); }
.review { white-space: pre-line; font-size: 12.5px; color: var(--amber); }
.diffbox { font-size: 13px; background: var(--paper); border-radius: var(--r-sm); padding: 10px; max-height: 200px; overflow: auto; }
.mod-outline .om { display: flex; gap: 6px; margin-bottom: 6px; }

/* ---- hộp thoại ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(27,35,51,.45); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: var(--r-lg); width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); }
.modal.wide { width: min(1000px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal header h2 { margin: 0; font-size: 19px; }
.modal .mb { padding: 20px 22px; }
.modal footer { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: #fff; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 90; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--ruby-deep); }

/* ---- đăng nhập ---- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: linear-gradient(150deg, #fff 0%, #FFF2F4 45%, #E9FBF2 100%); display: flex; flex-direction: column; justify-content: center; padding: 60px; position: relative; overflow: hidden; }
.login .art h1 { font-size: 40px; max-width: 13ch; line-height: 1.1; }
.login .art p { color: var(--ink-2); max-width: 42ch; font-size: 16px; }
.login .art .gems { display: flex; gap: 6px; margin-bottom: 26px; }
.login .form { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login form { width: min(380px, 100%); }
.login form h2 { margin-bottom: 4px; }

/* ---- hướng dẫn ---- */
.guide { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.guide .gnav a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.guide .gnav a.on { background: #fff; color: var(--ruby); }
.guide article { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 30px; max-width: 820px; }
.guide article ol.steps { counter-reset: s; list-style: none; padding: 0; }
.guide article ol.steps > li { counter-increment: s; position: relative; padding: 2px 0 14px 46px; }
.guide article ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--ruby); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }

/* ---- trợ lý AI ---- */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 12px 30px -10px rgba(27,35,51,.55); }
.ai-fab .gem { width: 30px; height: 30px; }
.ai-panel { position: fixed; right: 22px; bottom: 84px; z-index: 55; width: min(400px, calc(100vw - 30px)); height: min(580px, calc(100vh - 120px)); background: #fff; border-radius: var(--r-lg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.ai-panel header { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.ai-panel header b { display: block; }
.ai-panel header small { color: var(--ink-3); }
.ai-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg.u { align-self: flex-end; background: var(--ruby); color: #fff; border-bottom-right-radius: 4px; }
.msg.a { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.a ul { margin: 4px 0; padding-left: 18px; }
.msg.a p { margin: 0 0 6px; }
.msg.a p:last-child { margin: 0; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-sugg button { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ai-form textarea { min-height: 42px; height: 42px; resize: none; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: tp 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 50% { opacity: .3; } }

/* ---- đáp ứng ---- */
@media (max-width: 1080px) { .domains { grid-template-columns: repeat(3, 1fr); } .bundles { grid-template-columns: 1fr 1fr; } .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 34px; }
  .layout, .course, .admin-layout, .guide { grid-template-columns: 1fr; }
  .side, .facts, .admin-nav { position: static; max-height: none; }
  .admin-nav { flex-direction: row; overflow-x: auto; } .admin-nav .sep { display: none; } .admin-nav a { white-space: nowrap; }
  .login { grid-template-columns: 1fr; } .login .art { padding: 34px 24px; } .login .art h1 { font-size: 30px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; } .burger { display: block; }
  .top .qs { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 18px 14px 90px; } .domains { grid-template-columns: 1fr 1fr; } .domain.first { grid-column: span 2; }
  .bundles, .grid2, .grid3 { grid-template-columns: 1fr; } .row { grid-template-columns: 1fr; } .course .body { padding: 18px; }
  .brand .bt small { display: none; } .cartbtn span { display: none; } .ai-fab span { display: none; } .ai-fab { padding: 10px; }
  h1, .course-head h1 { font-size: 25px; }
}
@media print { .top, .ai-fab, .ai-panel, .btns, .facts .btn { display: none !important; } body { background: #fff; } }
.uname { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .uname { display: none; } }
.top .qs { min-width: 190px; }
@media (max-width: 1400px) { .brand .bt small { display: none; } }
@media (max-width: 1240px) { .nav a { padding: 7px 8px; } .uname { max-width: 110px; } }

/* ---- hình ảnh thương hiệu ---- */
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 440px; height: auto; filter: drop-shadow(0 30px 40px rgba(6,96,63,.18)); }
@media (prefers-reduced-motion: no-preference) { .hero-art img { animation: glint 7s ease-in-out infinite; } @keyframes glint { 50% { transform: translateY(-8px); } } }
.login .art { background: linear-gradient(100deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 52%, rgba(255,255,255,.5) 80%, rgba(255,255,255,.15) 100%), url(/img/hoi-thao.webp) center/cover no-repeat; }
.login .art .emb { width: 150px; height: auto; margin-bottom: 18px; filter: drop-shadow(0 16px 24px rgba(122,12,34,.22)); }
.banner { border-radius: var(--r-lg); overflow: hidden; height: 170px; margin: 6px 0 14px; position: relative; }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(122,12,34,.25), transparent 55%); }
@media (max-width: 900px) { .hero-art { display: none; } .login .art { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.85)), url(/img/hoi-thao.webp) center/cover; } }
.nav a, .brand .bt { white-space: nowrap; }
