:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #e4e6eb;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --primary: #5b4bdb;
  --primary-2: #7b6cf0;
  --primary-soft: #eeecfd;
  --blue: #3370ff;
  --danger: #e33b3b;
  --like: #3370ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 35, 41, .06), 0 2px 8px rgba(31, 35, 41, .04);
  --shadow-lg: 0 12px 40px rgba(31, 35, 41, .18);
  --topbar: 56px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111215; --surface: #1c1d21; --surface-2: #24262b; --border: #2f3137;
    --text: #ebedf0; --text-2: #a3a8b0; --text-3: #7c818a; --primary-soft: #2b2752;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-3); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; min-width: 0; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #9b7bff);
  display: grid; place-items: center; flex: none; }
.brand small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.search input { width: 100%; height: 34px; border-radius: 8px; border: 1px solid transparent; background: var(--surface-2);
  padding: 0 12px 0 34px; outline: none; }
.search input:focus { border-color: var(--primary); background: var(--surface); }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--text-3); }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; line-height: 17px; text-align: center; font-weight: 600; }
.btn { height: 34px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
  white-space: nowrap; transition: background .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #2860e6; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--border); }
.btn-outline-light { border: 1px solid rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.08); }
.btn-outline-light:hover { background: rgba(255,255,255,.2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.menu-toggle { display: none; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 16px; max-width: 1280px; margin: 0 auto; padding: 16px; }
.sidebar { position: sticky; top: calc(var(--topbar) + 16px); align-self: start; max-height: calc(100vh - var(--topbar) - 32px); overflow: auto; }
.rightbar { position: sticky; top: calc(var(--topbar) + 16px); align-self: start; display: flex; flex-direction: column; gap: 16px; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); cursor: pointer; }
.nav-item:hover { background: rgba(31,35,41,.06); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .ico { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 15px; flex: none; }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.nav-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; font-size: 12px; color: var(--text-3); }
.nav-section button { color: var(--text-3); padding: 2px; border-radius: 4px; }
.nav-section button:hover { color: var(--text); }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.section-title { font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }

/* banner chuyên mục */
.banner { border-radius: var(--radius); overflow: hidden; color: #fff; position: relative; box-shadow: var(--shadow); }
.banner-inner { padding: 20px; display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.banner::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.08); }
.banner-icon { width: 56px; height: 56px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 30px; flex: none; }
.banner h1 { margin: 0; font-size: 20px; }
.banner .meta { font-size: 12px; opacity: .85; }
.banner .desc { padding: 0 20px 16px; font-size: 13px; opacity: .9; position: relative; z-index: 1; }
.banner-actions { margin-left: auto; display: flex; gap: 8px; }

/* tabs */
.tabs { display: flex; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.tab { padding: 12px 0; color: var(--text-2); position: relative; font-weight: 500; }
.tab.active { color: var(--blue); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }

/* composer prompt */
.composer-prompt { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.composer-prompt .fake-input { flex: 1; height: 40px; border-radius: 20px; background: var(--surface-2); display: flex; align-items: center;
  padding: 0 16px; color: var(--text-3); cursor: text; }
.composer-prompt .fake-input:hover { background: var(--border); }

/* ---------- post ---------- */
.post { padding: 16px 16px 4px; }
.post + .post { border-top: 1px solid var(--border); }
.post-head { display: flex; gap: 10px; align-items: flex-start; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .name { font-weight: 600; }
.post-head .name:hover { text-decoration: underline; }
.post-head .sub { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 20px; border-radius: 10px; font-size: 12px;
  background: var(--surface-2); color: var(--text-2); }
.chip:hover { background: var(--border); }
.pin-flag { color: #e5732b; font-size: 12px; font-weight: 500; }
.post-body { margin: 10px 0 0; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.post-body.clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { color: var(--blue); font-size: 14px; }
.mention { color: var(--blue); font-weight: 500; }
.post-body a.link { color: var(--blue); text-decoration: underline; }
.gallery { display: grid; gap: 4px; margin-top: 10px; border-radius: 10px; overflow: hidden; max-width: 520px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; background: var(--surface-2); }
.gallery.n1 { grid-template-columns: 1fr; max-width: 360px; }
.gallery.n1 img { max-height: 460px; object-fit: contain; height: auto; background: transparent; border-radius: 10px; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n2 img, .gallery.n4 img { aspect-ratio: 1; }
.gallery.n4 { grid-template-columns: 1fr 1fr; max-width: 400px; }
.gallery.n3, .gallery.nmany { grid-template-columns: repeat(3, 1fr); }
.gallery.n3 img, .gallery.nmany img { aspect-ratio: 1; }
.likers { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.likers .bubble { width: 18px; height: 18px; border-radius: 50%; background: var(--like); color: #fff; display: grid; place-items: center; font-size: 10px; }
.post-actions { display: flex; gap: 4px; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 4px; }
.post-actions button { flex: 1; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.post-actions button:hover { background: var(--surface-2); }
.post-actions button.on { color: var(--like); }
.post-menu { position: relative; }

/* comments */
.comments { padding: 4px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.comment { display: flex; gap: 8px; }
.comment-bubble { background: var(--surface-2); border-radius: 12px; padding: 6px 12px; max-width: 100%; }
.comment-bubble .name { font-weight: 600; font-size: 13px; }
.comment-bubble .text { white-space: pre-wrap; word-wrap: break-word; }
.comment-bubble img { max-width: 220px; border-radius: 8px; margin: 4px 0; cursor: zoom-in; }
.comment-meta { font-size: 12px; color: var(--text-3); padding: 2px 12px 0; display: flex; gap: 10px; }
.comment-meta button { color: var(--text-3); font-size: 12px; }
.comment-meta button:hover { color: var(--danger); }
.see-all { color: var(--text-2); font-weight: 500; font-size: 13px; padding: 2px 0; }
.see-all:hover { text-decoration: underline; }
.comment-input { display: flex; gap: 8px; align-items: flex-start; }
.comment-box { flex: 1; background: var(--surface-2); border-radius: 18px; display: flex; align-items: flex-end; padding: 4px 6px 4px 14px; position: relative; }
.comment-box textarea { flex: 1; border: 0; background: transparent; resize: none; outline: none; padding: 5px 0; max-height: 120px; min-height: 28px; line-height: 1.4; }
.comment-box .icon-btn { width: 30px; height: 30px; }
.comment-attach { position: relative; margin: 6px 0 0 40px; width: 90px; }
.comment-attach img { border-radius: 8px; width: 90px; height: 90px; object-fit: cover; }

/* avatar */
.avatar { border-radius: 50%; flex: none; object-fit: cover; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 600; overflow: hidden; }

/* profile card */
.profile-card { overflow: hidden; }
.profile-cover { height: 96px; background: linear-gradient(120deg, #c9dcff 0%, #4f7cff 55%, #a9c3ff 100%); position: relative; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.6), transparent 40%); }
.profile-body { padding: 0 16px 16px; margin-top: -32px; position: relative; }
.profile-body .avatar { border: 3px solid var(--surface); }
.profile-body .name { font-weight: 600; font-size: 16px; margin-top: 8px; }
.stats { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.stats > span { white-space: nowrap; }
.stats b { color: var(--text); font-size: 15px; }
.rightbar .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; margin-top: 12px; }
.rightbar .stats > span { display: flex; flex-direction: column; font-size: 12px; white-space: normal; line-height: 1.3; }
.leader { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.leader .rank { width: 18px; text-align: center; font-weight: 700; color: var(--text-3); }
.leader:nth-child(1) .rank { color: #e5a52b; } .leader:nth-child(2) .rank { color: #9aa4b2; } .leader:nth-child(3) .rank { color: #c27a3a; }

/* profile page */
.profile-hero .profile-cover { height: 160px; }
.profile-hero .profile-body { margin-top: -48px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.profile-hero .profile-body .info { flex: 1; min-width: 200px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(15, 17, 20, .5); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; animation: pop .18s; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 16px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.composer-text { width: 100%; min-height: 140px; border: 0; outline: none; resize: vertical; font-size: 16px; background: transparent; }
.select { height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); padding: 0 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x, .comment-attach .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 13px; }
.thumb.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: shimmer 1s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.input { height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); padding: 0 10px; outline: none; width: 100%; }
.input:focus, .select:focus { border-color: var(--primary); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; }

/* mention dropdown */
.mention-pop { position: absolute; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
  min-width: 220px; max-height: 260px; overflow: auto; padding: 4px; }
.mention-pop .opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.mention-pop .opt.sel, .mention-pop .opt:hover { background: var(--primary-soft); }

/* dropdown menu */
.dropdown { position: absolute; right: 0; top: 100%; z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 4px; min-width: 180px; }
.dropdown button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; text-align: left; }
.dropdown button:hover { background: var(--surface-2); }
.dropdown button.danger { color: var(--danger); }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 300; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 24px; }
.lightbox .prev { left: 16px; } .lightbox .next { right: 16px; }
.lightbox .close { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 26px; width: 44px; height: 44px; }
.lightbox .counter { position: absolute; bottom: 20px; color: #fff; opacity: .7; }

/* notifications */
.notif { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--primary-soft); }
.notif + .notif { border-top: 1px solid var(--border); }
.notif-ico { position: relative; }
.notif-ico .kind { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; border: 2px solid var(--surface); }

/* admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; }
.kpi .l { font-size: 12px; color: var(--text-3); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; color: var(--text-3); font-weight: 500; }
.table-wrap { overflow-x: auto; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--border); transition: .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--blue); }
.switch.on::after { left: 18px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; }
.swatch.sel { border-color: var(--text); }

/* misc */
.empty { text-align: center; padding: 48px 16px; color: var(--text-3); }
.empty .big { font-size: 40px; margin-bottom: 6px; }
.loader { padding: 24px; text-align: center; color: var(--text-3); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2329; color: #fff; padding: 10px 18px;
  border-radius: 8px; z-index: 400; box-shadow: var(--shadow-lg); animation: pop .2s; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 20% 20%, var(--login-a, #e7e3ff), transparent 40%), radial-gradient(circle at 80% 80%, var(--login-b, #dbe7ff), transparent 40%), var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --login-a: #2b2752; --login-b: #1d2b4a; } }
.login-card { width: 100%; max-width: 380px; padding: 32px 28px; text-align: center; }
.login-card .brand-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; }
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.lark-btn { width: 100%; height: 42px; justify-content: center; margin-top: 20px; font-size: 15px; }
.pinned-strip { display: flex; gap: 10px; overflow-x: auto; padding: 12px 16px; scrollbar-width: thin; }
.pinned-item { flex: 0 0 240px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--surface-2); }
.pinned-item:hover { border-color: var(--primary); }
.pinned-item .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; padding: 4px 0; }
.back:hover { color: var(--text); }
.mobile-channels { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .rightbar { display: none; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; padding: 0 0 16px; gap: 0; }
  .main { gap: 8px; }
  .card, .banner { border-radius: 0; }
  .menu-toggle { display: grid; }
  .search { display: none; }
  .brand small { display: none; }
  .sidebar { position: fixed; top: var(--topbar); left: 0; bottom: 0; width: 270px; max-height: none; z-index: 60; background: var(--surface);
    padding: 12px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(0,0,0,.35); z-index: 55; }
  .mobile-channels { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); scrollbar-width: none; }
  .mobile-channels .chip { height: 30px; padding: 0 12px; font-size: 13px; flex: none; }
  .mobile-channels .chip.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
  .banner-inner { flex-wrap: wrap; }
  .banner-actions { margin-left: 0; width: 100%; }
  .top-actions .admin-btn span { display: none; }
  .post-actions button { font-size: 13px; gap: 4px; }
  .overlay { padding: 0; align-items: end; }
  .modal { max-width: none; border-radius: 14px 14px 0 0; max-height: 92vh; }
}

/* ---------- tính năng theo chuyên mục ---------- */
.tag-chip { background: #e6f6f0; color: #0b7a5a; }
.status-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.st-new { background: #eef3ff; color: #2a5ad6; }
.st-reviewing { background: #fff4e5; color: #b26200; }
.st-done { background: #e6f6ec; color: #13834a; }
.st-declined { background: #f2f3f5; color: #646a73; }
.status-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.kudos { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(120deg, #fff6e0, #ffe9f1); border: 1px solid #ffe2b3; }
.kudos-badge { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 26px; flex: none;
  box-shadow: 0 2px 6px rgba(229,165,43,.35); }
.kudos-title { font-weight: 700; color: #a15c00; }
.kudos-people { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.kudos-person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 16px; background: rgba(255,255,255,.8);
  font-weight: 500; font-size: 13px; color: #1f2329; }
.kudos-person.sel { background: var(--primary-soft); color: var(--primary); }
.kudos-person button { margin-left: 2px; font-size: 11px; opacity: .7; }
.admin-reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #0f9d74, #3ec99a); border-radius: 4px; transition: width .3s; }
.tag-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag-filter .chip { height: 28px; padding: 0 12px; font-size: 13px; }
.chip.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.post-actions button.learned { color: #0f9d74; }
.honor { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.honor-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 6px; border-radius: 12px; background: var(--surface-2); }
.honor-item:hover { background: var(--border); }
.honor-rank { font-size: 20px; height: 24px; font-weight: 700; color: var(--text-3); }
.honor-name { font-weight: 600; font-size: 13px; line-height: 1.3; }
.honor-badges { display: flex; gap: 2px; font-size: 15px; }
.composer-extra:empty { display: none; }
.composer-extra { margin-bottom: 10px; }
.extra-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kudos-form, .poll-form:not(:empty) { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.poll-form:not(:empty) { margin-top: 8px; }
.poll-input-row { display: flex; gap: 6px; align-items: center; }
.people-results { display: flex; flex-direction: column; }
.people-results .opt { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; text-align: left; }
.people-results .opt:hover { background: var(--primary-soft); }
.badge-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-opt { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.badge-opt.sel { border-color: #e5a52b; background: #fff6e0; color: #a15c00; font-weight: 600; }
.poll { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-width: 520px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); text-align: left; overflow: hidden; }
.poll-opt:hover { border-color: var(--blue); }
.poll-opt.voted { border-color: var(--blue); }
.poll-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(51,112,255,.12); transition: width .3s; }
.poll-opt.voted .poll-fill { background: rgba(51,112,255,.22); }
.poll-check { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--text-3); display: grid; place-items: center; font-size: 11px; flex: none; }
.poll-opt.voted .poll-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.poll-text { position: relative; flex: 1; font-weight: 500; }
.poll-pct { position: relative; font-weight: 600; color: var(--text-2); font-size: 13px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; padding: 12px; }
.album img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: var(--surface-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kudos { background: linear-gradient(120deg, #3a2e14, #3a1f2b); border-color: #5a4520; }
  :root:not([data-theme="light"]) .kudos-person { background: rgba(0,0,0,.25); color: var(--text); }
  :root:not([data-theme="light"]) .kudos-title { color: #f3c46b; }
  :root:not([data-theme="light"]) .tag-chip { background: #12392d; color: #6ad7b0; }
  :root:not([data-theme="light"]) .badge-opt.sel { background: #3a2e14; color: #f3c46b; }
  :root:not([data-theme="light"]) .st-new { background: #1d2b4a; color: #8fb0ff; }
  :root:not([data-theme="light"]) .st-reviewing { background: #3a2a12; color: #f3b46b; }
  :root:not([data-theme="light"]) .st-done { background: #12392d; color: #6ad79a; }
  :root:not([data-theme="light"]) .st-declined { background: #2a2c31; color: #a3a8b0; }
}

/* ---------- Giai đoạn 1 ---------- */
.hashtag { color: var(--blue); font-weight: 500; }
.hashtag:hover { text-decoration: underline; }
.aud-chip { background: #fff4e5; color: #9a5b00; }
.react-wrap { flex: 1; display: flex; position: relative; }
.react-wrap > button:first-child { flex: 1; }
.post-actions .react-more { flex: 0 0 36px; font-size: 15px; filter: grayscale(.4); }
.post-actions .react-more:hover { filter: none; }
.react-pop { position: absolute; bottom: 40px; left: 0; z-index: 30; display: flex; gap: 2px; padding: 6px 8px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.react-pop button { font-size: 22px; width: 38px; height: 38px; border-radius: 50%; transition: transform .12s; }
.react-pop button:hover { transform: scale(1.25); background: var(--surface-2); }
.emoji-stack { display: inline-flex; }
.emoji-stack span { font-size: 13px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); margin-right: -4px; box-shadow: 0 0 0 1.5px var(--surface); }
.emoji-stack + * { margin-left: 4px; }
.attachments { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 520px; }
.att-video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.att-file:hover { border-color: var(--blue); }
.att-ico { font-size: 22px; }
.att-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 14px; background: var(--surface-2); font-size: 13px; max-width: 100%; }
.att-chip button { margin-left: 4px; opacity: .6; }
.att-chip.loading { color: var(--text-3); }
.comment.reply { margin-left: 40px; }
.comment-meta .reply-btn { color: var(--text-2); font-weight: 500; }
.comment-meta .reply-btn:hover { color: var(--blue); }
.replying { font-size: 12px; color: var(--text-2); margin: 0 0 6px 40px; display: flex; gap: 6px; align-items: center; }
.replying button { color: var(--text-3); font-size: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-pill { font-size: 12px; padding: 2px 10px; border-radius: 12px; background: #fff6e0; color: #a15c00; font-weight: 500; }
.profile-cover { position: relative; }
.cover-btn { position: absolute; right: 12px; bottom: 12px; z-index: 2; background: rgba(0,0,0,.45); color: #fff; }
.cover-btn:hover { background: rgba(0,0,0,.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .aud-chip { background: #3a2a12; color: #f3b46b; }
  :root:not([data-theme="light"]) .badge-pill { background: #3a2e14; color: #f3c46b; }
}
@media (max-width: 760px) { .comment.reply { margin-left: 28px; } }
.profile-hero .profile-body { margin-top: 0; align-items: flex-start; }
.profile-hero .profile-body > .avatar { margin-top: -48px; }
.profile-hero .profile-body .info { padding-top: 12px; }
.profile-hero .profile-body > .btn { margin-top: 14px; }

/* ================= Vision 2.0 ================= */
.imp-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.imp-important { background: #fff4e5; color: #b26200; }
.imp-urgent { background: #fdecec; color: #c62828; }
.imp-normal { background: var(--surface-2); color: var(--text-2); }
.st-approved { background: #e8f1ff; color: #1f5fd1; }
.st-in_progress { background: #f1ecff; color: #6a3fd8; }
.st-rejected { background: #fdecec; color: #c62828; }
.tk-received { background: #eef3ff; color: #2a5ad6; } .tk-processing { background: #fff4e5; color: #b26200; }
.tk-replied { background: #f1ecff; color: #6a3fd8; } .tk-closed { background: #e6f6ec; color: #13834a; }
.rf-submitted { background: #eef3ff; color: #2a5ad6; } .rf-screening, .rf-interview { background: #fff4e5; color: #b26200; }
.rf-hired { background: #e6f6ec; color: #13834a; } .rf-rejected { background: #f2f3f5; color: #646a73; }

.side-item { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: 13px; line-height: 1.35; }
.side-item .t { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.side-item:hover .t { text-decoration: underline; }
.ev-date { flex: none; font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

.read-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff8ec; border: 1px solid #ffe2b3; }
.read-bar.done { background: var(--surface-2); border-color: var(--border); }
.read-bar .read-count { margin-left: auto; }
.read-ok { color: #13834a; font-weight: 600; font-size: 14px; }

.idea-box, .job-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid #e5a52b; }
.job-box { border-left-color: #0f9d74; }
.job-box.closed { opacity: .7; border-left-color: var(--text-3); }
.idea-title, .job-title { font-weight: 700; font-size: 16px; }
.idea-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.idea-meta a { color: var(--blue); }
.idea-benefit { font-size: 14px; margin-top: 6px; white-space: pre-wrap; }
.idea-steps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.idea-steps .step { font-size: 11px; padding: 3px 8px; border-radius: 10px; background: var(--border); color: var(--text-3); }
.idea-steps .step.on { background: #fff1d6; color: #9a5b00; }
.idea-steps .step.cur { background: #e5a52b; color: #fff; font-weight: 600; }
.idea-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.idea-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.idea-stat { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.idea-stat b { font-size: 18px; color: var(--text); }
.idea-stat:hover { background: var(--border); }
.timeline-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }

.event-box { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); flex-wrap: wrap; }
.ev-cal { width: 48px; flex: none; text-align: center; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.ev-cal .m { background: #e33b3b; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 0; }
.ev-cal .d { font-size: 20px; font-weight: 700; padding: 2px 0; }

/* Academy */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.course-grid > .empty { grid-column: 1 / -1; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.course-card:hover { box-shadow: var(--shadow-lg); }
.course-card.overdue { outline: 2px solid #f3b4b4; }
.course-cover { height: 110px; background: linear-gradient(120deg, #2a7de1, #5b4bdb) center / cover; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.course-body { padding: 12px 14px 14px; }
.course-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.course-title { font-weight: 700; font-size: 15px; margin: 6px 0 2px; }
.lesson-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.lesson-row:hover { background: var(--surface-2); }
.lesson-no { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-weight: 600; font-size: 13px; flex: none; }
.lesson-row.passed .lesson-no { background: #0f9d74; color: #fff; }
.quiz-q { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; }
.quiz-q.ok { border-color: #8fd6b3; background: #f0faf5; }
.quiz-q.bad { border-color: #f3b4b4; background: #fff5f5; }
.quiz-title { font-weight: 600; margin-bottom: 6px; }
.quiz-opt { padding: 4px 0; }
.quiz-opt.is-answer { color: #13834a; font-weight: 600; }
.quiz-edit { padding: 10px; border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.dept-pick { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.report-table th { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-table .cell { text-align: center; font-weight: 600; font-size: 13px; }
.report-table .ok { color: #13834a; background: #f0faf5; } .report-table .late { color: #c62828; background: #fff5f5; }
.report-table .doing { color: #b26200; } .report-table .todo, .report-table .na { color: var(--text-3); }

/* Hộp thư */
.ticket-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border-top: 1px solid var(--border); }
.ticket-row:hover { background: var(--surface-2); }
.ticket-msg { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin-top: 8px; white-space: pre-wrap; word-wrap: break-word; }
.ticket-msg.staff { background: var(--primary-soft); }
.key-box { margin-top: 10px; padding: 12px; border-radius: 10px; background: #fff8ec; border: 1px solid #ffe2b3; display: flex; flex-direction: column; gap: 6px; }
.key-line code { font-size: 16px; font-weight: 700; user-select: all; background: var(--surface); padding: 2px 8px; border-radius: 6px; }
.anon-note { font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }

/* Tuyển dụng / kiểm duyệt */
.ref-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ref-ctrl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.report-quote { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 6px; font-size: 13px; }

/* Vinh danh */
.honor-item.star { background: linear-gradient(160deg, #fff7e0, var(--surface-2)); }
.star-title { font-size: 12px; font-weight: 600; color: #9a5b00; }
.star-reason { color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.badge-pill.star { background: #fff1d6; color: #9a5b00; }
.badge-pill.course { background: #e8f1ff; color: #1f5fd1; }

/* Dashboard */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-top: 6px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; min-width: 3px; }
.bar .seg { width: 100%; }
.seg.p, .lg.p { background: #5b4bdb; } .seg.c, .lg.c { background: #0f9d74; } .seg.r, .lg.r { background: #e5a52b; }
.legend { display: flex; gap: 14px; margin-top: 8px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.hbar { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.hbar .hl { width: 160px; flex: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hbar .ht { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.hbar .hf { height: 100%; background: var(--primary); border-radius: 5px; }
@media (max-width: 760px) {
  .hbar .hl { width: 110px; }
  .course-grid { grid-template-columns: 1fr; }
  .read-bar .read-count { margin-left: 0; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .read-bar:not(.done), :root:not([data-theme="light"]) .key-box { background: #2e2716; border-color: #4a3b18; }
  :root:not([data-theme="light"]) .quiz-q.ok { background: #14271e; } :root:not([data-theme="light"]) .quiz-q.bad { background: #2a1717; }
  :root:not([data-theme="light"]) .honor-item.star { background: linear-gradient(160deg, #2e2716, var(--surface-2)); }
}
