/* BOC F demo — trang quản trị */
[data-page="admin"] { background: #F4F6F7; font-size: 14px; }
.ad { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.ad-side { background: #0F1E3D; color: #B7C3DA; position: sticky; top: 0; align-self: start; min-height: 100vh; padding: 18px 12px; }
.ad-logo { display: flex; align-items: baseline; gap: 2px; font: 700 24px/1 var(--f-head); color: #fff; padding: 6px 10px 18px; }
.ad-logo span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--orange); font-size: 18px; margin-left: 4px; }
.ad-logo small { font: 400 12px/1 var(--f-body); color: #8FA3C8; margin-left: 8px; }
.ad-side p { margin: 16px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #7387AE; }
.ad-side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 400; }
.ad-side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ad-side a.on { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 500; }
.ad-side a .ic { width: 18px; height: 18px; }
.ad-side a b { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 11px; display: grid; place-items: center; }
.ad-main { min-width: 0; }
.ad-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 28px; background: #fff; box-shadow: 0 1px 0 var(--line); }
.ad-burger { display: none; }
.ad-search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.ad-search input { border: 0 !important; background: none !important; height: 100% !important; padding: 0 !important; box-shadow: none !important; }
.ad-me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ad-me .av { width: 36px; height: 36px; font-size: 13px; }
.ad-me .role { font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--orange-50); color: var(--orange-d); }
.ad-pane { padding: 26px 28px 60px; }
.ad-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ad-h h1 { font-size: 24px; }
.ad-h-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-h .seg { background: #E9EDEF; }
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi div { background: #fff; border-radius: 14px; padding: 18px 20px; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { display: block; font: 600 28px/1.2 var(--f-head); margin: 4px 0; }
.kpi i { font-style: normal; font-size: 12.5px; font-weight: 500; }
.up { color: var(--brand); }
.down { color: var(--danger); }
.ad-two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
.ad-card { background: #fff; border-radius: 14px; padding: 18px 20px; }
.ad-card.flush { padding: 0; overflow-x: auto; }
.ad-card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.ad-card-h b { display: flex; align-items: center; gap: 6px; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.l1 { background: var(--brand); }
.l2 { background: var(--orange); }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; height: 220px; align-items: end; }
.bar-g { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-c { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.bar-c i { width: 40%; max-width: 18px; border-radius: 4px 4px 0 0; }
.b1 { background: var(--brand); }
.b2 { background: var(--orange); }
.bar-g span { font-size: 12px; color: var(--muted); }
.sh-r { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 12px; font-size: 13.5px; }
.sh-b { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.sh-b i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.todo a { font-weight: 500; color: var(--brand); }
.todo span { color: var(--muted); font-size: 13px; }
.ai-feed { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 8px; }
.tbl { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FAFBFB; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl small { display: block; color: var(--muted); font-size: 12px; }
.tbl.perm td:not(:first-child), .tbl.perm th:not(:first-child) { text-align: center; }
.tcell { display: flex; align-items: center; gap: 10px; }
.tcell img { width: 52px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.tcell b { font-weight: 500; }
.acts { white-space: nowrap; }
.acts .btn + .btn { margin-left: 6px; }
.flag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--ink-2); }
.flag.ok { background: var(--brand-50); color: var(--brand-d); }
.flag.warn { background: #FFF6DB; color: #8A6100; }
.flag.bad { background: #FDECEC; color: var(--danger); }
.crm-f { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.crm-f select { width: auto; height: 38px; }
.sw { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.sw input { opacity: 0; position: absolute; }
.sw i { position: absolute; inset: 0; border-radius: 11px; background: #CFD6DA; transition: background .2s; }
.sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw input:checked + i { background: var(--orange); }
.sw input:checked + i::after { transform: translateX(16px); }
.banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.banners figure { margin: 0; background: #fff; border-radius: 14px; overflow: hidden; }
.banners img { aspect-ratio: 16 / 7; width: 100%; object-fit: cover; }
.banners figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; font-size: 13.5px; }
.cfg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cfg p { margin: 4px 0 10px; }
@media (max-width: 1000px) {
  .ad { grid-template-columns: 1fr; }
  .ad-side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .3s; }
  .ad-open .ad-side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
  .ad-burger { display: grid; place-items: center; width: 40px; height: 40px; }
  .ad-top { padding: 0 16px; }
  .ad-me b, .ad-me .role { display: none; }
  .ad-pane { padding: 20px 16px 80px; }
  .kpi { grid-template-columns: repeat(2, 1fr); }
  .ad-two, .cfg, .banners { grid-template-columns: 1fr; }
}
/* Danh mục & nhóm (CMS) */
.dm-note { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 16px; padding: 10px 14px; border-radius: 10px; background: #FFF6DB; color: #6B4E00; font-size: 13.5px; line-height: 1.5; }
.dm-note .ic { flex: none; margin-top: 2px; }
.dm { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.dm-list-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dm-list-h small { color: var(--muted); font-size: 12.5px; }
#dmCats { list-style: none; margin: 0; padding: 6px; }
.dm-i { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.dm-i + .dm-i { margin-top: 2px; }
.dm-i:hover { background: #F5F7F8; }
.dm-i.on { background: var(--brand-50); }
.dm-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 8px; text-align: left; border-radius: 10px; }
.dm-pick > i { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1px var(--line); }
.dm-pick > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dm-pick b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-pick small { color: var(--muted); font-size: 12px; }
.dm-pick em { font-style: normal; color: #8A6100; }
.dm-i.off .dm-pick b, .dm-i.off .dm-pick > i { opacity: .55; }
.dm-mv { display: flex; flex-direction: column; padding-right: 4px; }
.dm-mv button, .dm-subs button { width: 28px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); }
.dm-mv button:hover:not(:disabled), .dm-subs button:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.dm-mv button:disabled, .dm-subs button:disabled { opacity: .3; cursor: default; }
.dm-ed .ad-card-h b .ic { color: var(--brand); }
.dm-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-icons label { position: relative; }
.dm-icons input { position: absolute; opacity: 0; pointer-events: none; }
.dm-icons span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; }
.dm-icons span:hover { border-color: var(--brand); }
.dm-icons input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.dm-icons input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.dm-img { display: flex; align-items: center; gap: 10px; }
.dm-img img { width: 64px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; }
.dm-sw { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.dm-sw b { font-weight: 500; }
.dm-sw small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.dm-sw .sw { flex: none; }
.dm-sub-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 14px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.dm-sub-h small { font-size: 12.5px; }
.dm-subs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.dm-subs li { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; border-bottom: 1px solid var(--line); }
.dm-subs li:last-child { border-bottom: 0; }
.dm-subs input:not([type]) { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-color: transparent; }
.dm-subs input:not([type]):hover { border-color: var(--line); }
.dm-subs small { min-width: 48px; text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; margin-right: 4px; }
.dm-subs .dm-x:hover:not(:disabled) { background: #FDECEC; color: var(--danger); }
.dm-subs .dm-empty { padding: 14px; color: var(--muted); font-size: 13.5px; }
.dm-add-sub { display: flex; gap: 8px; margin-top: 10px; }
.dm-add-sub input:not([type]) { flex: 1; min-width: 0; height: 38px; }
.dm-add-sub .btn { flex: none; }
.dm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.dm-foot code { padding: 1px 6px; border-radius: 5px; background: var(--soft); color: var(--ink-2); }
.dm-del { color: var(--danger); }
.dm-del:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 1000px) { .dm { grid-template-columns: 1fr; } }
@media (max-width: 599px) { .dm-ed .fld-row { grid-template-columns: 1fr; } }
