/* =====================================================================
   Giao diện chung của bộ khung. Màu thương hiệu: chọn ở trang Setup → bước "Thương hiệu"
   (BRAND_COLOR, tự sinh --brand / --brand-600 / --brand-50 / --brand-100). Style riêng của dự án:
   app/static/css/theme.css — KHÔNG sửa file này.
   ===================================================================== */
:root {
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 8px 24px -10px rgba(15, 23, 42, .18);
  --bs-primary: var(--brand);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-600);
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-border-radius: 10px;
}
body { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.text-muted, .text-secondary { color: var(--muted) !important; }

/* ---------- Nút ---------- */
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600);
  --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-600); --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-600); }
.btn-soft { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-600); }
.btn-google { background: #fff; border: 1px solid var(--line); color: var(--ink); display: inline-flex; align-items: center;
  justify-content: center; gap: .6rem; }
.btn-google:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-google img { width: 18px; height: 18px; }

/* ---------- Thanh điều hướng ---------- */
.app-nav { background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.app-nav .navbar-brand { font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: .5rem; }
.brand-img { width: 32px; height: 32px; border-radius: 9px; }
.brand-wide { height: 32px; width: auto; max-width: 180px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.app-nav .nav-link { color: var(--muted); font-weight: 500; border-radius: 8px; padding: .4rem .75rem !important; }
.app-nav .nav-link:hover, .app-nav .nav-link.active { color: var(--ink); background: #f1f5f9; }
.credit-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-600); font-weight: 600; font-size: .875rem; border: 1px solid var(--brand-100); }
.credit-pill:hover { background: var(--brand-100); color: var(--brand-600); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--brand-100); color: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; }
.dropdown-menu { border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 12px; padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .45rem .75rem; }

/* ---------- Thẻ / khối ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.page-title { font-weight: 700; letter-spacing: -.02em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--brand); }
.stat { padding: 1.1rem 1.25rem; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.table { --bs-table-bg: transparent; }
.table > thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600;
  border-bottom-width: 1px; white-space: nowrap; }
.table > tbody td { vertical-align: middle; }
.badge-status { font-weight: 600; font-size: .72rem; padding: .35em .65em; border-radius: 999px; }
.st-PAID { background: #dcfce7; color: #166534; } .st-PENDING { background: #fef9c3; color: #854d0e; }
.st-CANCELLED, .st-EXPIRED { background: #f1f5f9; color: #475569; } .st-FAILED { background: #fee2e2; color: #991b1b; }
.amount-pos { color: #16a34a; font-weight: 600; } .amount-neg { color: #dc2626; font-weight: 600; }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .6rem .8rem; }
.form-select { padding-right: 2.4rem; background-position: right .8rem center; }   /* chừa chỗ cho mũi tên — chữ không đè lên */
.form-select[multiple], .form-select[size]:not([size="1"]) { padding-right: .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem var(--brand-100); }
.form-label { font-weight: 500; font-size: .9rem; }
/* ---------- Thông báo nổi (templates/_notices.html · static/js/notice.js) ---------- */
.ntc-stack { position: fixed; top: calc(72px + env(safe-area-inset-top)); right: 20px; z-index: 2100; width: min(380px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.ntc { --c: #2563eb; --bg: #eff6ff; position: relative; display: grid; grid-template-columns: 38px 1fr 26px; gap: 12px; align-items: start;
  padding: 12px 12px 14px 14px; border-radius: 16px; overflow: hidden; pointer-events: auto; color: #0f172a;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid rgba(15, 23, 42, .07); box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 18px 40px -16px rgba(15, 23, 42, .32);
  animation: ntcIn .45s cubic-bezier(.2, .8, .2, 1) backwards; transition: opacity .3s ease, transform .3s ease, height .3s ease, margin .3s ease, padding .3s ease; }
@keyframes ntcIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.ntc + .ntc { animation-delay: .08s; }
.ntc.out { opacity: 0; transform: translateX(24px); padding-top: 0; padding-bottom: 0; margin-top: -10px; }
.ntc-success { --c: #16a34a; --bg: #dcfce7; } .ntc-warning { --c: #d97706; --bg: #fef3c7; } .ntc-danger { --c: #dc2626; --bg: #fee2e2; }
.ntc-bye { --c: #475569; --bg: #f1f5f9; } .ntc-credit { --c: #b45309; --bg: #fef3c7; } .ntc-welcome { --c: #7c3aed; --bg: #ede9fe; }
.ntc-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); color: var(--c); font-size: 1.15rem; position: relative; }
.ntc-av { border-radius: 50%; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-weight: 700; font-size: 1rem; }
.ntc-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ntc-wave { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: .9rem; transform-origin: 70% 80%; animation: ntcWave 1.4s ease-in-out .3s 2; }
@keyframes ntcWave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(16deg); } 40%, 80% { transform: rotate(-8deg); } }
.ntc-body { min-width: 0; padding-top: 1px; font-size: .9rem; line-height: 1.45; }
.ntc-title { display: block; font-weight: 650; font-size: .93rem; letter-spacing: -.005em; margin-bottom: 1px; }
.ntc-title + .ntc-text { color: #64748b; font-size: .84rem; }
.ntc-body:not(:has(.ntc-title)) .ntc-text { padding-top: 8px; font-weight: 500; }
.ntc-text a { color: var(--c); font-weight: 600; }
.ntc-text .bi-coin { color: #f59e0b; }
.ntc-x { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: #94a3b8; display: grid; place-items: center; font-size: 1.15rem; padding: 0; }
.ntc-x:hover { background: #f1f5f9; color: #0f172a; }
.ntc-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--c); opacity: .55; transform-origin: left;
  animation: ntcBar var(--ms, 4500ms) linear forwards; }
.ntc.paused .ntc-bar { animation-play-state: paused; }
@keyframes ntcBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 575.98px) {
  .ntc-stack { top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px; width: auto; }
  .ntc.out { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) { .ntc, .ntc.out { transition: none; animation: none; transform: none; } .ntc-wave { animation: none; } }

/* ---------- Đăng nhập ---------- */
.auth-wrap { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; padding: 2rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Bảng giá ---------- */
.price-card { position: relative; padding: 1.75rem; height: 100%; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.price-card .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 600; padding: .25rem .75rem; border-radius: 999px; white-space: nowrap; }
.price-card .price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.price-card .credits { font-size: 1.05rem; font-weight: 600; color: var(--brand-600); }

/* ---------- Admin ---------- */
.admin-side { position: sticky; top: 84px; }
.admin-side a { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 10px; color: var(--muted);
  font-weight: 500; font-size: .92rem; }
.admin-side a:hover { background: #f1f5f9; color: var(--ink); }
.admin-side a.active { background: var(--brand-50); color: var(--brand-600); }
.admin-side .sep { height: 1px; background: var(--line); margin: .6rem .5rem; }

/* ---------- Footer ---------- */
.app-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* ---------- Trang Setup / Wizard (giữ nguyên) ---------- */
.setup-nav { top: 80px; }
.setup-nav a { display: block; padding: .3rem .5rem; border-radius: .375rem; color: var(--bs-body-color); font-size: .875rem; }
.setup-nav a:hover { background: var(--bs-secondary-bg); }
section[id] { scroll-margin-top: 80px; }
.status-dot { width: .75rem; height: .75rem; border-radius: 50%; flex: none; background: var(--bs-secondary-bg); }
.status-dot[data-status="ok"] { background: var(--bs-success); }
.status-dot[data-status="warn"] { background: var(--bs-warning); }
.status-dot[data-status="fail"] { background: var(--bs-danger); }
.status-dot[data-status="skip"] { background: var(--bs-gray-400); }
.status-dot[data-status="running"] { background: var(--brand); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.check-card[data-status="fail"] { border-color: var(--bs-danger-border-subtle); }
.check-card[data-status="warn"] { border-color: var(--bs-warning-border-subtle); }
.check-steps li { display: flex; gap: .4rem; padding: .15rem 0; word-break: break-word; }
.check-steps .ic { flex: none; width: 1rem; }
.cmd-box { position: relative; background: #1e2430; color: #e6e9ef; border-radius: .5rem; margin-top: .35rem; }
.cmd-box pre { padding: .6rem 2.8rem .6rem .8rem; font-size: .8rem; white-space: pre-wrap; word-break: break-all; color: inherit; }
.cmd-box .copy-btn { position: absolute; top: .35rem; right: .35rem; padding: .1rem .4rem; }
.badge.src-default { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.badge.src-env, .badge.src-env { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.wizard-steps { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.wizard-steps a { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: .5rem;
  color: var(--bs-body-color); font-size: .875rem; }
.wizard-steps a:hover { background: var(--bs-secondary-bg); }
.wizard-steps a.active { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.wizard-steps .num { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--bs-secondary-bg); font-size: .75rem; flex: none; }
.wizard-steps a.active .num { background: var(--brand); color: #fff; }
.wiz-section { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.sec-num { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: .75rem; margin-right: .35rem; }
.wiz-tasks { padding-left: 1.2rem; }
.wiz-tasks > li { margin-bottom: 1rem; }
.cmd-box .cmd-actions { position: absolute; top: .35rem; right: .35rem; display: flex; gap: .25rem; }
.cmd-box .cmd-actions .copy-btn { position: static; }
.wiz-tasks .cmd-box pre { padding-right: 9rem; }
.run-log { background: #11151c; color: #d8dee9; border-radius: .375rem; padding: .75rem; font-size: .78rem;
  max-height: 55vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ---------- Điện thoại / app (PWA) ---------- */
html { -webkit-tap-highlight-color: transparent; }
.app-nav { padding-top: calc(.5rem + env(safe-area-inset-top)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 58px; color: var(--muted); font-size: .7rem; font-weight: 500; }
.bottom-nav a i { font-size: 1.3rem; line-height: 1; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a.active i { transform: translateY(-1px); }
@media (max-width: 991.98px) {
  body.has-bottom-nav { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .app-footer { display: none; }
  .btn, .form-control, .form-select { min-height: 42px; }
  .btn-sm { min-height: 34px; }
}
.is-standalone .app-footer { display: none; }
.pwa-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .75rem; font-size: .92rem; }
.pwa-steps li { display: flex; gap: .75rem; align-items: center; }
.pwa-steps .ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.pwa-toast-wrap { top: calc(70px + env(safe-area-inset-top)); z-index: 1080; }

/* ---------- Trang nội dung (điều khoản, bảo mật) ---------- */
.legal { max-width: 820px; padding: 2rem 2.25rem; line-height: 1.7; }
.legal h2 { font-size: 1.05rem; font-weight: 700; margin-top: 1.75rem; }
@media (max-width: 575.98px) { .legal { padding: 1.25rem; border-radius: 0; border-left: 0; border-right: 0; } }

/* ---------- Tài khoản ---------- */
.account-head { display: flex; align-items: center; gap: 1rem; }
.account-head .avatar { width: 64px; height: 64px; font-size: 1.5rem; }
.list-menu { list-style: none; padding: 0; margin: 0; }
.list-menu a, .list-menu button { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem 1rem; color: var(--ink);
  background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font-weight: 500; }
.list-menu li:first-child a, .list-menu li:first-child button { border-top: 0; }
.list-menu a:hover, .list-menu button:hover { background: #f8fafc; }
.list-menu .bi:first-child { width: 1.4rem; font-size: 1.15rem; color: var(--brand); }
.list-menu .chev { margin-left: auto; color: var(--muted); }

/* ---------- Thương hiệu (Setup) ---------- */
.share-mock { max-width: 460px; border: 1px solid #dadde1; border-radius: 10px; overflow: hidden; background: #fff; }
.share-mock img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.share-mock-body { padding: .6rem .8rem .7rem; background: #f0f2f5; border-top: 1px solid #dadde1; }
.share-mock-domain { font-size: .72rem; color: #65676b; letter-spacing: .02em; }
.share-mock-title { font-weight: 600; color: #050505; line-height: 1.3; margin-top: .1rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.share-mock-desc { font-size: .82rem; color: #65676b; margin-top: .15rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.brand-preview { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.brand-preview figure { margin: 0; text-align: center; font-size: .75rem; color: var(--muted); }
.brand-preview img { display: block; margin: 0 auto .35rem; background: repeating-conic-gradient(#eef2f7 0 25%, #fff 0 50%) 0 0 / 14px 14px; }

/* ---------- Nút quay lại (chỉ hiện khi mở như app trên điện thoại) + thông báo nhanh ---------- */
.nav-back { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: .25rem;
  border: 0; border-radius: 10px; background: #f1f5f9; color: var(--ink); font-size: 1.1rem; }
.is-standalone .nav-back { display: inline-flex; }
.app-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 2100;
  display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px); pointer-events: none; }
.app-toast { background: #0f172a; color: #fff; padding: .7rem 1rem; border-radius: 12px; font-size: .9rem;
  box-shadow: 0 12px 30px -10px rgba(15,23,42,.5); transition: opacity .4s, transform .4s; }
.app-toast.ok .bi { color: #4ade80; } .app-toast.err { background: #991b1b; }
.app-toast.hide { opacity: 0; transform: translateY(8px); }
@media (min-width: 992px) { .app-toasts { bottom: 24px; } }
.is-standalone .d-standalone-none { display: none !important; }

/* ---------- Hạng thành viên ---------- */
.plan-badge { font-weight: 600; border-radius: 999px; padding: .3em .7em; }
.plan-free { background: #f1f5f9; color: #475569; }
.plan-plus { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }
.plan-pro { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.perk-list { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.perk-list li { display: flex; gap: .5rem; padding: .22rem 0; }
.perk-list li .bi { color: var(--brand); flex: none; margin-top: .1rem; }
.perk-list li.main { font-weight: 600; }
.plans-table th, .plans-table td { text-align: center; vertical-align: middle; }
.plans-table td:first-child, .plans-table th:first-child { text-align: left; }
.plans-table .cur { background: var(--brand-50); }
.price-card .per { font-size: .8rem; color: var(--muted); }
/* link theo màu thương hiệu (Bootstrap dùng --bs-link-color-rgb cố định).
   :where() → độ ưu tiên bằng thẻ «a» thường: mọi thành phần tự đặt màu chữ cho link (chip, thẻ, nút đang chọn…) luôn thắng,
   không bị tô màu thương hiệu đè lên (lỗi cũ: chip đang chọn nền tối nhưng chữ tím, khó đọc). */
a:where(:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand)) { color: var(--brand); }
a:where(:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand)):hover { color: var(--brand-600); }
.text-reset { color: inherit !important; }
/* ---------- Admin: tổng quan ---------- */
.delta { font-weight: 600; } .delta.up { color: #16a34a; } .delta.down { color: #dc2626; }
.insight-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: .45rem; }
.stat-project { border-left: 3px solid var(--brand); }
.first-bonus { max-width: 760px; display: flex; gap: .6rem; align-items: center; justify-content: center; padding: .75rem 1rem;
  border-radius: 14px; background: linear-gradient(90deg, #fef3c7, #fde68a); color: #78350f; }
.referral-card { background: linear-gradient(135deg, var(--brand-50), #fff); }
.flex-none { flex: none; }

/* ---------- Bảng gợi ý cài app ---------- */
.pwa-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045; background: #fff; border-radius: 20px 20px 0 0;
  padding: 1.1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -18px 40px -16px rgba(15, 23, 42, .35);
  transform: translateY(105%); transition: transform .25s ease; }
.pwa-sheet.show { transform: translateY(0); }
.pwa-sheet-close { position: absolute; top: .9rem; right: .9rem; }
.pwa-sheet-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 6px 16px -8px rgba(15,23,42,.4); }
.pwa-shots { display: flex; gap: .5rem; overflow-x: auto; margin: .9rem 0 .2rem; }
.pwa-shots img { height: 150px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.pwa-sheet-perks { list-style: none; padding: 0; margin: .8rem 0 1rem; color: var(--muted); }
.pwa-sheet-perks li { display: flex; gap: .5rem; padding: .15rem 0; } .pwa-sheet-perks .bi { color: var(--brand); }
@media (min-width: 992px) { .pwa-sheet { left: auto; right: 1.5rem; bottom: 1.5rem; width: 380px; border-radius: 20px; } }
.pwa-arrow { position: fixed; left: 50%; bottom: calc(6px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2000;
  font-size: 2.4rem; color: var(--brand); animation: pwa-bounce 1s infinite; pointer-events: none;
  text-shadow: 0 2px 6px rgba(255,255,255,.9); }
.pwa-arrow.top { top: 6px; bottom: auto; left: auto; right: 70px; transform: none; }
.pwa-arrow.top .bi::before { transform: rotate(180deg); display: inline-block; }
@keyframes pwa-bounce { 50% { margin-bottom: 10px; } }

/* hộp xác nhận (window.appConfirm) */
.app-confirm { border-radius: 18px; border: 0; }
.app-confirm-ic { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #fee2e2; color: #dc2626;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }

/* thanh gợi ý mở bằng trình duyệt thật (khi đang ở trong Zalo / Facebook) */
.inapp-bar { position: relative; z-index: 1035; display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem;
  background: var(--brand); color: var(--on-brand, #fff); font-size: .82rem; line-height: 1.3; }
.inapp-bar .btn-light { font-weight: 600; padding: .25rem .8rem; }
.inapp-bar .btn-close { font-size: .7rem; }

/* khoá app (vân tay / Face ID) */
.app-lock { display: none; }
html.app-locked body > *:not(.app-lock):not(script) { visibility: hidden !important; }
html.app-locked .app-lock { display: flex; position: fixed; inset: 0; z-index: 3000; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand), var(--brand-600)); color: #fff; text-align: center; padding: 24px; }
.app-lock-box img { border-radius: 18px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.list-menu .list-switch { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; margin: 0; cursor: pointer; width: 100%;
  border-top: 1px solid var(--line); font-weight: 500; }
.list-menu li:first-child .list-switch { border-top: 0; }
.list-menu .list-switch small { font-size: .75rem; }

/* nút hỗ trợ nổi (Zalo) */
.support-fab { position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 1025; display: flex;
  align-items: center; gap: .4rem; height: 48px; padding: 0 14px 0 12px; border-radius: 999px; background: #0068ff; color: #fff !important;
  text-decoration: none; box-shadow: 0 8px 22px -6px rgba(0,104,255,.6); font-weight: 600; font-size: .9rem; transition: transform .15s; }
.support-fab:hover { transform: translateY(-2px); color: #fff !important; }
.support-fab.away { transform: translateX(calc(100% + 24px)); }
.support-fab i { font-size: 1.25rem; }
.support-fab-tag { font-size: .62rem; font-weight: 700; letter-spacing: .02em; background: rgba(255,255,255,.22); border-radius: 6px; padding: 1px 5px; }
body:not(.has-bottom-nav) .support-fab { bottom: calc(18px + env(safe-area-inset-bottom)); }
body.has-action-bar .support-fab { bottom: calc(150px + env(safe-area-inset-bottom)); }
@media (max-width: 575.98px) {
  .support-fab { width: 48px; padding: 0; justify-content: center; }
  .support-fab-text { display: none; }
  .support-fab-tag { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: #fff; color: #0068ff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2); }
}
@media (min-width: 992px) { .support-fab, body.has-action-bar .support-fab { bottom: 24px; right: 24px; } }
html.app-locked .support-fab { display: none; }
@media print { .support-fab { display: none; } }
.min-w-0 { min-width: 0; }

/* ---------- mạng xã hội & chân trang ---------- */
.app-footer { border-top: 1px solid rgba(15, 23, 42, .07); background: linear-gradient(180deg, rgba(var(--brand-rgb), .03), rgba(var(--brand-rgb), .07)); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 0 1rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.footer-brand img { border-radius: 11px; box-shadow: 0 6px 16px -8px rgba(var(--brand-rgb), .6); }
.footer-follow { display: flex; align-items: center; gap: .85rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .9rem 0 1.2rem; border-top: 1px solid rgba(15, 23, 42, .06); font-size: .875rem; color: var(--muted, #64748b); }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }
.social-row { display: inline-flex; align-items: center; gap: .5rem; }
.social-row .social-btn { --c: var(--brand); width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 1.1rem;
  color: #0f172a !important; background: #fff; border: 1px solid rgba(15, 23, 42, .1); text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease; }
.social-row .social-btn:hover, .social-row .social-btn:focus-visible { transform: translateY(-2px); color: #fff !important; background: var(--c); border-color: var(--c);
  box-shadow: 0 10px 22px -10px var(--c); }
.social-facebook { --c: #1877F2 !important; } .social-youtube { --c: #FF0000 !important; } .social-tiktok { --c: #111 !important; }
.social-tiktok:hover i { text-shadow: -1.5px -1px 0 #25F4EE, 1.5px 1px 0 #FE2C55; }
.social-sm .social-btn { width: 32px; height: 32px; border-radius: 9px; font-size: .95rem; }
.social-lg .social-btn { width: 52px; height: 52px; border-radius: 15px; font-size: 1.4rem; }
@media (max-width: 575.98px) { .footer-top { padding-top: 1.1rem; } .footer-follow { width: 100%; justify-content: space-between; } }

/* =====================================================================
   Blog (bộ khung)
   ===================================================================== */
.blog-wrap { max-width: 1120px; margin: 0 auto; }
.blog-hero { text-align: center; padding: 1.5rem 0 1.75rem; }
.blog-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; margin: .35rem 0 .5rem; }
.blog-hero p { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }
.bcats { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.1rem; }
.bcats a { padding: .38rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .88rem; font-weight: 500; }
.bcats a:hover { border-color: var(--brand-100); color: var(--brand); }
.bcats a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.bcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease; }
.bcard:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(15, 23, 42, .35); }
.bcard-cover { display: block; aspect-ratio: 16 / 9; background: var(--brand-50); overflow: hidden; }
.bcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.bcard:hover .bcard-cover img { transform: scale(1.03); }
.bcard-ph { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .35rem; padding: 1.4rem 1.6rem;
  color: var(--ink); background: radial-gradient(circle at 30% 20%, var(--brand-100), var(--brand-50) 60%); }
/* bài chưa có ảnh bìa: bìa chữ (tên web + chuyên mục) thay vì icon trống — không lặp tiêu đề đã có ngay bên dưới */
.bcard-ph small { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-600); font-weight: 600; }
.bcard-ph b { font-family: var(--blog-display, inherit); font-weight: var(--blog-display-weight, 700); font-size: 1.9rem; font-style: italic; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-big .bcard-ph b { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.bcard-body { padding: 1.05rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.bchip { align-self: flex-start; font-size: .74rem; font-weight: 600; letter-spacing: .02em; color: var(--brand-600); background: var(--brand-50);
  padding: .18rem .6rem; border-radius: 999px; }
.bcard-title { font-size: 1.08rem; font-weight: 700; line-height: 1.38; margin: 0; letter-spacing: -.01em; }
.bcard-title a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { color: var(--brand); }
.bcard-sum { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bmeta { margin-top: auto; padding-top: .3rem; display: flex; gap: .4rem; color: var(--muted); font-size: .8rem; }
.bcard-big { flex-direction: row; margin-bottom: 1.6rem; }
.bcard-big .bcard-cover { flex: 0 0 56%; aspect-ratio: auto; min-height: 330px; }
.bcard-big .bcard-body { padding: 2rem 2rem 1.8rem; justify-content: center; gap: .7rem; }
.bcard-big .bcard-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.25; }
.bcard-big .bcard-sum { font-size: 1rem; -webkit-line-clamp: 4; }
.bpager { display: flex; justify-content: space-between; align-items: center; margin: 2rem 0 .5rem; }
.bpager a { padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 500; }
.blog-empty { text-align: center; color: var(--muted); padding: 4rem 0; } .blog-empty i { font-size: 2.5rem; }
@media (max-width: 991.98px) { .bgrid { grid-template-columns: repeat(2, 1fr); } .bcard-big { flex-direction: column; } .bcard-big .bcard-cover { min-height: 0; aspect-ratio: 16/9; } }
@media (max-width: 575.98px) { .bgrid { grid-template-columns: 1fr; gap: 1rem; } .bcard-big .bcard-body { padding: 1.2rem; } }

/* bài viết */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-600)); transition: width .1s linear; }
.post { max-width: 1120px; margin: 0 auto; }
.post-head { max-width: 760px; margin: .5rem auto 1.5rem; }
.post-crumb { display: flex; align-items: center; gap: .4rem; font-size: .86rem; font-weight: 500; margin-bottom: .8rem; }
.post-crumb i { font-size: .7rem; color: var(--muted); }
.post-head h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin-bottom: .8rem; }
.post-lead { font-size: 1.15rem; line-height: 1.65; color: #334155; margin-bottom: 1.2rem; }
.post-meta { display: flex; align-items: center; gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.post-meta > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; }
.post-meta small { color: var(--muted); font-size: .82rem; }
.post-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-600)); }
.post-cover { max-width: 980px; margin: 0 auto 2rem; }
.post-cover img { width: 100%; border-radius: 20px; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .5); }
.post-grid { display: grid; grid-template-columns: minmax(0, 760px) 240px; gap: 3rem; justify-content: center; }
.post-body { font-size: 1.08rem; line-height: 1.8; color: #1e293b; min-width: 0; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.015em; margin: 2.4rem 0 .9rem; scroll-margin-top: 90px; line-height: 1.3; }
.post-body h3 { font-size: 1.22rem; font-weight: 700; margin: 1.8rem 0 .6rem; scroll-margin-top: 90px; }
.post-body p { margin: 0 0 1.15rem; }
.post-body a { color: var(--brand-600); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a.btn { text-decoration: none; color: #fff; }
.post-body ul, .post-body ol { padding-left: 1.4rem; margin-bottom: 1.2rem; }
.post-body li { margin-bottom: .45rem; } .post-body li::marker { color: var(--brand); font-weight: 600; }
.post-body img { max-width: 100%; height: auto; border-radius: 14px; margin: .6rem 0; border: 1px solid var(--line); }
.post-body figure { margin: 1.6rem 0; } .post-body .post-fig img { display: block; width: 100%; height: auto; margin: 0; } .post-body figcaption { text-align: center; color: var(--muted); font-size: .88rem; margin-top: .3rem; }
.post-body blockquote { margin: 1.6rem 0; padding: .9rem 1.2rem; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 12px 12px 0; color: #1e3a8a; }
.post-body blockquote p:last-child { margin: 0; }
.post-body code { background: #f1f5f9; padding: .1rem .35rem; border-radius: 6px; font-size: .9em; color: #0f172a; }
.post-body pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.2rem; border-radius: 12px; overflow-x: auto; font-size: .9rem; }
.post-body pre code { background: none; color: inherit; padding: 0; }
.post-body .table-responsive { margin: 1.6rem 0; border: 1px solid var(--brand-100); border-radius: 14px; background: #fff;
  box-shadow: 0 14px 30px -26px rgba(15, 23, 42, .45); }
.post-body table { margin: 0; font-size: .95rem; line-height: 1.55; }
.post-body table thead th { background: var(--brand-50); color: var(--brand-600); font-size: .76rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; white-space: nowrap; border-bottom: 2px solid var(--brand-100); padding: .75rem .9rem; }
.post-body table td { padding: .7rem .9rem; border-bottom: 1px solid #eef2f7; vertical-align: top; color: #334155; }
.post-body table tbody tr:nth-child(even) > td { background: #fafcff; background: color-mix(in srgb, var(--brand) 3%, #fff); }
.post-body table tbody tr:hover > td { background: var(--brand-50); }
.post-body table tbody tr:last-child > td { border-bottom: 0; }
.post-body table td:first-child { font-weight: 650; color: var(--ink); }
.post-body .table-responsive { position: relative; }
.post-body .table-responsive.wide::before { content: "Vuốt ngang để xem hết bảng"; position: sticky; left: 0; display: block; padding: .35rem .9rem;
  font-size: .75rem; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); }
.post-body .table-responsive.more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.post-body .yn { display: inline-flex; align-items: center; gap: .25rem; padding: .08rem .55rem .08rem .45rem; border-radius: 999px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.post-body .yn.y { background: #ecfdf5; color: #047857; } .post-body .yn.n { background: #f1f5f9; color: #64748b; }
@media (max-width: 575.98px) { .post-body table { font-size: .88rem; } .post-body table td, .post-body table thead th { padding: .6rem .7rem; }
  .post-body table td { min-width: 8.5rem; } .post-body table td:first-child { min-width: 7rem; } }
/* tiêu đề, danh sách, chữ đậm, ảnh — nét chung của bài */
.post-body h2::before { content: ""; display: block; width: 2.4rem; height: 4px; border-radius: 4px; margin-bottom: .75rem;
  background: linear-gradient(90deg, var(--brand), var(--brand-100)); }
.post-body h3 { color: var(--ink); }
.post-body strong { color: #0f172a; font-weight: 700; }
.post-body > ul { list-style: none; padding-left: .2rem; }
.post-body > ul > li { position: relative; padding-left: 1.45rem; }
.post-body > ul > li::before { content: ""; position: absolute; left: .2rem; top: .72em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.post-body > ol { list-style: none; padding-left: .2rem; counter-reset: ol; }
.post-body > ol > li { position: relative; padding-left: 2.1rem; counter-increment: ol; }
.post-body > ol > li::before { content: counter(ol); position: absolute; left: 0; top: .2em; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--brand-50); color: var(--brand-600); font-size: .8rem; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.post-body .post-fig img { border-radius: 16px; box-shadow: 0 20px 40px -30px rgba(15, 23, 42, .55); }
.post-body .post-fig figcaption { margin-top: .55rem; font-size: .86rem; }
.post-body .post-fig figcaption::before { content: "\F42A"; font-family: "bootstrap-icons"; margin-right: .35rem; color: var(--brand); }
/* :::sources — căn cứ / nguồn tham khảo */
.post-src { margin: 1.8rem 0; padding: 1rem 1.15rem; border-radius: 16px; border: 1px solid var(--line); background: #f8fafc; }
.post-src-t { font-weight: 800; font-size: .95rem; display: flex; gap: .45rem; align-items: center; margin-bottom: .55rem; color: var(--ink); }
.post-src-t i { color: var(--brand); }
.post-body .post-src ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.post-body .post-src li { position: relative; margin: 0; padding: .45rem .7rem .45rem 2.1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-size: .93rem; line-height: 1.5; }
.post-body .post-src li::before { content: "\F38B"; font-family: "bootstrap-icons"; position: absolute; left: .7rem; top: .45rem; color: var(--brand); }
.post-body hr { margin: 2.2rem 0; opacity: .12; }
.callout { margin: 1.6rem 0; padding: 1rem 1.2rem; border-radius: 14px; border: 1px solid; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; margin-bottom: .35rem; display: flex; gap: .45rem; align-items: center; }
.callout-tip { background: #f0fdf4; border-color: #bbf7d0; } .callout-tip .callout-title { color: #15803d; }
.callout-note { background: var(--brand-50); border-color: var(--brand-100); } .callout-note .callout-title { color: var(--brand-600); }
.callout-warning { background: #fffbeb; border-color: #fde68a; } .callout-warning .callout-title { color: #b45309; }
.callout-success { background: #ecfdf5; border-color: #a7f3d0; } .callout-success .callout-title { color: #047857; }
/* Khối trình bày bài viết (blog/render.py → BLOCK_GUIDE) */
.post-summary { margin: 1.6rem 0; padding: 1.1rem 1.3rem 1.1rem 1.25rem; border-radius: 16px; background: linear-gradient(135deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100); box-shadow: var(--shadow-sm); }
.post-summary-t { font-weight: 800; color: var(--brand-600); display: flex; gap: .45rem; align-items: center; margin-bottom: .5rem; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .03em; }
.post-summary ul { margin: 0; padding-left: 1.2rem; } .post-summary li { margin-bottom: .35rem; }
.post-steps ol { list-style: none; padding: 0; margin: 1.4rem 0; counter-reset: st; display: grid; gap: .7rem; }
.post-steps ol > li { counter-increment: st; position: relative; padding: .95rem 1.1rem .95rem 4rem; margin: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.post-steps ol > li::before { content: counter(st); position: absolute; left: 1rem; top: .85rem; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .95rem; }
.post-steps ol > li:not(:last-child)::after { content: ""; position: absolute; left: 2.08rem; top: 3.15rem; bottom: -.75rem; width: 2px; background: var(--brand-100); }
.post-steps ol > li > :last-child { margin-bottom: 0; }
.post-check ul { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .5rem; }
.post-check li { position: relative; padding-left: 2rem; margin: 0; }
.post-check li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .1rem; width: 1.35rem; height: 1.35rem;
  border-radius: 50%; background: #dcfce7; color: #15803d; display: grid; place-items: center; font-size: .95rem; line-height: 1; }
.post-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1.6rem 0; }
.post-stat { padding: 1rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .2rem; }
.post-stat b { font-size: 1.75rem; line-height: 1.15; font-weight: 800; color: var(--brand-600); letter-spacing: -.02em; }
.post-stat span { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.post-compare { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.6rem 0; }
.post-compare-col { padding: 1rem 1.15rem; border-radius: 14px; border: 1px solid var(--line); background: #f8fafc; border-top: 4px solid #cbd5e1; }
.post-compare-col.c1 { border-top-color: var(--brand); }
.post-compare-col.c1 { background: var(--brand-50); border-color: var(--brand-100); }
.post-compare-h { font-weight: 800; margin-bottom: .5rem; font-size: 1rem; }
.post-compare-col.c0 .post-compare-h { color: #64748b; } .post-compare-col.c1 .post-compare-h { color: var(--brand-600); }
.post-compare-col ul { margin: 0; padding-left: 1.1rem; } .post-compare-col > :last-child { margin-bottom: 0; }
.post-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 1.6rem 0; }
.post-card { padding: 1rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .98rem; }
.post-card-h { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; line-height: 1.3; }
.post-card-h i { flex: 0 0 2.3rem; height: 2.3rem; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 1.15rem; }
.post-card > :last-child { margin-bottom: 0; }
.post-faq { margin: 1.4rem 0; display: grid; gap: .55rem; }
.post-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.post-faq summary { cursor: pointer; padding: .85rem 2.6rem .85rem 1.1rem; font-weight: 700; list-style: none; position: relative; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "\F282"; font-family: "bootstrap-icons"; position: absolute; right: 1rem; top: .9rem; color: var(--muted); transition: transform .2s; }
.post-faq details[open] summary::after { transform: rotate(180deg); }
.post-faq-a { padding: 0 1.1rem .9rem; color: #334155; } .post-faq-a > :last-child { margin-bottom: 0; }
.post-quote { margin: 2rem 0; } .post-quote blockquote { margin: 0; border: 0; background: none; padding: 0 0 0 1.2rem; border-left: 4px solid var(--brand);
  font-size: 1.25rem; line-height: 1.55; font-weight: 600; color: var(--ink); border-radius: 0; }
.post-quote figcaption { margin-top: .5rem; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; text-align: left; }
@media (max-width: 575.98px) { .post-compare { grid-template-columns: 1fr; } .post-steps ol > li { padding-left: 3.4rem; }
  .post-steps ol > li::before { left: .75rem; } .post-steps ol > li:not(:last-child)::after { left: 1.83rem; } }
.callout-danger { background: #fef2f2; border-color: #fecaca; } .callout-danger .callout-title { color: #b91c1c; }
.post-blk-t { font-weight: 800; font-size: 1rem; margin-bottom: .8rem; color: var(--ink); }
/* :::highlight — thông điệp chốt */
.post-hl { margin: 2rem 0; padding: 1.4rem 1.5rem; border-radius: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--brand-600)); box-shadow: 0 22px 44px -28px var(--brand); font-size: 1.15rem; line-height: 1.55; font-weight: 600; }
.post-hl::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.1); }
.post-hl-t { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; margin-bottom: .35rem; font-weight: 700; }
.post-hl > :last-child { margin-bottom: 0; } .post-body .post-hl a { color: #fff; text-decoration: underline; } .post-hl strong { color: #fff; }
/* :::timeline — cột mốc | đường ray + chấm | thẻ; đường ray vẽ theo từng mốc nên luôn thẳng hàng với chấm */
.post-tl-w { margin: 2rem 0; padding: 1.25rem 1.35rem 1.1rem; border: 1px solid var(--brand-100); border-radius: 18px;
  background: linear-gradient(180deg, var(--brand-50), #fff 140px); }
.post-tl-w .post-blk-t { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem; }
.post-tl-w .post-blk-t::before { content: "\F1F1"; font-family: "bootstrap-icons"; font-weight: 400; color: var(--brand); font-size: 1.05rem; }
.post-body .post-tl { list-style: none; margin: 0; padding: 0; --tl-d: 7.5rem; --tl-r: 2.4rem; }
.post-body .post-tl > li { display: grid; grid-template-columns: var(--tl-d) var(--tl-r) minmax(0, 1fr); margin: 0; padding: 0 0 .85rem; position: relative; }
.post-body .post-tl > li:last-child { padding-bottom: 0; }
.post-tl > li::after { content: ""; position: absolute; left: calc(var(--tl-d) + var(--tl-r) / 2 - 1px); top: 1.4rem; bottom: -.05rem; width: 2px;
  background: linear-gradient(var(--brand), var(--brand-100)); opacity: .55; }
.post-tl > li:last-child::after { display: none; }
.post-tl > li::before { content: ""; position: absolute; left: calc(var(--tl-d) + var(--tl-r) / 2 - 7px); top: .95rem; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-50); z-index: 1; }
.post-tl-d { grid-column: 1; text-align: right; font-weight: 800; color: var(--brand-600); font-size: .9rem; line-height: 1.3; padding: .85rem 0 0; }
.post-tl-c { grid-column: 3; padding: .75rem 1rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm);
  font-size: .98rem; line-height: 1.65; transition: border-color .2s, box-shadow .2s; }
.post-tl > li:hover .post-tl-c { border-color: var(--brand-100); box-shadow: 0 12px 26px -20px var(--brand); }
.post-tl-c > :last-child { margin-bottom: 0; } .post-tl-h { font-weight: 700; color: var(--ink); margin-bottom: .15rem; }
@media (max-width: 575.98px) {
  .post-tl-w { padding: 1rem .9rem .9rem; }
  .post-body .post-tl { --tl-d: 0px; --tl-r: 1.6rem; }
  .post-body .post-tl > li { grid-template-columns: var(--tl-r) minmax(0, 1fr); }
  .post-tl > li::before { top: .15rem; } .post-tl > li::after { top: .9rem; }
  .post-tl-d { grid-column: 2; justify-self: start; text-align: left; padding: .1rem .6rem; margin-bottom: .4rem; border-radius: 999px;
    background: var(--brand-50); font-size: .8rem; }
  .post-tl-c { grid-column: 2; } }
/* :::progress */
.post-bars { margin: 1.8rem 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.post-bar + .post-bar { margin-top: .85rem; }
.post-bar-l { display: flex; justify-content: space-between; gap: 1rem; font-size: .93rem; margin-bottom: .3rem; }
.post-bar-l b { color: var(--brand-600); font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-bar-t { height: 10px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.post-bar-t i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-600));
  transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.bfx .post-bars:not(.in) .post-bar-t i { width: 0; }
/* :::tabs — không có JS: hiện hết các thẻ nối tiếp nhau */
.post-tabs { margin: 1.8rem 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.post-tabs-nav { display: none; }
.post-tabs.js .post-tabs-nav { display: flex; gap: .25rem; padding: .4rem; background: #f1f5f9; overflow-x: auto; scrollbar-width: none; }
.post-tabs-nav button { flex: 1 1 0; border: 0; background: none; padding: .5rem .95rem; border-radius: 10px; font-weight: 600; font-size: .92rem; color: #475569; white-space: nowrap; }
.post-tabs-nav button[aria-selected="true"] { background: #fff; color: var(--brand-600); box-shadow: var(--shadow-sm); }
.post-tab { padding: 1rem 1.2rem; } .post-tab + .post-tab { border-top: 1px solid var(--line); } .post-tab > :last-child { margin-bottom: 0; }
.post-tab-h { font-weight: 800; margin-bottom: .5rem; color: var(--brand-600); }
.post-tabs.js .post-tab { display: none; border-top: 0; } .post-tabs.js .post-tab.on { display: block; animation: postTab .25s ease; }
.post-tabs.js .post-tab-h { display: none; }
@keyframes postTab { from { opacity: 0; transform: translateY(4px); } }
/* hiện dần khi cuộn (chỉ khi có JS và không bật giảm chuyển động) */
.bfx .post-tl > li, .bfx .post-steps li, .bfx .post-card, .bfx .post-stat, .bfx .post-bars, .bfx .post-hl, .bfx .post-compare-col {
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
.bfx .post-tl > li:not(.in), .bfx .post-steps li:not(.in), .bfx .post-card:not(.in), .bfx .post-stat:not(.in), .bfx .post-bars:not(.in),
.bfx .post-hl:not(.in), .bfx .post-compare-col:not(.in) { opacity: 0; transform: translateY(16px); }
.post-cta { display: flex; align-items: center; gap: 1rem; margin: 2rem 0; padding: 1.15rem 1.25rem; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-600)); box-shadow: 0 20px 40px -26px var(--brand); }
.post-cta-ic { flex: 0 0 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: 1.5rem; }
.post-cta-body { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.post-cta-body b { font-size: 1.08rem; } .post-cta-body span { opacity: .88; font-size: .93rem; }
.post-body .post-cta-btn, .post-cta-btn { background: #fff !important; color: var(--brand-600) !important; border: 0; font-weight: 700; white-space: nowrap; padding: .6rem 1.1rem; border-radius: 12px; text-decoration: none !important; }
.post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2rem 0 0; }
.post-tags a { font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; background: #f1f5f9; color: #334155 !important; text-decoration: none !important; }
.post-share { display: flex; align-items: center; gap: .5rem; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.post-share span { margin-right: .3rem; }
.post-share a, .post-share button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink) !important; text-decoration: none !important; font-size: 1.05rem; }
.post-share a.zl { font-size: .62rem; font-weight: 800; color: #0068ff !important; }
.post-toc { position: relative; }
.post-toc-in { position: sticky; top: 96px; border-left: 2px solid var(--line); padding-left: 1rem; }
.post-toc-t { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.post-toc ol, .post-toc-m ol { list-style: none; padding: 0; margin: 0; }
.post-toc li { margin: 0 0 .5rem; font-size: .86rem; line-height: 1.4; } .post-toc li.l3 { padding-left: .8rem; font-size: .82rem; }
.post-toc a { color: var(--muted); } .post-toc a:hover, .post-toc a.on { color: var(--brand); } .post-toc a.on { font-weight: 600; }
.post-toc-m { border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1rem; margin-bottom: 1.4rem; background: var(--surface); font-size: .95rem; }
.post-toc-m summary { font-weight: 600; cursor: pointer; } .post-toc-m ol { margin-top: .6rem; } .post-toc-m li { margin-bottom: .35rem; }
.post-toc-m li.l3 { padding-left: .9rem; } .post-toc-m a { color: var(--ink); text-decoration: none; }
.post-related { max-width: 1120px; margin: 3.5rem auto 1rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.post-related h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 1.2rem; }
@media (max-width: 991.98px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575.98px) {
  .post-body { font-size: 1.02rem; line-height: 1.75; } .post-lead { font-size: 1.05rem; }
  .post-cover img { border-radius: 14px; } .post-cta { flex-direction: column; align-items: flex-start; } .post-cta-btn { width: 100%; text-align: center; }
}

/* Admin: soạn bài blog */
.bed-title { width: 100%; border: 0; background: transparent; font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; padding: .2rem 0; outline: none; color: var(--ink); }
.bed-title::placeholder { color: #cbd5e1; }
.bed-slug { display: flex; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .5rem; }
.bed-slug input { flex: 1; border: 0; background: transparent; color: var(--brand-600); font-weight: 500; outline: none; min-width: 0; }
.bed-label { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: .25rem; }
.bed-label .cnt { font-weight: 500; color: var(--muted); } .bed-label .cnt.over { color: #dc2626; }
.bed-editor { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.bed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: .4rem .5rem; border-bottom: 1px solid var(--line); background: #f8fafc;
  position: sticky; top: 64px; z-index: 3; }
.bed-bar > button, .bed-bar > label, .bed-bar .dropdown > button { border: 0; background: transparent; border-radius: 8px; padding: .3rem .5rem; color: #334155; cursor: pointer; font-size: .92rem; }
.bed-bar > button:hover, .bed-bar > label:hover, .bed-bar .dropdown > button:hover { background: #e2e8f0; }
.bed-views { display: inline-flex; background: #e2e8f0; border-radius: 9px; padding: 2px; }
.bed-views button { border: 0; background: transparent; font-size: .8rem; font-weight: 500; padding: .25rem .65rem; border-radius: 7px; color: var(--muted); }
.bed-views button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.bed-panes { display: grid; grid-template-columns: 1fr; min-height: 560px; }
.bed-panes textarea { border: 0; outline: none; resize: vertical; min-height: 560px; padding: 1rem 1.1rem; font: 15px/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #0f172a; }
.bed-prev { display: none; padding: 1.2rem 1.5rem; overflow: auto; max-height: 78vh; }
.bed-panes[data-view="preview"] textarea { display: none; } .bed-panes[data-view="preview"] .bed-prev { display: block; max-height: none; }
.bed-panes[data-view="split"] { grid-template-columns: 1fr 1fr; } .bed-panes[data-view="split"] .bed-prev { display: block; border-left: 1px solid var(--line); }
.bed-prev.post-body { font-size: 1rem; }
.bed-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .45rem .8rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); background: #f8fafc; }
.bed-card { padding: 1rem; margin-bottom: 1rem; border-radius: 14px; }
.bed-card-h { font-weight: 700; font-size: .92rem; margin-bottom: .7rem; }
.bed-cover { display: block; cursor: pointer; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 2px dashed var(--line); background: #f8fafc; margin: 0; }
.bed-cover img { width: 100%; height: 100%; object-fit: cover; }
.bed-cover span { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; color: var(--muted); font-size: .82rem; }
.bed-cover span i { font-size: 1.6rem; }
.serp { padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; font-family: Arial, sans-serif; }
.serp-url { font-size: .76rem; color: #4d5156; } .serp-t { color: #1a0dab; font-size: 1.05rem; line-height: 1.3; margin: .15rem 0; }
.serp-d { color: #4d5156; font-size: .82rem; line-height: 1.45; }

/* Admin: khách truy cập */
.vz-live { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; }
.vz-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: vzPulse 1.8s infinite; }
@keyframes vzPulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.vz-chart { display: flex; align-items: flex-end; gap: 4px; height: 200px; }
.vz-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.vz-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.vz-bars i { display: block; width: 45%; max-width: 18px; min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; }
.vz-bars i.ok { background: #22c55e; }
.vz-col span { font-size: .68rem; color: var(--muted); margin-top: .3rem; height: 1em; white-space: nowrap; }
.vz-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); vertical-align: -1px; margin: 0 .2rem 0 .6rem; }
.vz-key.ok { background: #22c55e; }
.vz-feed { max-height: 620px; overflow: auto; }
.vz-row { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .88rem; }
a.vz-row:hover { background: #f8fafc; color: var(--ink); }
.vz-row.new { animation: vzNew 2.4s ease-out; }
@keyframes vzNew { from { background: #fef9c3; } to { background: transparent; } }
.vz-row > i { flex: 0 0 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #f1f5f9; color: var(--muted); }
.vz-row.tone-brand > i { background: var(--brand-50); color: var(--brand); }
.vz-row.tone-warn > i { background: #fef3c7; color: #b45309; }
.vz-row.tone-ok > i { background: #dcfce7; color: #15803d; }
.vz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vz-main span { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-who { display: flex; flex-direction: column; align-items: flex-end; font-size: .78rem; }
.vz-who small { color: var(--muted); } .vz-ok { color: #15803d; font-weight: 600; font-size: .72rem; }
.vz-row time { font-size: .75rem; color: var(--muted); white-space: nowrap; min-width: 92px; text-align: right; }
.vz-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.3rem; }
.vz-dl { display: grid; grid-template-columns: 90px 1fr; gap: .4rem .6rem; font-size: .88rem; margin: 0; }
.vz-dl dt { color: var(--muted); font-weight: 500; } .vz-dl dd { margin: 0; }
@media (max-width: 575.98px) { .vz-who { display: none; } }
.vz-tbl > :not(caption) > * > :first-child { padding-left: 1rem; } .vz-tbl > :not(caption) > * > :last-child { padding-right: 1rem; }

/* Báo trừ credit (góc dưới) + hộp «Không đủ credit» */
.credit-toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 1090;
  background: #0f172a; color: #fff; padding: .55rem 1rem; border-radius: 999px; font-size: .88rem; box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .55);
  transition: transform .28s ease, opacity .28s ease; opacity: 0; white-space: nowrap; pointer-events: none; }
.credit-toast.on { transform: translate(-50%, 0); opacity: 1; }
.credit-toast .bi-coin { color: #fbbf24; } .credit-toast b { font-weight: 700; }
@media (max-width: 991.98px) { .credit-toast { bottom: calc(5.2rem + env(safe-area-inset-bottom)); } }
.app-confirm-ic.credit-ic { background: #fef3c7; color: #d97706; }
.credit-uses { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.credit-uses span { font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface, #fff); border: 1px solid var(--line); color: #334155; }
.credit-uses i { color: var(--brand); }
.signup-gift { display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; margin-bottom: 1rem; border-radius: 12px; font-size: .88rem;
  background: linear-gradient(120deg, #fff7ed, #fef3c7); border: 1px solid #fde68a; color: #78350f; }
.signup-gift .bi { font-size: 1.15rem; color: #d97706; }

/* ---------------------------------------------------------------- menu nhiều cột (MAIN_NAV mục có "mega") */
.mega-caret { font-size: .7em; margin-left: .15rem; opacity: .6; transition: transform .15s; }
.mega-menu { display: none; }
@media (min-width: 992px) {
  .app-nav > .container { position: relative; }
  .nav-mega { position: static; }
  .mega-menu { position: absolute; left: .75rem; right: .75rem; top: 100%; padding-top: .55rem; z-index: 1040; }
  .mega-menu > * { background: var(--surface, #fff); }
  .mega-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: .25rem 1.2rem; padding: 1.1rem 1.2rem .6rem;
    border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 24px 48px -20px rgba(15, 23, 42, .28); }
  .mega-foot { border: 1px solid var(--line); border-top: 1px solid #f1f5f9; border-radius: 0 0 18px 18px; padding: .6rem 1.2rem; text-align: right;
    box-shadow: 0 24px 48px -20px rgba(15, 23, 42, .28); background: #f8fafc !important; }
  .mega-foot a { font-weight: 600; font-size: .88rem; text-decoration: none; }
  .nav-mega:hover > .mega-menu, .nav-mega:focus-within > .mega-menu { display: block; animation: megaIn .14s ease-out; }
  .nav-mega:hover .mega-caret { transform: rotate(180deg); }
}
@keyframes megaIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mega-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .2rem .5rem .45rem; }
.mega-item { display: flex; gap: .7rem; align-items: flex-start; padding: .5rem; border-radius: 12px; text-decoration: none; color: var(--ink); }
.mega-item:hover { background: #f1f5f9; color: var(--ink); }
.mega-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, white); }
.mega-tx b { display: block; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.mega-tx b em { font-style: normal; font-size: .64rem; font-weight: 700; color: #fff; background: #f43f5e; border-radius: 999px; padding: .05rem .4rem; vertical-align: 2px; }
.mega-tx small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: .1rem; }
[data-bs-theme="dark"] .mega-item:hover { background: rgba(255, 255, 255, .06); }

/* ---------------------------------------------------------------- thanh chia sẻ (_share.html) */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.share-bar .lbl { font-size: .82rem; color: var(--muted); margin-right: .2rem; }
.share-bar a, .share-bar button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface, #fff);
  display: inline-grid; place-items: center; color: var(--c, #475569); font-size: 1rem; text-decoration: none; transition: .15s; }
.share-bar a:hover, .share-bar button:hover { background: var(--c, var(--brand)); color: #fff; border-color: transparent; }
.share-bar .zalo { font-weight: 800; font-size: .62rem; letter-spacing: -.02em; }

/* ---------------------------------------------------------------- trang Liên hệ (site/contact.html) */
.ct-hero { padding: 3rem 0 2rem; background: radial-gradient(900px 380px at 80% -20%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 65%); }
.ct-eyebrow { display: inline-flex; gap: .4rem; align-items: center; font-size: .8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.ct-h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: .6rem 0 .8rem; }
.ct-h1 .grad { background: linear-gradient(90deg, var(--brand), #9333ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ct-lead { font-size: 1.08rem; color: #475569; max-width: 680px; line-height: 1.6; }
.ct-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; margin-top: 1.6rem; }
.ct-ch { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: .15s; }
a.ct-ch:hover { border-color: var(--c); box-shadow: 0 14px 30px -18px var(--c); color: var(--ink); transform: translateY(-1px); }
.ct-ch .ic { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--c); font-size: 1.15rem; }
.ct-ch .ic b { font-size: .7rem; letter-spacing: -.02em; }
.ct-ch b { display: block; font-size: .95rem; } .ct-ch small { color: var(--muted); font-size: .8rem; word-break: break-all; }
.ct-ch > .bi { margin-left: auto; color: #cbd5e1; }
.ct-main { padding: 1rem 0 3.5rem; }
.ct-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 991px) { .ct-grid { grid-template-columns: 1fr; } }
.ct-card { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem; box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .35); }
.ct-h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .9rem; }
.ct-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.ct-topic { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .8rem; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: .15s; }
.ct-topic input { position: absolute; opacity: 0; pointer-events: none; }
.ct-topic .bi { font-size: 1.2rem; color: var(--brand); margin-top: .05rem; }
.ct-topic b { display: block; font-size: .9rem; } .ct-topic small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.ct-topic:hover { border-color: color-mix(in srgb, var(--brand) 45%, white); }
.ct-topic:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.ct-topic:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ct-err { color: #dc2626; font-size: .85rem; margin-top: .4rem; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-side { display: grid; gap: .9rem; }
.ct-side-box { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.15rem; }
.ct-side-h { font-weight: 700; font-size: .92rem; margin-bottom: .5rem; display: flex; gap: .45rem; align-items: center; }
.ct-side-h .bi { color: var(--brand); }
.ct-side-box ul { margin: 0; padding-left: 1.1rem; color: #475569; font-size: .87rem; } .ct-side-box li { margin-bottom: .35rem; }
.ct-done { text-align: center; padding: 2rem 1rem; }
.ct-done .ok { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 2.2rem; color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 16px 32px -14px #16a34a; }
.ct-done h2 { font-size: 1.4rem; font-weight: 800; } .ct-done p { color: #475569; max-width: 460px; margin: .4rem auto 1.2rem; }
[data-bs-theme="dark"] .ct-topic:has(input:checked) { background: rgba(255, 255, 255, .05); }

/* ---------------------------------------------------------------- Bảng giá (billing/pricing.html) */
.pr-hero { text-align: center; max-width: 760px; margin: 0 auto 1.8rem; padding-top: .5rem; }
.pr-eyebrow { display: inline-flex; gap: .4rem; align-items: center; font-size: .8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.pr-h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: .5rem 0 .6rem; }
.pr-sub { color: #475569; font-size: 1.05rem; line-height: 1.6; }
.pr-wallet { display: flex; gap: 1rem; align-items: center; text-align: left; margin: 1.2rem auto 0; max-width: 560px; padding: .9rem 1.1rem; border-radius: 18px;
  background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 20px 40px -28px rgba(15, 23, 42, .4); }
.pr-wallet .w-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--brand), #7c3aed); }
.pr-wallet small { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pr-wallet b { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; } .pr-wallet span { font-size: .8rem; color: var(--muted); }
.pr-gift { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; padding: .55rem .6rem .55rem 1rem; border-radius: 999px;
  background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: .9rem; } .pr-gift .bi-gift-fill { color: #f59e0b; }
.pr-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; max-width: 900px; margin: 0 auto 2.2rem; }
@media (max-width: 767px) { .pr-how { grid-template-columns: 1fr; } }
.pr-how > div { position: relative; padding: .9rem 1rem .9rem 3.3rem; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line); }
.pr-how span { position: absolute; left: 1rem; top: .95rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .85rem; }
.pr-how b { display: block; font-size: .93rem; } .pr-how small { color: var(--muted); font-size: .8rem; }
.pr-card { position: relative; height: 100%; display: flex; flex-direction: column; padding: 1.7rem 1.5rem 1.5rem; border-radius: 22px;
  background: var(--surface, #fff); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.pr-card:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -30px rgba(15, 23, 42, .45); }
.pr-card.is-featured { border: 0; background: linear-gradient(var(--surface, #fff), var(--surface, #fff)) padding-box,
  linear-gradient(135deg, var(--brand), #9333ea) border-box; border: 2px solid transparent; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--brand) 60%, transparent); }
.pr-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: .25rem .8rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
  color: #fff; background: linear-gradient(90deg, var(--brand), #9333ea); white-space: nowrap; }
.pr-name { font-weight: 700; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.pr-price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.035em; margin: .2rem 0 .3rem; }
.pr-card .credits { font-size: 1.05rem; font-weight: 700; color: var(--brand-600); } .pr-card .per { font-size: .82rem; color: var(--muted); }
.pr-desc { color: #475569; font-size: .88rem; margin: .2rem 0 .7rem; }
.pr-uses { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.pr-uses span { display: flex; gap: .45rem; align-items: center; padding: .55rem .75rem; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line); font-size: .87rem; }
.pr-uses .bi { color: var(--brand); }
.pr-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; max-width: 980px; margin: 3rem auto 0; }
@media (max-width: 767px) { .pr-trust { grid-template-columns: 1fr 1fr; } }
.pr-trust > div { text-align: center; padding: 1rem .6rem; } .pr-trust .bi { font-size: 1.5rem; color: var(--brand); display: block; margin-bottom: .3rem; }
.pr-trust b { display: block; font-size: .9rem; } .pr-trust span { font-size: .8rem; color: var(--muted); }
.pr-faq { max-width: 820px; margin-top: 3rem; }
.pr-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; max-width: 980px; margin: 3rem auto 1rem; padding: 1.4rem 1.6rem;
  border-radius: 22px; color: #fff; background: linear-gradient(120deg, #0f172a, color-mix(in srgb, var(--brand) 70%, #0f172a)); }
.pr-cta b { display: block; font-size: 1.1rem; } .pr-cta span { opacity: .8; font-size: .9rem; }

/* nút chính nổi giữa menu đáy (MOBILE_NAV mục "primary": True) */
.bottom-nav a.bn-primary { position: relative; color: var(--ink); font-weight: 600; }
.bottom-nav .bn-fab { width: 52px; height: 52px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), #7c3aed); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--brand) 75%, transparent), 0 0 0 4px #fff;
  transition: transform .15s; }
.bottom-nav .bn-fab i { font-size: 1.45rem; transform: none !important; }
.bottom-nav a.bn-primary:active .bn-fab { transform: scale(.94); }
[data-bs-theme="dark"] .bottom-nav .bn-fab { box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .6), 0 0 0 4px var(--bs-body-bg); }
.row:has(> div > .pr-card) { max-width: 1120px; margin-left: auto; margin-right: auto; }

/* ---------- Trắc nghiệm nhận credit (app/quiz) ---------- */
.qz-hero { padding: 2.6rem 0 1.6rem; background: radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, #f59e0b 18%, transparent), transparent 60%),
  radial-gradient(700px 360px at 0% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 65%); }
.qz-hero.sm { padding-bottom: 1rem; }
.qz-hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2rem; align-items: center; }
.qz-lead { color: var(--muted); font-size: 1.06rem; max-width: 560px; }
.qz-rules { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.qz-rules span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .38rem .8rem; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.qz-rules i { color: #f59e0b; }
.qz-daily { background: linear-gradient(145deg, #1e1b4b, #312e81 55%, #4338ca); color: #fff; border-radius: 22px; padding: 1.4rem; box-shadow: 0 20px 40px -18px rgba(49, 46, 129, .6); position: relative; overflow: hidden; }
.qz-daily::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .35), transparent 70%); }
.qz-daily.done { background: linear-gradient(145deg, #064e3b, #047857); }
.qz-daily-top { display: flex; justify-content: space-between; align-items: center; }
.qz-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgba(255, 255, 255, .14); padding: .3rem .65rem; border-radius: 999px; }
.qz-streak { font-weight: 700; color: #fbbf24; }
.qz-daily-title { font-size: 1.7rem; font-weight: 800; margin-top: .8rem; letter-spacing: -.02em; }
.qz-daily-sub { opacity: .8; font-size: .92rem; }
.qz-dots { display: flex; align-items: center; gap: .3rem; margin-top: .9rem; flex-wrap: wrap; }
.qz-dots i { width: 22px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .2); }
.qz-dots i.on { background: #fbbf24; }
.qz-dots small { opacity: .75; margin-left: .4rem; font-size: .78rem; }
.qz-me { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 1.6rem; }
.qz-me > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; box-shadow: var(--shadow-sm); }
.qz-me b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.qz-me b span { font-size: .9rem; color: var(--muted); font-weight: 600; }
.qz-me small { color: var(--muted); }
.qz-guest { display: flex; gap: .8rem; align-items: center; margin-top: 1.4rem; background: #fff; border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: 16px; padding: .8rem 1rem; }
.qz-guest > i { font-size: 1.4rem; color: #f59e0b; }
.qz-contest-banner { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 18px; color: #fff; margin-bottom: 1rem;
  background: linear-gradient(110deg, #b45309, #f59e0b 60%, #fbbf24); box-shadow: 0 14px 30px -16px rgba(180, 83, 9, .7); }
.qz-contest-banner:hover { color: #fff; filter: brightness(1.04); }
.qz-contest-banner .ic { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.qz-contest-banner .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qz-contest-banner small { opacity: .85; font-weight: 600; } .qz-contest-banner b { font-size: 1.1rem; } .qz-contest-banner .tx span { opacity: .9; font-size: .9rem; }
.qz-filter { display: flex; gap: .35rem; flex-wrap: wrap; }
.qz-filter > * { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.qz-filter > .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.qz-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; color: var(--ink);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.qz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--ink); }
.qz-card h3 { font-size: 1.05rem; font-weight: 700; margin: .8rem 0 .3rem; line-height: 1.35; }
.qz-card p { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; flex: 1; }
.qz-card.sm h3 { font-size: .95rem; margin-top: .6rem; }
.qz-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.qz-ic { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.25rem; flex: none; }
.qz-ic.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.9rem; }
.qz-badge { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .25rem .6rem; white-space: nowrap; }
.qz-badge.gold { background: #fef3c7; color: #92400e; } .qz-badge.ok { background: #dcfce7; color: #166534; } .qz-badge.muted { background: #f1f5f9; color: #475569; }
.qz-card-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .8rem; color: var(--muted); margin-top: auto; }
.qz-card-meta span:first-child:not(:has(i)) { color: var(--brand); font-weight: 600; }
.qz-empty { text-align: center; padding: 2rem; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 16px; }
.qz-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; }
.qz-board { list-style: none; padding: 0; margin: 0; }
.qz-board li { display: flex; align-items: center; gap: .7rem; padding: .55rem .3rem; border-bottom: 1px solid #f1f5f9; }
.qz-board li:last-child { border-bottom: 0; }
.qz-board li.me, .qz-table tr.me td { background: var(--brand-50); }
.qz-board .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-board small { color: var(--muted); min-width: 52px; text-align: right; }
.rk { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; background: #f1f5f9; color: #475569; flex: none; }
.rk.r1 { background: #fbbf24; color: #78350f; } .rk.r2 { background: #cbd5e1; color: #1e293b; } .rk.r3 { background: #f5c19a; color: #7c2d12; }
.qz-how { padding-left: 1.1rem; margin: 0; font-size: .92rem; } .qz-how li { margin-bottom: .45rem; }
/* làm bài */
.qz-play-wrap { padding: 1.6rem 0 3rem; min-height: 70vh; }
.qz-intro { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 2rem; text-align: center; box-shadow: var(--shadow-sm); }
.qz-intro-title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; margin: 1rem 0 .4rem; }
.qz-intro-desc { color: var(--muted); max-width: 520px; margin: 0 auto; }
.qz-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 1.4rem 0 .4rem; }
.qz-facts > div { background: var(--bg); border-radius: 14px; padding: .7rem .4rem; }
.qz-facts i { color: var(--brand); display: block; font-size: 1.1rem; } .qz-facts b { display: block; font-size: 1.25rem; } .qz-facts small { color: var(--muted); font-size: .76rem; }
.qz-note { text-align: left; background: var(--brand-50); color: var(--ink); border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; margin-top: 1rem; }
.qz-note.ok { background: #ecfdf5; } .qz-note.err { background: #fef2f2; color: #991b1b; }
.qz-player { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 1.2rem 1.4rem 1.4rem; box-shadow: var(--shadow); }
.qz-topbar { display: flex; align-items: center; gap: .8rem; }
.qz-x { border: 0; background: #f1f5f9; width: 36px; height: 36px; border-radius: 50%; color: #475569; flex: none; }
.qz-progress { flex: 1; height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.qz-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #8b5cf6); border-radius: 99px; transition: width .35s; }
.qz-count { font-weight: 700; font-size: .9rem; color: var(--muted); min-width: 44px; text-align: right; }
.qz-timer { font-weight: 700; font-variant-numeric: tabular-nums; background: #f1f5f9; padding: .3rem .6rem; border-radius: 99px; font-size: .88rem; }
.qz-timer.warn { background: #fee2e2; color: #b91c1c; }
.qz-qbox { padding: 1.4rem 0 .4rem; }
.qz-diff { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #16a34a; }
.qz-diff.d2 { color: #d97706; } .qz-diff.d3 { color: #dc2626; }
.qz-q { font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 700; line-height: 1.4; margin: .4rem 0 1.1rem; letter-spacing: -.01em; }
.qz-opts { display: grid; gap: .6rem; }
.qz-opt { display: flex; align-items: center; gap: .8rem; text-align: left; width: 100%; background: #fff; border: 2px solid var(--line); border-radius: 14px;
  padding: .85rem 1rem; font-size: 1rem; color: var(--ink); transition: border-color .12s, background .12s, transform .08s; }
.qz-opt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-50); }
.qz-opt:active:not(:disabled) { transform: scale(.99); }
.qz-opt .key { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #f1f5f9; font-weight: 800; font-size: .85rem; flex: none; color: #475569; }
.qz-opt .tx { flex: 1; } .qz-opt .mk { width: 22px; flex: none; }
.qz-opt.sel { border-color: var(--brand); background: var(--brand-50); } .qz-opt.sel .key { background: var(--brand); color: #fff; }
.qz-opt.right { border-color: #16a34a; background: #f0fdf4; } .qz-opt.right .key { background: #16a34a; color: #fff; }
.qz-opt.right .mk::after { content: "\F26E"; font-family: bootstrap-icons; color: #16a34a; font-size: 1.3rem; }
.qz-opt.wrong { border-color: #dc2626; background: #fef2f2; } .qz-opt.wrong .key { background: #dc2626; color: #fff; }
.qz-opt.wrong .mk::after { content: "\F62A"; font-family: bootstrap-icons; color: #dc2626; font-size: 1.3rem; }
.qz-opt:disabled { cursor: default; opacity: 1; } .qz-opt:disabled:not(.right):not(.wrong) { opacity: .65; }
.qz-fb { margin-top: 1rem; border-radius: 14px; padding: .9rem 1rem; animation: qzIn .25s ease; }
.qz-fb.ok { background: #f0fdf4; border: 1px solid #bbf7d0; } .qz-fb.no { background: #fff7ed; border: 1px solid #fed7aa; }
.qz-fb-head { font-weight: 800; margin-bottom: .25rem; } .qz-fb.ok .qz-fb-head { color: #15803d; } .qz-fb.no .qz-fb-head { color: #c2410c; }
.qz-fb-exp { font-size: .95rem; } .qz-fb-basis { font-size: .83rem; color: var(--muted); margin-top: .4rem; }
.qz-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }
.qz-hint { color: var(--muted); font-size: .85rem; } .qz-hint.err { color: #dc2626; font-weight: 600; }
@keyframes qzIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qz-result { text-align: center; padding: 1rem 0; }
.qz-ring { --p: 0; width: 170px; height: 170px; margin: .5rem auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c, var(--brand)) calc(var(--p) * 1%), #f1f5f9 0); transition: --p 1s; position: relative; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.qz-ring.great { --c: #16a34a; } .qz-ring.good { --c: var(--brand); } .qz-ring.low { --c: #f59e0b; }
.qz-ring > div { width: 136px; height: 136px; border-radius: 50%; background: #fff; display: grid; place-content: center; }
.qz-ring b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; } .qz-ring small { color: var(--muted); }
.qz-res-title { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.qz-res-credit { display: inline-flex; align-items: center; gap: .4rem; background: #fef3c7; color: #92400e; font-size: 1.15rem; border-radius: 999px; padding: .45rem 1.1rem; margin: .3rem 0; animation: qzPop .5s ease; }
.qz-res-credit small { color: #a16207; font-size: .8rem; }
@keyframes qzPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.qz-res-meta { display: flex; gap: 1rem; justify-content: center; color: var(--muted); margin: .4rem 0; font-size: .92rem; }
.qz-notes { list-style: none; padding: 0; margin: .6rem auto; max-width: 480px; font-size: .9rem; color: var(--muted); }
.qz-guest-cta { background: var(--brand-50); border-radius: 16px; padding: 1rem; margin: 1rem auto; max-width: 480px; display: flex; flex-direction: column; gap: .2rem; }
.qz-res-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.2rem; }
.qz-res-share { margin-top: 1.4rem; display: flex; justify-content: center; }
.qz-review { text-align: left; margin-top: 1.2rem; display: grid; gap: .6rem; }
.qz-rv { border: 1px solid var(--line); border-left: 4px solid #16a34a; border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; }
.qz-rv.no { border-left-color: #dc2626; }
.qz-rv .h { font-weight: 700; display: flex; gap: .5rem; } .qz-rv .h span { color: var(--muted); }
.qz-rv .a { margin-top: .3rem; } .qz-rv.ok .a i { color: #16a34a; } .qz-rv.no .a i { color: #dc2626; }
.qz-rv .c { color: #15803d; margin-top: .2rem; } .qz-rv .e { color: var(--muted); margin-top: .3rem; } .qz-rv .b { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.qz-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.qz-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: qzFall 2.6s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes qzFall { to { top: 105%; transform: translateX(40px) rotate(720deg); } }
/* cuộc thi */
.qz-ct-hero { padding: 1.8rem 0 2.2rem; background: linear-gradient(135deg, #0f172a, #1e1b4b 60%, #3b0764); color: #fff; }
.qz-ct-hero a { color: rgba(255, 255, 255, .75); }
.qz-ct-hero .qz-lead { color: rgba(255, 255, 255, .75); }
.qz-ct-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.qz-ct-title { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; margin: .8rem 0 .5rem; }
.qz-chip.open { background: #16a34a; } .qz-chip.upcoming { background: #f59e0b; color: #1c1917; } .qz-chip.ended { background: rgba(255, 255, 255, .18); }
.qz-ct-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.qz-ct-facts span { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: .35rem .75rem; font-size: .85rem; }
.qz-ct-box { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; padding: 1.4rem; backdrop-filter: blur(6px); }
.qz-ct-box .qz-note { color: var(--ink); }
.qz-cd-label { text-align: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.qz-cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .5rem; text-align: center; }
.qz-cd > div { background: rgba(255, 255, 255, .1); border-radius: 14px; padding: .6rem .2rem; }
.qz-cd b { display: block; font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; } .qz-cd small { opacity: .7; font-size: .75rem; }
.qz-prizes { background: linear-gradient(180deg, #fffbeb, #fff); border-color: #fde68a; }
/* bục vinh danh */
.qz-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: end; margin: 1rem 0 1.6rem; }
.qz-podium .p { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 0; }
.qz-podium .av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; background: var(--brand-50); color: var(--brand); border: 3px solid #fff; box-shadow: var(--shadow); }
.qz-podium .p1 .av { width: 66px; height: 66px; background: #fef3c7; color: #b45309; }
.qz-podium .nm { font-size: .9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qz-podium .pt { font-size: .8rem; color: var(--muted); }
.qz-podium .bar { width: 100%; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-weight: 800; margin-top: .4rem; }
.qz-podium .p1 .bar { height: 120px; background: linear-gradient(180deg, #fbbf24, #d97706); } .qz-podium .p2 .bar { height: 90px; background: linear-gradient(180deg, #cbd5e1, #64748b); }
.qz-podium .p3 .bar { height: 70px; background: linear-gradient(180deg, #f5c19a, #c2410c); } .qz-podium .bar i { font-size: 1.4rem; }
.qz-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.qz-table td, .qz-table th { padding: .7rem 1rem; }
@media (max-width: 991px) { .qz-hero-grid, .qz-ct-grid { grid-template-columns: 1fr; gap: 1.2rem; } }
@media (max-width: 575px) {
  .qz-me { grid-template-columns: repeat(2, 1fr); } .qz-facts { grid-template-columns: repeat(2, 1fr); }
  .qz-intro { padding: 1.4rem 1.1rem; border-radius: 20px; } .qz-player { padding: 1rem; border-radius: 20px; }
  .qz-guest { flex-wrap: wrap; } .qz-contest-banner { flex-wrap: wrap; } .qz-contest-banner .btn { width: 100%; }
  body.qz-playing .qz-play-wrap { padding-top: .6rem; }
  body.qz-playing .qz-actions { position: sticky; bottom: calc(env(safe-area-inset-bottom) + .5rem); background: #fff; padding: .6rem 0 0; }
  body.qz-playing .qz-actions .btn { flex: 1; }
}
body.qz-playing .bottom-nav, body.qz-playing .support-fab { display: none !important; }
body.qz-playing.has-bottom-nav { padding-bottom: 0; }
.qz-steps { display: grid; gap: 1rem; }
.qz-steps .st { display: flex; gap: .8rem; align-items: flex-start; }
.qz-steps .st > b { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.qz-prev { display: grid; gap: .5rem; }
.qz-prev .qp { border: 1px solid var(--line); border-left: 4px solid #16a34a; border-radius: 10px; padding: .6rem .8rem; font-size: .88rem; }
.qz-prev .qp.warn { border-left-color: #f59e0b; } .qz-prev .qp.bad { border-left-color: #dc2626; background: #fef2f2; }
.qz-prev .h { font-weight: 600; display: flex; gap: .5rem; } .qz-prev .h span { color: var(--muted); } .qz-prev .h small { margin-left: auto; color: var(--muted); font-weight: 500; }
.qz-prev ol { margin: .3rem 0 0; padding-left: 1.6rem; } .qz-prev li.ok { color: #15803d; font-weight: 600; }
.qz-prev .e { color: var(--muted); margin-top: .25rem; } .qz-prev .b { font-size: .8rem; color: var(--muted); } .qz-prev .m { margin-top: .3rem; font-size: .82rem; }
/* giải thưởng cuộc thi */
.qz-ct-prizebar { display: flex; align-items: center; gap: .9rem; margin-top: 1.1rem; max-width: 560px; padding: .6rem .9rem .6rem .6rem; border-radius: 16px;
  background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .45); color: #fff !important; }
.qz-ct-prizebar:hover { background: rgba(251, 191, 36, .2); }
.qz-ct-prizebar .thumbs { display: flex; flex: none; }
.qz-ct-prizebar .thumbs > * { width: 46px; height: 46px; border-radius: 12px; border: 2px solid #1e1b4b; object-fit: cover; margin-left: -10px; background: #fbbf24;
  display: grid; place-items: center; color: #78350f; font-size: 1.2rem; }
.qz-ct-prizebar .thumbs > :first-child { margin-left: 0; }
.qz-ct-prizebar small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #fbbf24; font-weight: 700; }
.qz-ct-prizebar b { font-size: .98rem; }
.qz-sec-head { margin-bottom: 1rem; } .qz-sec-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; margin: .3rem 0 0; }
.qz-prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.qz-prize { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.qz-prize:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.qz-prize .ph { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #fef3c7, #fde68a); }
.qz-prize .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qz-prize .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; color: #d97706; }
.qz-prize .rank { position: absolute; left: .7rem; top: .7rem; background: rgba(15, 23, 42, .78); color: #fff; font-size: .75rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 999px; backdrop-filter: blur(4px); }
.qz-prize .bd { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .25rem; }
.qz-prize .tt { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #b45309; }
.qz-prize .it { font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.qz-prize .cr { display: inline-flex; align-self: flex-start; gap: .3rem; align-items: center; background: #fef3c7; color: #92400e; font-weight: 700; font-size: .85rem; padding: .2rem .6rem; border-radius: 999px; margin-top: .2rem; }
.qz-prize .sl { color: var(--muted); font-size: .82rem; }
.qz-prize.lead { border-color: #fcd34d; box-shadow: 0 16px 34px -20px rgba(217, 119, 6, .55); }
.qz-prize.lead .tt::before { content: "\F5E7"; font-family: bootstrap-icons; margin-right: .3rem; }
@media (min-width: 768px) { .qz-prize-grid:has(.qz-prize:nth-child(3)) .qz-prize.lead { grid-column: span 2; } .qz-prize.lead .ph { aspect-ratio: auto; height: 100%; min-height: 220px; }
  .qz-prize-grid:has(.qz-prize:nth-child(3)) .qz-prize.lead { flex-direction: row; } .qz-prize-grid:has(.qz-prize:nth-child(3)) .qz-prize.lead .ph { flex: 1.2; }
  .qz-prize-grid:has(.qz-prize:nth-child(3)) .qz-prize.lead .bd { flex: 1; justify-content: center; padding: 1.4rem; } .qz-prize.lead .it { font-size: 1.25rem; } }
.qz-honor { background: linear-gradient(135deg, #fffbeb, #fff); border: 1px solid #fde68a; border-radius: 22px; padding: 1.4rem; }
.qz-honor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.qz-honor-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.qz-honor-card .rk { width: 40px; height: 40px; font-size: 1rem; margin-bottom: .3rem; }
.qz-honor-card.r1 { border-color: #fbbf24; box-shadow: 0 10px 24px -14px rgba(217, 119, 6, .6); }
.qz-honor-card .nm { font-weight: 800; } .qz-honor-card .pz { color: #b45309; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.qz-honor-card .sc { color: var(--muted); font-size: .82rem; } .qz-honor-card .it { font-size: .88rem; margin-top: .2rem; }
.qz-honor-card .cr { font-size: .8rem; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 999px; padding: .1rem .55rem; margin-top: .2rem; }
.qz-contest-banner .pz { display: flex; flex: none; } .qz-contest-banner .pz img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.7); margin-left: -12px; }
.qz-contest-banner .pz img:first-child { margin-left: 0; }
/* admin giải thưởng */
.qz-adm-prize { display: grid; grid-template-columns: 92px 1fr; gap: .8rem; align-items: start; }
.qz-adm-prize .ph { width: 92px; height: 92px; border-radius: 12px; background: #fef3c7 center/cover no-repeat; display: grid; place-items: center; color: #d97706; font-size: 1.8rem; border: 1px solid #fde68a; }
.qz-ct-hero a.btn { color: #1c1917; }
.qz-prize-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.qz-prize-mini > div { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .7rem .9rem; }
.qz-prize-mini .ic { width: 40px; height: 40px; border-radius: 12px; background: #fef3c7; color: #d97706; display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.qz-prize-mini b { display: block; } .qz-prize-mini small { color: var(--muted); }
.qz-prize-mini .cr { margin-left: auto; background: #fef3c7; color: #92400e; font-weight: 700; font-size: .85rem; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
@media (max-width: 575px) { .qz-prize-grid { grid-template-columns: 1fr 1fr; gap: .6rem; } .qz-prize-grid .qz-prize.lead { grid-column: span 2; }
  .qz-prize .bd { padding: .7rem .75rem .85rem; } .qz-prize .it { font-size: .92rem; } .qz-honor-grid { grid-template-columns: 1fr 1fr; } }
.share-hint { flex-basis: 100%; font-size: .78rem; color: #15803d; font-weight: 600; }
/* danh sách cuộc thi + bài thi của tôi */
.qz-ct-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.qz-ct-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.qz-ct-card .ph { position: relative; aspect-ratio: 16 / 8; background: linear-gradient(135deg, #1e1b4b, #4c1d95); }
.qz-ct-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qz-ct-card .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; color: #fbbf24; }
.qz-ct-card .st { position: absolute; left: .7rem; top: .7rem; font-size: .72rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; background: rgba(15, 23, 42, .78); color: #fff; }
.qz-ct-card.open .st { background: #16a34a; } .qz-ct-card.upcoming .st { background: #f59e0b; color: #1c1917; }
.qz-ct-card.ended .ph { filter: saturate(.75); }
.qz-ct-card .bd { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.qz-ct-card h3 { font-size: 1.05rem; font-weight: 750; margin: 0; line-height: 1.35; }
.qz-ct-card .meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--muted); }
.qz-ct-card .pz { font-size: .84rem; color: #b45309; font-weight: 600; }
.qz-ct-card .mine { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; background: var(--brand-50); border-radius: 12px; padding: .55rem .75rem; }
.qz-ct-card .mine.cta { background: #ecfdf5; } .qz-ct-card .mine.muted { background: #f1f5f9; color: #475569; }
.qz-ct-card .mine .go { font-weight: 700; color: var(--brand); white-space: nowrap; } .qz-ct-card .mine .lock { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.qz-res-head { display: flex; gap: 1.6rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem 1.4rem; }
.qz-res-head .qz-ring { margin: 0; width: 130px; height: 130px; flex: none; } .qz-res-head .qz-ring > div { width: 104px; height: 104px; }
.qz-res-head .qz-ring b { font-size: 1.5rem; }
.qz-rv-opts { margin: .5rem 0 0; padding-left: 1.6rem; display: grid; gap: .2rem; }
.qz-rv-opts li { padding: .15rem .35rem; border-radius: 6px; } .qz-rv-opts li.right { background: #f0fdf4; color: #15803d; font-weight: 600; }
.qz-rv-opts li.wrong { background: #fef2f2; color: #b91c1c; text-decoration: line-through; } .qz-rv-opts li small { margin-left: .4rem; font-size: .72rem; color: var(--muted); text-decoration: none; display: inline-block; }
@media (max-width: 575px) { .qz-res-head { flex-direction: column; text-align: center; } .qz-res-head .qz-res-meta { justify-content: center !important; } }
.qz-adm-kpis { display: grid; grid-template-columns: repeat(4, auto); gap: .3rem 1.4rem; text-align: right; }
.qz-adm-kpis b { display: block; font-size: 1.25rem; font-weight: 800; } .qz-adm-kpis small { color: var(--muted); font-size: .75rem; }
.qz-adm-top { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.qz-adm-top > div { display: flex; gap: .6rem; align-items: center; background: #f8fafc; border-radius: 12px; padding: .5rem .7rem; min-width: 0; }
.qz-adm-dist { display: grid; gap: .3rem; } .qz-adm-dist > div { display: grid; grid-template-columns: 70px 1fr 34px; gap: .5rem; align-items: center; font-size: .8rem; }
.qz-adm-dist i { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #818cf8, #4f46e5); }
@media (max-width: 575px) { .qz-adm-kpis { grid-template-columns: repeat(2, auto); text-align: left; } }
/* blog ↔ tính năng */
.bed-feats { display: flex; flex-wrap: wrap; gap: .3rem; }
.bed-feat input { position: absolute; opacity: 0; pointer-events: none; }
.bed-feat span { display: inline-flex; gap: .3rem; align-items: center; font-size: .76rem; padding: .25rem .55rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: #475569; }
.bed-feat span .bi { color: var(--c); }
.bed-feat input:checked + span { background: color-mix(in srgb, var(--c) 12%, white); border-color: var(--c); color: var(--ink); font-weight: 600; }
/* Thẻ công cụ trong thân bài: [[feature:khoá]] (app/blog/render.py → feature_html) */
.post-tool { display: flex; align-items: center; gap: 1rem; margin: 1.8rem 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line);
  border-left: 3px solid var(--c, var(--brand)); background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--brand)) 7%, #fff), #fff 70%); border-radius: var(--radius, 12px); }
.post-tool-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem;
  color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 12%, #fff); }
.post-tool-tx { flex: 1; min-width: 0; display: grid; gap: .1rem; line-height: 1.35; }
.post-tool-k { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c, var(--brand)); }
.post-tool-tx b { font-size: 1.08rem; color: var(--ink); } .post-tool-tx span:not(.post-tool-k) { font-size: .92rem; color: var(--muted); }
.post-tool-go { flex: none; white-space: nowrap; }
@media (max-width: 575px) { .post-tool { flex-wrap: wrap; } .post-tool-go { width: 100%; } }
.post-feats { margin: 1.6rem 0 .4rem; }
.post-feats-t { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .6rem; }
.post-feats-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.post-feat { display: flex; gap: .75rem; align-items: center; padding: .8rem .9rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: .15s; }
.post-feat:hover { border-color: var(--c); box-shadow: 0 12px 26px -16px var(--c); color: var(--ink); transform: translateY(-2px); }
.post-feat .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; font-size: 1.15rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 80%, white), color-mix(in srgb, var(--c) 88%, black)); }
.post-feat b { display: block; font-size: .92rem; } .post-feat small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.post-feat .go { margin-left: auto; color: var(--c); }
.post-body .post-feat, .post-body .post-feat:hover { text-decoration: none; }
.post-body .post-feat b, .post-body .post-feat small { text-decoration: none; }
.post-share .share-bar { margin: 0; } .post-share .share-bar a, .post-share .share-bar button { color: var(--c); }
/* Nút "Cài app" trên thanh menu (hiện khi trình duyệt cài được — static/js/pwa.js) */
.nav-install { border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-600); font-weight: 600; border-radius: 999px; padding: .25rem .7rem; }
.nav-install:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------------------------------------------------------------- Đánh giá tính năng (static/js/feedback.js) */
.fb-pop { position: fixed; right: 20px; bottom: 20px; z-index: 1085; width: 360px; max-width: calc(100vw - 24px); background: #fff; color: #0f172a;
  border: 1px solid rgba(15, 23, 42, .08); border-radius: 20px; box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .28), 0 2px 6px rgba(15, 23, 42, .06);
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .28s ease, transform .38s cubic-bezier(.2, .9, .3, 1.15); overflow: hidden; }
.fb-pop::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--bs-primary, #4f46e5), #a855f7, #f59e0b); }
.fb-pop.on { opacity: 1; transform: none; } .fb-pop.out { opacity: 0; transform: translateY(12px) scale(.98); transition-duration: .25s; }
.fb-x { position: absolute; top: 12px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #94a3b8; font-size: .9rem; }
.fb-x:hover { background: #f1f5f9; color: #334155; }
.fb-body { padding: 1.15rem 1.15rem .55rem; }
.fb-head { display: flex; gap: .7rem; align-items: flex-start; padding-right: 1.4rem; }
.fb-head b { display: block; font-size: .95rem; line-height: 1.3; } .fb-head .fb-f { color: var(--bs-primary, #4f46e5); }
.fb-head small { display: block; color: #64748b; font-size: .78rem; margin-top: .2rem; }
.fb-ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--bs-primary, #4f46e5), #a855f7); box-shadow: 0 6px 14px -4px rgba(99, 102, 241, .55); }
.fb-stars { display: flex; justify-content: center; gap: .35rem; margin: 1rem 0 .15rem; }
.fb-stars button { border: 0; background: none; padding: .15rem; width: 44px; height: 44px; cursor: pointer; border-radius: 10px; transition: transform .15s ease; }
.fb-stars button:hover { transform: translateY(-2px) scale(1.08); } .fb-stars button:focus-visible { outline: 2px solid var(--bs-primary, #4f46e5); }
.fb-stars svg { width: 100%; height: 100%; fill: #e2e8f0; stroke: #cbd5e1; stroke-width: .6; transition: fill .15s ease, stroke .15s ease; }
.fb-stars button.on svg { fill: #fbbf24; stroke: #f59e0b; } .fb-pop.rated .fb-stars button.on svg { animation: fbPop .32s ease both; }
.fb-stars button:nth-child(2).on svg { animation-delay: .03s; } .fb-stars button:nth-child(3).on svg { animation-delay: .06s; }
.fb-stars button:nth-child(4).on svg { animation-delay: .09s; } .fb-stars button:nth-child(5).on svg { animation-delay: .12s; }
@keyframes fbPop { 50% { transform: scale(1.18); } }
.fb-say { text-align: center; font-size: .8rem; color: #94a3b8; min-height: 1.2em; font-weight: 600; }
.fb-say.s1, .fb-say.s2 { color: #dc2626; } .fb-say.s3 { color: #d97706; } .fb-say.s4, .fb-say.s5 { color: #16a34a; } .fb-say.hover { opacity: .75; }
.fb-more { max-height: 0; overflow: hidden; opacity: 0; padding: 0 3px; margin: 0 -3px; transition: max-height .4s ease, opacity .3s ease, margin-top .3s ease; }
.fb-pop.rated .fb-more { max-height: 340px; opacity: 1; margin-top: .7rem; padding-bottom: 3px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .55rem; }
.fb-chip { border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; border-radius: 999px; padding: .22rem .65rem; font-size: .76rem; transition: all .15s ease; }
.fb-chip:hover { border-color: #c7d2fe; } .fb-chip.on { background: #eef2ff; border-color: var(--bs-primary, #4f46e5); color: var(--bs-primary, #4f46e5); font-weight: 600; }
.fb-text { width: 100%; border: 1px solid #e2e8f0; border-radius: 12px; padding: .55rem .7rem; font-size: .85rem; resize: none; background: #f8fafc; transition: border-color .15s, background .15s; }
.fb-text:focus { outline: 0; border-color: var(--bs-primary, #4f46e5); background: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.fb-send { width: 100%; margin-top: .6rem; border-radius: 12px; font-weight: 600; padding: .5rem; }
.fb-off { display: block; margin: .55rem auto .1rem; border: 0; background: none; color: #94a3b8; font-size: .74rem; text-decoration: underline; text-underline-offset: 2px; }
.fb-off:hover { color: #475569; }
.fb-thanks { display: none; text-align: center; padding: 1.6rem 1.2rem 1.5rem; } .fb-thanks b { display: block; font-size: 1.05rem; margin-top: .55rem; }
.fb-thanks small { color: #64748b; font-size: .8rem; }
.fb-pop.done .fb-body { display: none; } .fb-pop.done .fb-thanks { display: block; animation: appIn .35s ease both; } .fb-pop.done .fb-x { display: none; }
.fb-ok svg { width: 54px; height: 54px; } .fb-ok circle { fill: #dcfce7; stroke: #22c55e; stroke-width: 2; }
.fb-ok path { fill: none; stroke: #16a34a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: fbTick .45s .15s ease forwards; }
@keyframes fbTick { to { stroke-dashoffset: 0; } }
@keyframes appIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 575px) {
  .fb-pop { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; max-width: none; border-radius: 22px; }
  body.has-bottom-nav .fb-pop { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .fb-pop, .fb-more, .fb-stars svg { transition: none; } .fb-stars button.on svg, .fb-ok path { animation: none; stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- Chuông hoạt động khách hàng (admin) — static/js/admin-bell.js */
.adm-bell { position: relative; }
.adm-bell-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: #475569;
  display: grid; place-items: center; font-size: 1.15rem; transition: background .15s, color .15s; }
.adm-bell-btn:hover, .adm-bell.open .adm-bell-btn { background: #f1f5f9; color: #0f172a; }
.adm-bell-btn.ring i { animation: admRing .9s ease; transform-origin: 50% 10%; }
@keyframes admRing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.adm-bell-n { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: .66rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; animation: admPop .25s ease both; }
.adm-bell-n[hidden] { display: none; }
@keyframes admPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.adm-bell-pop { position: absolute; right: -8px; top: calc(100% + 10px); z-index: 1080; width: 400px; max-width: calc(100vw - 20px); background: #fff;
  border: 1px solid rgba(15, 23, 42, .08); border-radius: 16px; box-shadow: 0 24px 60px -16px rgba(15, 23, 42, .3); overflow: hidden; animation: appIn .2s ease both; }
.adm-bell-pop[hidden] { display: none; }
.adm-bell-head { display: flex; align-items: baseline; justify-content: space-between; padding: .8rem 1rem .4rem; }
.adm-bell-head b { font-size: .95rem; } .adm-bell-head small { color: #64748b; font-size: .76rem; }
.adm-bell-tabs { display: flex; gap: .25rem; padding: 0 .75rem .55rem; border-bottom: 1px solid #f1f5f9; overflow-x: auto; }
.adm-bell-tabs button { flex: none; border: 0; background: transparent; color: #64748b; font-size: .78rem; font-weight: 600; padding: .3rem .6rem; border-radius: 999px; }
.adm-bell-tabs button:hover { background: #f8fafc; color: #0f172a; } .adm-bell-tabs button.on { background: #eef2ff; color: var(--bs-primary, #4f46e5); }
.adm-bell-tabs em { font-style: normal; margin-left: .3rem; background: #ef4444; color: #fff; border-radius: 999px; padding: 0 .35rem; font-size: .66rem; }
.adm-bell-tabs em:empty { display: none; }
.adm-bell-list { max-height: min(460px, 65vh); overflow-y: auto; overscroll-behavior: contain; }
.adm-bell-it { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid #f8fafc;
  position: relative; transition: background .12s; }
.adm-bell-it:hover { background: #f8fafc; }
.adm-bell-it.new { background: #f5f7ff; } .adm-bell-it.new::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px;
  margin-top: -3px; border-radius: 50%; background: var(--bs-primary, #4f46e5); }
.adm-bell-it .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .95rem; }
.adm-bell-it .ic { color: var(--c, #475569); background: color-mix(in srgb, var(--c, #475569) 11%, #fff); }
.adm-bell-it .ic.u { background: #ecfdf5; color: #059669; } .adm-bell-it .ic.m { background: #eff6ff; color: #2563eb; }
.adm-bell-it .ic.s { background: #fffbeb; color: #d97706; } .adm-bell-it .ic.t { background: #f5f3ff; color: #7c3aed; }
.adm-bell-it.low .ic.m { background: #fef2f2; color: #dc2626; }
.adm-bell-it.todo { background: #fffdf5; } .adm-bell-it.soon { opacity: .75; }
.adm-bell-it time.due { font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: .05rem .45rem; }
.adm-bell-it time.due.late { color: #b91c1c; background: #fee2e2; } .adm-bell-it time.due.soon { color: #475569; background: #f1f5f9; }
.adm-bell-it .tx { flex: 1; min-width: 0; line-height: 1.3; } .adm-bell-it .tx b { display: block; font-size: .84rem; color: #0f172a; }
.adm-bell-it .who { display: block; font-size: .78rem; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bell-it small { display: block; font-size: .74rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bell-it time { flex: none; font-size: .7rem; color: #94a3b8; white-space: nowrap; padding-top: .1rem; }
.adm-bell-empty { padding: 2rem 1rem; text-align: center; color: #94a3b8; font-size: .84rem; } .adm-bell-empty i { display: block; font-size: 1.5rem; margin-bottom: .3rem; }
.adm-bell-foot { display: flex; justify-content: space-around; border-top: 1px solid #f1f5f9; padding: .5rem; }
.adm-bell-foot a { font-size: .76rem; text-decoration: none; color: var(--bs-primary, #4f46e5); font-weight: 600; }
@media (max-width: 575px) { .adm-bell-pop { position: fixed; left: 10px; right: 10px; top: 62px; width: auto; max-width: none; } }

/* ---- blog: phông chữ theo thương hiệu (dự án đặt --blog-display / --blog-text / --blog-display-weight trong theme.css) */
.blog-hero h1, .post-head h1, .post-body h2, .post-body h3, .bcard-title, .post-related h2 {
  font-family: var(--blog-display, inherit); font-weight: var(--blog-display-weight, 800); }
.post-body, .post-head, .bcard-body, .blog-hero { font-family: var(--blog-text, inherit); }
.post-grid.no-toc { grid-template-columns: minmax(0, 760px); }
.post-feats-g { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.post-feat > span:not(.ic) { flex: 1; min-width: 0; }
.post-tool .post-tool-go { background: var(--c, var(--brand)); border-color: var(--c, var(--brand)); color: #fff; }
.post-tool .post-tool-go:hover { filter: brightness(.92); color: #fff; }
