:root {
  --xanh: #005ca1; --xanh-dam: #00467c; --xanh-nhat: #e8f1f8;
  --cam: #f0aa1d; --xam: #838280; --xam-nhat: #f4f5f7; --vien: #dfe3e8;
  --chu: #1d2733; --chu-phu: #5c6672; --do: #c0392b; --xanh-la: #1e8449;
  --nen: #ffffff; --the: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--xam-nhat); color: var(--chu);
  font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-size: 14px; }
button, input, select { font-family: inherit; font-size: 14px; }
.tai { padding: 60px; text-align: center; color: var(--chu-phu); }

/* dang nhap */
.dn-nen { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(160deg, var(--xanh) 0%, var(--xanh-dam) 60%, #002b4d 100%); }
.dn-the { width: 100%; max-width: 380px; background: #fff; border-radius: 12px; padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.dn-the h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--xanh); letter-spacing: .3px; }
.dn-the p { margin: 0 0 22px; color: var(--chu-phu); font-size: 13px; }
.dn-the .vach { height: 3px; width: 48px; background: var(--cam); border-radius: 2px; margin: 10px 0 18px; }

/* khung */
.dau { background: var(--xanh); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 56px;
  position: sticky; top: 0; z-index: 5; }
.dau .logo { font-weight: 800; letter-spacing: .5px; font-size: 16px; white-space: nowrap; }
.dau .logo b { color: var(--cam); }
.tab { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tab button { background: transparent; color: #cfe0ee; border: 0; padding: 18px 14px; cursor: pointer; font-weight: 600;
  border-bottom: 3px solid transparent; white-space: nowrap; }
.tab button.chon { color: #fff; border-bottom-color: var(--cam); }
.dau .nguoi { display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
.dau .nguoi button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.than { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }

.luoi { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .luoi { grid-template-columns: 1fr; } .dau .logo span { display: none; } }
.the { background: var(--the); border: 1px solid var(--vien); border-radius: 10px; padding: 16px; }
.the h2 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--xanh); font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.the h2 small { text-transform: none; letter-spacing: 0; color: var(--chu-phu); font-weight: 500; }
.the + .the { margin-top: 16px; }

label.nhan { display: block; font-size: 12px; font-weight: 600; color: var(--chu-phu); margin: 10px 0 4px; }
input[type=text], input[type=password], select { width: 100%; padding: 9px 10px; border: 1px solid var(--vien); border-radius: 7px; background: #fff; color: var(--chu); }
input:focus, select:focus { outline: 2px solid var(--xanh-nhat); border-color: var(--xanh); }
.hang { display: flex; gap: 8px; } .hang > * { flex: 1; }

.nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--vien); background: #fff;
  color: var(--chu); padding: 8px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; text-decoration: none; }
.nut:hover { border-color: var(--xanh); color: var(--xanh); }
.nut.chinh { background: var(--xanh); color: #fff; border-color: var(--xanh); }
.nut.chinh:hover { background: var(--xanh-dam); color: #fff; }
.nut.lon { width: 100%; padding: 12px; font-size: 15px; margin-top: 14px; }
.nut.nho { padding: 5px 9px; font-size: 12px; }
.nut.nguy { color: var(--do); } .nut.nguy:hover { border-color: var(--do); }
.nut:disabled { opacity: .5; cursor: not-allowed; }

.ds { border: 1px solid var(--vien); border-radius: 8px; max-height: 420px; overflow: auto; background: #fff; }
.ds label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid var(--xam-nhat); cursor: pointer; }
.ds label:hover { background: var(--xanh-nhat); }
.ds label:last-child { border-bottom: 0; }
.ds input { margin-top: 2px; accent-color: var(--xanh); }
.ds .ma { font-size: 11px; color: var(--chu-phu); }
.cong-cu { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.cong-cu input { flex: 1; }
.dem { font-size: 12px; color: var(--chu-phu); }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--xam-nhat); vertical-align: top; font-size: 13px; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--chu-phu); background: #fafbfc; position: sticky; top: 0; }
.bang { border: 1px solid var(--vien); border-radius: 10px; overflow: auto; }

.nhan-tt { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tt-cho { background: #fff4dc; color: #8a5a00; } .tt-dang_chay { background: var(--xanh-nhat); color: var(--xanh); }
.tt-xong { background: #e3f4ea; color: var(--xanh-la); } .tt-loi { background: #fbe5e2; color: var(--do); } .tt-huy { background: #eee; color: #666; }
.thanh { height: 6px; background: var(--xam-nhat); border-radius: 4px; overflow: hidden; margin-top: 6px; min-width: 120px; }
.thanh i { display: block; height: 100%; background: var(--xanh); transition: width .4s; }
.phu { font-size: 12px; color: var(--chu-phu); margin-top: 4px; }
.chi-tiet { margin-top: 8px; font-size: 12px; max-height: 220px; overflow: auto; border-top: 1px dashed var(--vien); padding-top: 6px; }
.chi-tiet div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.ok { color: var(--xanh-la); } .sai { color: var(--do); } .bq { color: var(--xam); }

.thong-bao { position: fixed; right: 16px; bottom: 16px; max-width: 420px; padding: 12px 16px; border-radius: 8px; color: #fff;
  background: var(--chu); box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50; }
.thong-bao.loi { background: var(--do); }
.canh-bao { background: #fff4dc; border: 1px solid #f3d38a; color: #6b4a00; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.loi-dn { color: var(--do); font-size: 13px; margin-top: 10px; min-height: 18px; }
.chip { display: inline-block; background: var(--xanh-nhat); color: var(--xanh); border-radius: 12px; padding: 2px 8px; font-size: 11px; margin: 0 4px 4px 0; }

.mo { position: fixed; inset: 0; background: rgba(0,20,40,.45); display: grid; place-items: center; padding: 16px; z-index: 40; }
.mo .the { width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; }
.chan { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.o-chon { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.o-chon input { accent-color: var(--xanh); }
