/* Viec P.QLKHCN */
:root {
    --qg-blue: #0b4f8a; --qg-blue2: #1769b5; --qg-bg: #f3f6fa; --qg-card: #fff; --qg-line: #e2e8f0; --qg-text: #1f2937; --qg-muted: #6b7280;
    --c-red: #c5221f; --c-amber: #b26a00; --c-green: #1e8e3e; --c-sky: #0b7285;
}
body { background: var(--qg-bg); color: var(--qg-text); font-size: 14.5px; }
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex-shrink: 0; background: linear-gradient(180deg, #0b4f8a, #083a66); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 1040; }
.brand { display: flex; gap: 10px; align-items: center; padding: 16px 14px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand img { width: 40px; height: 40px; border-radius: 10px; background: #fff; }
.brand b { display: block; letter-spacing: .3px; } .brand small { display: block; opacity: .75; font-size: 12px; }
.side .nav { padding: 10px 8px; gap: 2px; overflow-y: auto; flex: 1; }
.side .nav-link { color: rgba(255,255,255,.85); border-radius: 8px; display: flex; gap: 10px; align-items: center; padding: 8px 12px; }
.side .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.side .nav-link.active { background: #fff; color: var(--qg-blue); font-weight: 600; }
.side .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-sep { font-size: 11px; text-transform: uppercase; opacity: .55; padding: 12px 12px 4px; letter-spacing: .5px; }
.side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.side-foot .who { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.side-foot .who i { font-size: 1.6rem; } .side-foot .who small { display: block; opacity: .7; }
.side-mask { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--qg-line); display: flex; align-items: center; gap: 10px; padding: 10px 20px; }
.page-title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--qg-blue); }
.content { padding: 18px 20px 40px; }
@media (max-width: 991.98px) {
    .side { position: fixed; left: -260px; transition: left .2s; }
    .side.open { left: 0; }
    .side-mask.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1035; }
    .content { padding: 12px 12px 30px; } .topbar { padding: 8px 12px; }
}
.quick-search { position: relative; }
.quick-search > i { position: absolute; left: 9px; top: 7px; color: var(--qg-muted); font-size: 13px; }
.quick-search input { padding-left: 28px; width: 280px; }
@media (max-width: 767.98px) { .quick-search input { width: 150px; } }
.quick-res { display: none; position: absolute; right: 0; top: 36px; width: 420px; max-width: 90vw; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--qg-line); border-radius: 10px; z-index: 1050; }
.quick-res.show { display: block; }
.quick-res a { display: block; padding: 8px 12px; color: inherit; text-decoration: none; border-bottom: 1px solid #f1f3f6; }
.quick-res a:hover { background: #f4f8fd; }

/* the / khoi */
.card-x { background: var(--qg-card); border: 1px solid var(--qg-line); border-radius: 14px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-x > h2, .card-h { font-size: 1rem; font-weight: 700; color: var(--qg-blue); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-h .ms-auto { font-weight: 400; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1199.98px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--qg-line); border-radius: 14px; padding: 14px; position: relative; overflow: hidden; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.kpi:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(16,24,40,.08); }
.kpi .lb { font-size: 12.5px; color: var(--qg-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.kpi .v { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.kpi .sub { font-size: 12px; color: var(--qg-muted); }
.kpi i.bg { position: absolute; right: 10px; top: 10px; font-size: 1.8rem; opacity: .18; }
.kpi.k-red .v { color: var(--c-red); } .kpi.k-amber .v { color: var(--c-amber); } .kpi.k-green .v { color: var(--c-green); } .kpi.k-blue .v { color: var(--qg-blue); }
.kpi.k-red { border-top: 3px solid var(--c-red); } .kpi.k-amber { border-top: 3px solid #f2a900; } .kpi.k-green { border-top: 3px solid var(--c-green); } .kpi.k-blue { border-top: 3px solid var(--qg-blue); } .kpi.k-gray { border-top: 3px solid #9aa4b2; }

/* nhan */
.badge { font-weight: 600; }
.tag-danger { background: #fde8e7; color: var(--c-red); } .tag-warning { background: #fff4d6; color: #8a5300; } .tag-info { background: #e3f2fd; color: #0d5ea8; }
.tag-light { background: #eef1f5; color: #5b6472; } .tag-success { background: #e3f5e8; color: var(--c-green); } .tag-secondary { background: #ececec; color: #555; }
.st-secondary { background: #eef1f5; color: #4b5563; } .st-primary { background: #e0ecfb; color: #0b4f8a; } .st-warning { background: #fff1d1; color: #8a5300; }
.st-info { background: #dff5f8; color: #0b7285; } .st-success { background: #dcf3e3; color: #1e7a37; } .st-dark { background: #e5e7eb; color: #111827; } .st-danger { background: #fde8e7; color: var(--c-red); }
.ut-danger { background: var(--c-red); color: #fff; } .ut-warning { background: #f2a900; color: #fff; } .ut-secondary { background: #9aa4b2; color: #fff; }
.pct { display: inline-flex; align-items: center; gap: 6px; min-width: 100px; white-space: nowrap; }
.pct .bar { flex: 1; height: 7px; background: #e8ecf1; border-radius: 4px; overflow: hidden; min-width: 50px; }
.pct .bar i { display: block; height: 100%; border-radius: 4px; }

/* bang cay */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .2px; color: #475569; background: #f5f7fb; border-bottom: 1px solid var(--qg-line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl-wrap { max-height: 72vh; overflow: auto; }
tr.clk { cursor: pointer; }
.tree-t td { vertical-align: top; }
.tree-t .tv { display: flex; align-items: flex-start; gap: 2px; }
.tree-t .tog { border: 0; background: none; width: 20px; padding: 0; color: var(--qg-muted); flex-shrink: 0; display: inline-block; }
.tree-t .arr { color: #94a3b8; margin-right: 3px; }
.tree-t tr.cap1 td { background: #f2f7fd; } .tree-t tr.cap1 .so, .tree-t tr.cap1 .ty { font-weight: 700; color: var(--qg-blue); }
.tree-t tr.cap2 .so { font-weight: 600; }
.tree-t tr.cap3 td { font-size: 13.5px; }
.tree-t tr.xong td { opacity: .62; } .tree-t tr.xong .so { text-decoration: line-through; }
.tree-t tr.han-danger > td:first-child { box-shadow: inset 3px 0 0 var(--c-red); } .tree-t tr.han-warning > td:first-child { box-shadow: inset 3px 0 0 #f2a900; }
.tree-t .ty { min-width: 260px; } .tree-t .vt { min-width: 200px; max-width: 360px; color: #475569; }
.row-act { opacity: .35; } tr:hover .row-act, .todo-i:hover .row-act { opacity: 1; }
.empty { text-align: center; padding: 30px 10px; color: var(--qg-muted); } .empty i { font-size: 2rem; display: block; margin-bottom: 4px; }

/* bo loc */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters .f { display: flex; flex-direction: column; min-width: 150px; }
.filters .f label { font-size: 12px; color: var(--qg-muted); font-weight: 600; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--qg-line); background: #fff; border-radius: 999px; padding: 3px 12px; font-size: 13px; cursor: pointer; user-select: none; }
.chip.on { background: var(--qg-blue); border-color: var(--qg-blue); color: #fff; }
.chip .n { font-weight: 700; margin-left: 4px; opacity: .8; }

/* to-do */
.todo-i { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--qg-line); border-left-width: 4px; border-radius: 10px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.todo-i:hover { box-shadow: 0 3px 12px rgba(16,24,40,.07); }
.todo-i.l-danger { border-left-color: var(--c-red); background: #fff8f7; } .todo-i.l-warning { border-left-color: #f2a900; background: #fffcf2; } .todo-i.l-info { border-left-color: #2e7dd7; } .todo-i.l-light { border-left-color: #cbd5e1; }
.todo-i .ck { font-size: 1.3rem; color: #94a3b8; border: 0; background: none; padding: 0; line-height: 1; }
.todo-i .ck:hover { color: var(--c-green); }
.todo-i .bd { flex: 1; min-width: 0; }
.todo-i .t { font-weight: 600; } .todo-i .m { font-size: 12.5px; color: var(--qg-muted); }
.todo-i .nx { font-size: 13px; margin-top: 3px; color: #334155; }
.todo-i .dd { text-align: right; white-space: nowrap; font-size: 13px; }
.todo-i .dd .big { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.greet { background: linear-gradient(120deg, #0b4f8a, #1769b5 60%, #3b8ad9); color: #fff; border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.greet h2 { font-size: 1.3rem; font-weight: 700; margin: 0; } .greet .s { opacity: .9; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.week .d { background: rgba(255,255,255,.14); border-radius: 10px; padding: 6px; text-align: center; font-size: 12px; cursor: pointer; }
.week .d.td { background: #fff; color: var(--qg-blue); font-weight: 700; }
.week .d.off { opacity: .55; }
.week .d b { display: block; font-size: 1.1rem; }
.week .d .n { display: inline-block; min-width: 20px; border-radius: 10px; background: #f2a900; color: #fff; font-weight: 700; padding: 0 5px; margin-top: 2px; }
.week .d .n.z { background: transparent; color: inherit; opacity: .5; }

/* lich thang */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--qg-line); border-left: 1px solid var(--qg-line); }
.cal .h { background: #f5f7fb; font-weight: 700; text-align: center; padding: 6px; font-size: 12.5px; border-right: 1px solid var(--qg-line); border-bottom: 1px solid var(--qg-line); }
.cal .c { min-height: 112px; border-right: 1px solid var(--qg-line); border-bottom: 1px solid var(--qg-line); padding: 4px; background: #fff; overflow: hidden; }
.cal .c.ngoai { background: #fafbfc; } .cal .c.ngoai .so { opacity: .4; }
.cal .c.off { background: #fbf7f7; } .cal .c.td { box-shadow: inset 0 0 0 2px var(--qg-blue2); }
.cal .so { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; }
.cal .le { font-size: 10.5px; color: var(--c-red); font-weight: 400; }
.cal .ev { display: block; font-size: 12px; border-radius: 5px; padding: 1px 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal .more { font-size: 11.5px; color: var(--qg-blue2); cursor: pointer; }
@media (max-width: 767.98px) { .cal .c { min-height: 70px; } .cal .ev { font-size: 10px; } }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kb-col { background: #eef2f7; border-radius: 12px; padding: 8px; min-height: 200px; }
.kb-col h3 { font-size: 13px; font-weight: 700; margin: 4px 4px 8px; display: flex; justify-content: space-between; }
.kb-col.over { outline: 2px dashed var(--qg-blue2); }
.kb-card { background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--qg-line); cursor: grab; font-size: 13px; }
.kb-card .so { font-weight: 700; } .kb-card .cha { font-size: 11.5px; color: var(--qg-muted); }

/* timeline */
.timeline .tl-i { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e5e7eb; }
.timeline .tl-i > i { font-size: 1.1rem; margin-top: 2px; }
.timeline .tl-td { background: #f4fbf6; border-radius: 8px; padding: 8px; }

/* tap chi */
.tc-t td, .tc-t th { text-align: center; vertical-align: middle; }
.tc-t td:first-child, .tc-t th:first-child { text-align: left; }
.tc-cell { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 8px; cursor: pointer; min-width: 100px; }
.tc-cell:hover { outline: 1px solid var(--qg-blue2); }

/* lich chon ngay (lay tu IRB) */
.qg-cal { position: fixed; z-index: 1090; width: 272px; background: #fff; border: 1px solid var(--qg-line); border-radius: 12px; padding: 8px; font-size: 14px; }
.qg-cal-h { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.qg-cal-h select[data-m] { flex: 1.3; } .qg-cal-h select[data-y] { flex: 1; }
.qg-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.qg-cal-w { font-size: 12px; font-weight: 600; color: var(--qg-muted); padding: 4px 0; }
.qg-cal-g .cn { color: #c0392b; }
.qg-cal-g button { border: 0; background: none; border-radius: 8px; height: 32px; color: var(--qg-text); }
.qg-cal-g button:hover { background: #eef2f7; }
.qg-cal-g button.td { box-shadow: inset 0 0 0 1px #0e4d92; font-weight: 600; }
.qg-cal-g button.sel { background: #0e4d92; color: #fff; }
.qg-cal-f { display: flex; justify-content: space-between; margin-top: 4px; border-top: 1px solid var(--qg-line); padding-top: 4px; }
.qg-date .form-control { min-width: 110px; }

.form-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 2px; }
.modal-xl .form-control, .modal-xl .form-select { font-size: 14px; }
.chart-box { position: relative; height: 230px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* dang nhap */
.login-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 20% 20%, #1769b5, #083a66 70%); padding: 16px; }
.login-card { background: #fff; border-radius: 18px; padding: 28px; width: 100%; max-width: 400px; }

@media print {
    .side, .topbar, .row-act, .btn, .filters { display: none !important; }
    .content { padding: 0; } .card-x { border: 0; box-shadow: none; }
    .tbl-wrap { max-height: none; overflow: visible; }
}
@media (max-width: 575.98px) {
    .week { gap: 3px; }
    .week .d { padding: 4px 1px; font-size: 10px; min-width: 0; }
    .week .d b { font-size: .8rem; }
    .greet h2 { font-size: 1.1rem; }
    .page-title { font-size: 1rem; }
    .todo-i { flex-wrap: wrap; }
    .todo-i .dd { width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; }
}
