/* elearning.css — Phân hệ E-Learning & Truyền thông nội bộ (dùng bộ biến màu của css/cv.css; không phụ thuộc Tailwind) */

/* Sidebar (mục cha E-Learning + 3 mục con) nằm trong css/sidebar-compact.css */

/* ---------- Khung chung ---------- */
.el { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.el-tabs-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.el-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 550; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.el-pill:hover { background: var(--bg-soft); }
.el-pill.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); font-weight: 650; }
.el-pill [data-icon] { font-size: 15px; }
.el-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, opacity .15s;
}
.el-btn:hover { background: var(--bg-soft); }
.el-btn [data-icon] { font-size: 15px; }
.el-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.el-btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.el-btn.ghost { border-color: var(--accent-line); color: var(--accent-2); background: var(--surface); }
.el-btn.sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
.el-btn.danger { color: var(--accent-2); border-color: var(--accent-line); }
.el-btn[disabled] { opacity: .55; cursor: not-allowed; }
.el-btn:focus-visible, .el-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.el-muted { color: var(--muted); }
.el-state { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.el-state b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.el-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: elSpin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes elSpin { to { transform: rotate(360deg); } }

/* ---------- Hàng tiêu đề + thẻ nhân sự gọn ---------- */
.el-head { align-items: center; }
.el-head .cv-pagehead-actions { align-items: center; justify-content: flex-end; gap: 10px; }
.el-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.el-me .el-av { width: 40px; height: 40px; font-size: 14px; }
.el-me-text { min-width: 0; line-height: 1.3; max-width: 230px; }
.el-me-text b { display: block; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-me-text span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-me-text .el-tag { display: inline-block; width: fit-content; height: auto; margin-top: 3px; padding: 1px 8px; font-style: normal; line-height: 1.5; }   /* nền ôm vừa chữ */
.el-me-wait { padding: 12px 16px; font-size: 12.5px; color: var(--muted); }
.el-me-btns { display: flex; gap: 6px; flex: none; }
.el-input {
  flex: 1 1 180px; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px;
}
.el-input:focus, .el-area:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
.el-compose-fields .el-input { flex: none; width: 100%; }
.el-area { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.55; resize: vertical; }
.el-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-2); }
.el-tag.green { background: var(--green-soft); color: var(--green); }
.el-tag.amber { background: var(--amber-soft); color: var(--amber); }
.el-tag.blue { background: var(--blue-soft); color: var(--blue); }
.el-tag.gray { background: var(--line-2); color: var(--muted); }

/* ---------- Avatar ---------- */
.el-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--line); color: var(--ink-2); display: grid; place-items: center; font-weight: 700; font-size: 14px; overflow: hidden; }
.el-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.el-av.lg { width: 56px; height: 56px; font-size: 18px; }
.el-av.sm { width: 32px; height: 32px; font-size: 12px; }
.el-av.anon { background: var(--ink-2); color: #fff; }
button.el-av { border: 0; padding: 0; cursor: pointer; }
.el-av-edit::after { content: ""; position: absolute; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .15s; }
.el-av-edit:hover::after, .el-av-edit:focus-visible::after { opacity: 1; }
.el-av-cam { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; z-index: 1; opacity: 0; transition: opacity .15s; font-size: 18px; }
.el-av-edit:hover .el-av-cam, .el-av-edit:focus-visible .el-av-cam { opacity: 1; }

/* ---------- Thi trực tuyến & Minigame ---------- */
.el-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.el-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.el-exam { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.el-exam h3 { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.el-exam-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.el-exam ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.el-exam li { display: flex; gap: 8px; align-items: flex-start; }
.el-exam li [data-icon] { font-size: 15px; color: var(--faint); margin-top: 1px; flex: none; }
.el-exam .el-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.el-exam-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.el-score { font-size: 12.5px; color: var(--ink-2); }
.el-score b { font-size: 18px; color: var(--accent-2); margin-right: 4px; }

.el-ov { position: fixed; inset: 0; z-index: 1200; background: rgba(15, 23, 42, .5); display: flex; align-items: flex-start; justify-content: center; padding: 20px 12px; overflow-y: auto; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.el-modal { width: min(760px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: auto; display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.el-modal.wide { width: min(980px, 100%); }
.el-mh { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; z-index: 2; }
.el-mh h3 { margin: 0; font-size: 16px; flex: 1; min-width: 0; line-height: 1.3; }
.el-mb { padding: 16px 18px; overflow-y: auto; }
.el-mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.el-timer { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.el-timer.low { background: var(--accent); color: #fff; animation: elPulse 1s ease-in-out infinite; }
@keyframes elPulse { 50% { opacity: .7; } }
.el-prog { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.el-prog i { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.el-q { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.el-q:last-child { border-bottom: 0; }
.el-q-t { font-size: 14.5px; font-weight: 650; line-height: 1.5; margin-bottom: 10px; color: var(--ink); }
.el-q-t em { font-style: normal; color: var(--accent); margin-right: 6px; }
.el-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; line-height: 1.45; transition: background .12s, border-color .12s; }
.el-opt:hover { background: var(--bg-soft); }
.el-opt input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.el-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.el-opt b { color: var(--muted); flex: none; }
.el-result { text-align: center; padding: 10px 6px 4px; }
.el-result .big { font-size: 56px; line-height: 1; font-weight: 800; color: var(--accent-2); margin: 6px 0; }
.el-result p { color: var(--muted); font-size: 13.5px; margin: 4px 0; }
.el-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.el-t { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
table.el-t th { background: var(--bg-soft); color: var(--ink-2); font-weight: 700; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.el-t td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.el-t tr:last-child td { border-bottom: 0; }
table.el-t tr.me td { background: var(--accent-soft); }
table.el-t .num { text-align: center; }

/* ---------- Truyền thông nội bộ ---------- */
.el-media { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; max-width: 1200px; width: 100%; margin: 0 auto; align-items: start; }
.el-feed-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#elFeed { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.el-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 84px; }
.el-side-card { padding: 16px; }
.el-side-card h3, body.cv .el-side-card h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.el-side-card h3 [data-icon] { color: var(--accent); font-size: 17px; flex: none; }
.el-side-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.el-side-h h3 { flex: 1; min-width: 0; }
.el-notes { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.el-notes b { color: var(--ink); }
.el-hot { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; border-radius: var(--radius-sm); background: transparent; text-align: left; font: inherit; cursor: pointer; transition: background .12s; }
.el-hot:hover { background: var(--bg-soft); }
.el-hot i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-2); }
.el-hot span { min-width: 0; }
.el-hot b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 650; color: var(--ink); line-height: 1.4; }
.el-hot small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--faint); }
.el-side-empty { font-size: 12.5px; color: var(--muted); line-height: 1.5; padding: 4px 0 2px; }
.el-side-foot { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.el-post.flash { box-shadow: 0 0 0 2px var(--accent); transition: box-shadow .3s; }
.el-compose { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.el-compose-row { display: flex; gap: 10px; align-items: flex-start; }
.el-compose-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.el-compose-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.el-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-soft); }
.el-seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.el-seg button.on { background: var(--surface); color: var(--accent-2); box-shadow: var(--shadow-sm); }
.el-count { font-size: 11.5px; color: var(--faint); text-align: right; }
.el-prev { position: relative; display: inline-block; max-width: 220px; }
.el-prev img { display: block; max-width: 100%; max-height: 150px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.el-prev button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .7); color: #fff; cursor: pointer; display: grid; place-items: center; }
.el-post { padding: 0; overflow: hidden; }
.el-post.pending { border-color: var(--amber-line); }
.el-post-h { display: flex; gap: 10px; align-items: center; padding: 14px 16px 6px; }
.el-post-who { min-width: 0; flex: 1; line-height: 1.3; }
.el-post-who b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.el-post-who span { display: block; font-size: 11.5px; color: var(--faint); }
.el-post-adm { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.el-post-b { padding: 4px 16px 12px; }
.el-post-b h3, body.cv .el-post-b h3 { margin: 4px 0 8px; font-size: 16px; line-height: 1.4; font-weight: 700; color: #1e293b; text-align: left; }
[data-theme="dark"] .el-post-b h3, [data-theme="dark"] body.cv .el-post-b h3, [data-theme="dark"].cv .el-post-b h3 { color: var(--ink); }
.el-post-c { font-size: 14px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.el-post-c.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.el-more { border: 0; background: none; color: var(--accent-2); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 0 0; cursor: pointer; }
.el-real { margin-top: 8px; font-size: 12px; color: var(--amber); background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 6px; padding: 4px 8px; display: inline-block; }
.el-img { margin: 12px 0 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); min-height: 80px; display: grid; place-items: center; }
.el-img img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.el-img span { font-size: 12.5px; color: var(--faint); padding: 28px 0; }
.el-post-f { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(148, 163, 184, .28); }
.el-act { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; transition: background .12s, color .12s; }
.el-act:hover { background: var(--bg-soft); color: var(--ink); }
.el-act [data-icon] { font-size: 17px; }
.el-act.liked { color: var(--accent); }
.el-act.liked svg { fill: currentColor; }
.el-act:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.el-cm { border-top: 1px solid var(--line-2); padding: 12px 16px 14px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 10px; }
.el-cm-i { display: flex; gap: 8px; }
.el-cm-b { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 11px; font-size: 13px; line-height: 1.5; min-width: 0; }
.el-cm-b b { display: block; font-size: 12px; color: var(--ink); }
.el-cm-b span { word-break: break-word; white-space: pre-wrap; }
.el-cm-b small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.el-cm-new { display: flex; gap: 8px; }

/* ---------- Bảng xếp hạng ---------- */
.el-rank-bar { margin-bottom: 0; font-size: 13px; }
.el-rank-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.el-select { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.el-rank-body { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.el-podium-card { padding: 16px 14px 24px; background: #FEF9C3; border-color: #FDE68A; border-radius: var(--radius); }
[data-theme="dark"] .el-podium-card { background: #3B3320; border-color: #5C4A1B; }
body.cv .el-podium-card h2 { color: var(--accent-2); }
.el-podium-card h2 { margin: 0 0 2px; text-align: center; font-size: 15.5px; font-weight: 800; letter-spacing: .01em; color: var(--accent-2); text-transform: uppercase; text-wrap: balance; }
.el-podium-sub { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.el-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 140px)); justify-content: center; align-items: end; gap: 0; margin-top: 4px; }
.el-pod { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.el-pod .wr { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.el-pod.p1 .wr { width: 100px; height: 100px; }
.el-pod .wr svg.wreath { position: absolute; inset: 0; width: 100%; height: 100%; }
.el-pod .wr .el-av { width: 54px; height: 54px; font-size: 17px; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .2); }
.el-pod.p1 .wr .el-av { width: 66px; height: 66px; font-size: 20px; }
.el-pod-name { margin-top: 0; font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: center; text-transform: uppercase; line-height: 1.25; padding: 0 4px; overflow-wrap: anywhere; }
.el-pod-loi { margin: 2px 0 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent-2); }
.el-pod-loi i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; }
.el-step { width: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; border-radius: 6px 6px 0 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.el-pod.p1 .el-step { height: 76px; background: #F59E0B; }
.el-pod.p2 .el-step { height: 56px; background: #FBBF24; }
.el-pod.p3 .el-step { height: 42px; background: #FCD34D; }
.el-pod.p1 { order: 2; } .el-pod.p2 { order: 1; } .el-pod.p3 { order: 3; }
.el-top-rest { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; margin-top: 16px; padding-bottom: 2px; }
.el-mini { width: 100px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.el-mini .el-av { width: 48px; height: 48px; border: 3px solid #fff; box-shadow: 0 0 0 2px #CBD5E1; }
.el-mini b { font-size: 11.5px; text-transform: uppercase; text-align: center; line-height: 1.25; overflow-wrap: anywhere; color: var(--ink); }
.el-mini span { font-size: 11.5px; font-weight: 700; color: var(--accent-2); }
.el-rank-tbl { padding: 16px; }
table.el-t-rank { table-layout: fixed; min-width: 900px; }
.el-t-rank .c-stt { width: 6%; } .el-t-rank .c-tt { width: 20%; } .el-t-rank .c-av { width: 10%; }
.el-t-rank .c-ten { width: 17%; } .el-t-rank .c-ma { width: 12%; } .el-t-rank .c-cv { width: 17%; } .el-t-rank .c-ch { width: 18%; }
.el-t-rank td, .el-t-rank th { overflow-wrap: break-word; word-break: normal; }
.el-t-rank th { white-space: normal; }
body.cv .el-rank-tbl h2 { color: var(--accent-2); }
.el-rank-tbl h2 { margin: 0 0 12px; text-align: center; font-size: 16px; font-weight: 800; color: var(--accent-2); text-transform: uppercase; }
.el-medal { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--accent-2); }
.el-medal i { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 3px #FCA5A5; display: inline-block; }
.el-medal small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.el-pager { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.el-pager button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.el-pager button.on { border-color: var(--accent); color: var(--accent-2); font-weight: 700; background: var(--accent-soft); }
.el-pager button[disabled] { opacity: .45; cursor: not-allowed; }
.el-note { font-size: 12px; color: var(--amber); background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius-sm); padding: 8px 12px; }

@media (max-width: 1100px) {
  .el-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .el-media { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .el-side { position: static; }
  .el-head .cv-pagehead-actions { justify-content: flex-start; width: 100%; }
}
@media (max-width: 640px) {
  .el-grid { grid-template-columns: 1fr; gap: 14px; }
  .el-me { width: 100%; flex-wrap: wrap; }
  .el-me-text { flex: 1 1 120px; max-width: none; }
  .el-bar .el-btn { flex: 1; }
  .el-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .el-pod .wr { width: 84px; height: 84px; } .el-pod.p1 .wr { width: 100px; height: 100px; }
  .el-pod .wr .el-av { width: 54px; height: 54px; font-size: 16px; } .el-pod.p1 .wr .el-av { width: 66px; height: 66px; }
  .el-pod-name { font-size: 11px; } .el-step { font-size: 34px; }
  .el-post-b h3 { font-size: 15.5px; }
  .el-modal { max-height: none; }
  .el-bar { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .el-timer.low, .el-spin { animation: none; } .el-prog i { transition: none; } }

/* ============================================================
 *  v1.3 — Avatar mặc định (logo Hoa Sen Home), avatar trên Top Header, tab xếp hạng 2 chế độ
 * ============================================================ */
/* Ảnh logo mặc định đã có nền đỏ thương hiệu: lấp đầy khung tròn */
.el-av img.dflt, .cv-av-disc img.dflt { width: 100%; height: 100%; object-fit: cover; display: block; background: #B11016; }
.el-av:has(img.dflt) { background: #B11016; }

/* Top Header: bấm vào ảnh để đổi, có huy hiệu máy ảnh nhỏ ở góc dưới */
.cv-avatar.cv-avatar-btn { position: relative; padding: 0; border: 0; background: transparent; cursor: pointer; overflow: visible; transition: transform .15s ease, box-shadow .15s ease; }
.cv-avatar.cv-avatar-btn:hover { transform: scale(1.05); }
.cv-avatar.cv-avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-av-disc { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #B11016; box-shadow: 0 0 0 1.5px var(--line); }
.cv-av-disc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-av-cam { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #475569; border: 1.5px solid var(--line); box-shadow: 0 1px 3px rgba(15, 23, 42, .25); pointer-events: none; }
[data-theme="dark"] .cv-av-cam { background: #1E293B; color: #CBD5E1; border-color: #475569; }
.cv-avatar.cv-avatar-btn:hover .cv-av-cam { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Thanh chuyển 2 chế độ xem + bộ lọc tháng/năm */
.el-rank-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.el-rank-ctl-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.el-seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-soft, #F1F5F9); border: 1px solid var(--line); border-radius: 12px; max-width: 100%; flex-wrap: wrap; }
.el-seg button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; line-height: 1.3; }
.el-seg button:hover:not(.on) { background: rgba(15, 23, 42, .05); }
.el-seg button.on { background: #fff; color: #92400E; box-shadow: 0 1px 4px rgba(15, 23, 42, .14); font-weight: 800; }
.el-seg button.warn.on { background: #FEF2F2; color: #B91C1C; box-shadow: inset 0 0 0 1px #FECACA, 0 1px 4px rgba(185, 28, 28, .12); }
[data-theme="dark"] .el-seg button.on { background: #1E293B; color: #FCD34D; }
[data-theme="dark"] .el-seg button.warn.on { background: rgba(239, 68, 68, .15); color: #FCA5A5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .4); }
.el-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Chế độ "Nhiều lỗi nhất": tông đỏ cảnh báo */
.el-podium-card.is-warn { background: #FEF2F2; border-color: #FECACA; }
[data-theme="dark"] .el-podium-card.is-warn { background: #3A1B1B; border-color: #7F1D1D; }
body.cv .el-podium-card.is-warn h2, .el-podium-card.is-warn h2 { color: #B91C1C; }
[data-theme="dark"] body.cv .el-podium-card.is-warn h2, [data-theme="dark"] .el-podium-card.is-warn h2 { color: #FCA5A5; }
.el-podium-card.is-warn .el-pod-loi, .el-podium-card.is-warn .el-mini span { color: #B91C1C; }
.el-podium-card.is-warn .el-pod-loi i { background: #DC2626; }
.el-podium-card.is-warn .el-pod.p1 .el-step { background: #B91C1C; }
.el-podium-card.is-warn .el-pod.p2 .el-step { background: #DC2626; }
.el-podium-card.is-warn .el-pod.p3 .el-step { background: #F87171; }
.el-podium-card.is-warn .el-mini .el-av { box-shadow: 0 0 0 2px #FCA5A5; }
.el-rank-tbl.is-warn .el-medal { color: #B91C1C; }
.el-rank-tbl.is-warn .el-medal i { background: #DC2626; box-shadow: inset 0 0 0 3px #FECACA; }
@media (max-width: 640px) { .el-seg { width: 100%; } .el-seg button { flex: 1 1 100%; text-align: left; } .el-rank-ctl-wrap { width: 100%; } }

/* ===== v1.4 — Filter Toolbar Card (Bảng xếp hạng KSBH) ===== */
.el-rk-tool { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 12px 16px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; }
.el-rk-tool .el-seg { display: inline-flex; flex-wrap: nowrap; gap: 4px; padding: 4px; background: #f1f5f9; border: 0; border-radius: 8px; }
.el-rk-tool .el-seg button { height: 32px; padding: 0 14px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #64748b; white-space: nowrap; text-align: center; }
.el-rk-tool .el-seg button:hover:not(.on) { background: rgba(15, 23, 42, .05); }
.el-rk-tool .el-seg button.on { background: #ffffff; color: #15803d; font-weight: 800; box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.el-rk-tool .el-seg button.warn.on { background: #ffffff; color: #dc2626; box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.el-rk-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.el-rk-search, .el-rk-ctl .el-select { box-sizing: border-box; height: 36px; border: 1px solid #cbd5e1; border-radius: 8px; background: #ffffff; color: var(--ink, #0f172a); font: inherit; font-size: 13px; }
.el-rk-search { width: 210px; padding: 0 12px; }
.el-rk-ctl .el-select { padding: 0 10px; cursor: pointer; }
.el-rk-search::placeholder { color: #94a3b8; }
.el-rk-search:focus, .el-rk-ctl .el-select:focus { outline: 0; border-color: var(--accent, #B91C1C); box-shadow: 0 0 0 3px rgba(185, 28, 28, .12); }
[data-theme="dark"] .el-rk-tool { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .el-rk-tool .el-seg { background: #0f172a; }
[data-theme="dark"] .el-rk-tool .el-seg button { color: #94a3b8; }
[data-theme="dark"] .el-rk-tool .el-seg button.on { background: #334155; color: #4ade80; }
[data-theme="dark"] .el-rk-tool .el-seg button.warn.on { background: #334155; color: #f87171; }
[data-theme="dark"] .el-rk-search, [data-theme="dark"] .el-rk-ctl .el-select { background: #0f172a; border-color: #475569; color: #e2e8f0; }
@media (max-width: 760px) {
  .el-rk-tool { padding: 10px 12px; }
  .el-rk-tool .el-seg { width: 100%; }
  .el-rk-tool .el-seg { box-sizing: border-box; }
  .el-rk-tool .el-seg button { flex: 1 1 0; min-width: 0; height: auto; min-height: 36px; padding: 5px 6px; font-size: 12.5px; line-height: 1.25; white-space: normal; }
  .el-rk-ctl { width: 100%; }
  .el-rk-search { flex: 1 1 100%; width: auto; }
  .el-rk-ctl .el-select { flex: 1 1 0; }
}

/* ===== v1.5 — Truyền thông nội bộ: 1 cột tập trung, thanh đăng nhanh, thẻ bài & ảnh gọn ===== */
.el-media { display: block; max-width: 720px; width: 100%; margin: 0 auto; padding-bottom: 32px; }
.el-feed-col, #elFeed { gap: 16px; }
.el-feed-col { width: 100%; }

/* Thanh đăng bài nhỏ gọn */
.el-quick { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.el-quick:hover { box-shadow: 0 2px 10px rgba(15, 23, 42, .08); border-color: #cbd5e1; }
.el-quick:focus-visible { outline: 2px solid var(--accent, #DC2626); outline-offset: 2px; }
.el-quick .el-av { width: 36px; height: 36px; flex: none; }
.el-quick-in { flex: 1; min-width: 0; height: 38px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-quick-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px; background: #DC2626; color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.el-quick:hover .el-quick-btn { background: #B91C1C; }
[data-theme="dark"] .el-quick-in { background: #0f172a; color: #94a3b8; }

/* Cửa sổ soạn bài */
.el-modal.compose { width: min(560px, 100%); }
.el-cmp { display: flex; flex-direction: column; gap: 10px; }
.el-cmp-who { display: flex; align-items: center; gap: 10px; }
.el-cmp-who .el-av { width: 40px; height: 40px; flex: none; }
.el-cmp-who b { display: block; font-size: 14px; line-height: 1.3; color: var(--ink); }
.el-cmp-who small { font-size: 12px; color: var(--muted); }
.el-cmp .el-area { min-height: 130px; }
.el-cmp .el-compose-tools { justify-content: space-between; }
.el-cmp-note { font-size: 12px; line-height: 1.45; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 10px; }
[data-theme="dark"] .el-cmp-note { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); color: #fcd34d; }
.el-cmp-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* Thẻ bài viết */
.el-post { padding: 16px 20px; background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; overflow: hidden; }
.el-post-h { padding: 0 0 8px; }
.el-post-b { padding: 4px 0 12px; }
.el-post-b h3, body.cv .el-post-b h3 { margin: 2px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.4; color: #0f172a; }
[data-theme="dark"] .el-post-b h3, [data-theme="dark"] body.cv .el-post-b h3 { color: var(--ink); }
.el-post-c { font-size: 14px; line-height: 1.55; }
.el-post-c.clamp { -webkit-line-clamp: 4; }
.el-more[hidden] { display: none !important; }
.el-post-f { margin: 0 -20px -16px; }
.el-cm { margin: 0 -20px -16px; padding: 12px 20px 14px; }

/* Ảnh trong bài: không quá cao, bấm để phóng to */
.el-img { margin: 12px 0 0; border-radius: 10px; border: 1px solid #f1f5f9; overflow: hidden; background: var(--bg-soft, #f8fafc); min-height: 80px; display: grid; place-items: center; }
[data-theme="dark"] .el-img { border-color: #1e293b; }
.el-img img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: cover; object-position: center; cursor: zoom-in; }

/* Lightbox xem ảnh toàn màn hình */
.el-lb { position: fixed; inset: 0; z-index: 1400; background: rgba(15, 23, 42, .88); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; animation: elLbIn .15s ease; }
.el-lb img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5); cursor: default; background: #fff; }
.el-lb-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 20px; }
.el-lb-x:hover { background: rgba(255, 255, 255, .3); }
@keyframes elLbIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .el-quick { padding: 10px 12px; gap: 10px; }
  .el-quick-btn { padding: 0 12px; }
  .el-quick-in { padding: 0 12px; font-size: 13px; }
  .el-post { padding: 14px 16px; }
  .el-post-f, .el-cm { margin-left: -16px; margin-right: -16px; }
  .el-post-f { margin-bottom: -14px; } .el-cm { margin-bottom: -14px; padding-left: 16px; padding-right: 16px; }
  .el-img img { max-height: 300px; }
  .el-cmp .el-compose-tools { flex-direction: column; align-items: stretch; }
  .el-cmp .el-seg { width: 100%; } .el-cmp .el-seg button { flex: 1; text-align: center; }
}
.el-cmp .el-input { flex: none; width: 100%; height: 42px; }

/* ===== v1.6 — Truyền thông nội bộ: tiêu đề thẳng hàng với bảng tin, bài viết & ảnh nhỏ gọn hơn ===== */
.el-head .hero-sub { max-width: none; text-wrap: balance; }
.el-media { max-width: 680px; }
#elMediaRoot .el-head { max-width: 680px; width: 100%; margin-left: auto; margin-right: auto; }
.el-post-c.clamp { -webkit-line-clamp: 4; }
.el-img img { object-fit: contain; max-height: 300px; background: var(--bg-soft, #f8fafc); }
[data-theme="dark"] .el-img img { background: #0f172a; }
@media (min-width: 641px) {
  .el-feed-col, #elFeed { gap: 14px; }
  .el-post { padding: 14px 18px; }
  .el-post-h { padding: 0 0 6px; gap: 10px; }
  .el-post-h .el-av { width: 34px; height: 34px; font-size: 12px; }
  .el-post-who b { font-size: 13px; }
  .el-post-who span { font-size: 11px; }
  .el-post-b { padding: 2px 0 10px; }
  .el-post-b h3, body.cv .el-post-b h3 { margin: 2px 0 4px; font-size: 15px; line-height: 1.35; }
  .el-post-c { font-size: 13.5px; line-height: 1.5; }
  .el-more { font-size: 12.5px; padding-top: 4px; }
  .el-img { margin-top: 10px; }
  .el-post-f { margin: 0 -18px -14px; }
  .el-act { height: 36px; font-size: 12.5px; }
  .el-cm { margin: 0 -18px -14px; padding: 10px 18px 12px; }
}
@media (max-width: 640px) {
  .el-post-b h3, body.cv .el-post-b h3 { font-size: 14.5px; }
  .el-post-c { font-size: 13.5px; line-height: 1.5; }
  .el-img img { max-height: 240px; }
  .el-act { height: 38px; font-size: 12.5px; }
}
