:root {
  --nen: #0f1115; --nen2: #161a21; --the: #1c212b; --vien: #2a3140; --chu: #e6e9ef; --mo: #8b93a5;
  --nhan: #f59e0b; --tot: #22c55e; --canh: #f59e0b; --loi: #ef4444; --xanh: #3b82f6;
  --bo: 10px; font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--nen); color: var(--chu); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: var(--the); border: 1px solid var(--vien); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: #475066; }
button.chinh { background: var(--nhan); color: #111; border-color: var(--nhan); font-weight: 600; }
button.nguy { border-color: #7f1d1d; color: #fca5a5; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--nen2); border: 1px solid var(--vien); border-radius: 8px; padding: 7px 10px; width: 100%; }
textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
label { display: block; color: var(--mo); font-size: 12px; margin: 10px 0 4px; }
.dang-tai { padding: 40px; color: var(--mo); }

.khung { display: flex; min-height: 100vh; }
.thanh-ben { width: 210px; background: var(--nen2); border-right: 1px solid var(--vien); padding: 16px 10px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.logo { font-weight: 800; font-size: 16px; padding: 4px 10px 16px; }
.logo span { color: var(--nhan); }
.thanh-ben a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: var(--chu); }
.thanh-ben a.dang { background: var(--the); }
.thanh-ben a:hover { text-decoration: none; background: var(--the); }
.thanh-ben .duoi { position: absolute; bottom: 14px; left: 10px; right: 10px; color: var(--mo); font-size: 12px; }
.noi-dung { flex: 1; padding: 22px 26px 80px; min-width: 0; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 22px 0 10px; color: #cbd2df; }
.hang { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gian { justify-content: space-between; }
.mo { color: var(--mo); }
.nho { font-size: 12px; }
.the { background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo); padding: 14px; }
.luoi { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.luoi2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .luoi2 { grid-template-columns: 1fr; } .thanh-ben { display: none; } .noi-dung { padding: 16px; } }
.huy-hieu { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; background: #2a3140; color: #cbd2df; white-space: nowrap; }
.huy-hieu.tot { background: #14532d; color: #bbf7d0; }
.huy-hieu.canh { background: #713f12; color: #fde68a; }
.huy-hieu.loi { background: #7f1d1d; color: #fecaca; }
.huy-hieu.chay { background: #1e3a8a; color: #bfdbfe; }
.huy-hieu.cho { background: #4c1d95; color: #ddd6fe; }

/* thẻ nhân viên */
.nv { position: relative; cursor: pointer; transition: border-color .15s; }
.nv:hover { border-color: #475066; }
.nv .dau { display: flex; gap: 10px; align-items: center; }
.anh-dai-dien { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #111; flex-shrink: 0; }
.nv .ten { font-weight: 700; }
.nv .vai { color: var(--mo); font-size: 12px; }
.nv .viec { margin-top: 10px; font-size: 12px; min-height: 34px; color: #cbd2df; }
.nv .so { display: flex; gap: 12px; margin-top: 8px; font-size: 11px; color: var(--mo); }
.cham { width: 9px; height: 9px; border-radius: 50%; background: #475066; position: absolute; top: 14px; right: 14px; }
.cham.lam { background: var(--tot); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: nhip 1.6s infinite; }
.cham.cho { background: #a78bfa; }
@keyframes nhip { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6);} 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0);} 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0);} }

.su-kien { max-height: 520px; overflow: auto; }
.sk { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid #222836; font-size: 13px; }
.sk .gio { color: var(--mo); font-size: 11px; width: 42px; flex-shrink: 0; padding-top: 2px; }
.sk.loi { color: #fca5a5; } .sk.tot { color: #bbf7d0; } .sk.canh_bao { color: #fde68a; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #222836; font-size: 13px; vertical-align: top; }
th { color: var(--mo); font-weight: 500; font-size: 12px; }
tr.bam { cursor: pointer; } tr.bam:hover td { background: #1a1f29; }

pre.van { white-space: pre-wrap; word-break: break-word; background: var(--nen2); border: 1px solid var(--vien); border-radius: 8px; padding: 12px; max-height: 560px; overflow: auto; font-size: 12.5px; line-height: 1.5; margin: 0; }
.tab { display: flex; gap: 4px; border-bottom: 1px solid var(--vien); margin: 16px 0 12px; flex-wrap: wrap; }
.tab button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--mo); }
.tab button.dang { color: var(--chu); border-bottom-color: var(--nhan); }
.cho-ban { border-color: #7c3aed; background: #1c1530; }
.y-tuong { display: grid; gap: 10px; }
.y-tuong .the h3 { margin: 0 0 6px; font-size: 14px; }
.buoc-hang { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.buoc-hang .b { padding: 4px 10px; border-radius: 99px; font-size: 12px; background: #222836; color: var(--mo); }
.buoc-hang .b.xong { background: #14532d; color: #bbf7d0; }
.buoc-hang .b.dang { background: #1e3a8a; color: #bfdbfe; }
.thanh-tien-do { height: 6px; background: #222836; border-radius: 99px; overflow: hidden; }
.thanh-tien-do div { height: 100%; background: var(--xanh); }
.cot-bieu { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.cot-bieu div { flex: 1; background: var(--xanh); border-radius: 3px 3px 0 0; min-height: 2px; }

.mia { position: fixed; right: 18px; bottom: 18px; z-index: 20; }
.mia .nut { width: 52px; height: 52px; border-radius: 50%; background: #14b8a6; color: #04201d; font-weight: 800; border: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.mia .hop { display: none; position: absolute; right: 0; bottom: 62px; width: 360px; max-width: calc(100vw - 36px); height: 460px; background: var(--nen2); border: 1px solid var(--vien); border-radius: 12px; flex-direction: column; overflow: hidden; }
.mia.mo .hop { display: flex; }
.mia.an { display: none; }
.mia .tin { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mia .tin div { padding: 8px 10px; border-radius: 10px; max-width: 85%; white-space: pre-wrap; font-size: 13px; }
.mia .tin .u { align-self: flex-end; background: #1e3a8a; }
.mia .tin .a { align-self: flex-start; background: var(--the); }
.mia form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--vien); }
.thong-bao { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 6px; }
.thong-bao div { background: #222836; border: 1px solid var(--vien); padding: 9px 14px; border-radius: 8px; }
.thong-bao div.loi { border-color: #7f1d1d; color: #fecaca; }
.dang-nhap { max-width: 380px; margin: 10vh auto; }
.ma-ghep { font-size: 34px; letter-spacing: 8px; font-weight: 800; color: var(--nhan); }
