* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; background: #f4f7fb; color: #111827; }
input, select, textarea, button { font: inherit; }
input, select, textarea { border: 1px solid #cbd5e1; border-radius: 6px; padding: 7px 9px; background: #fff; }
button { border: 1px solid #cbd5e1; border-radius: 6px; padding: 7px 12px; background: #fff; cursor: pointer; }
button.chinh { background: #0a6cff; border-color: #0a6cff; color: #fff; }
button.nguy-hiem { color: #b91c1c; border-color: #fecaca; }
a { color: #0a6cff; cursor: pointer; }
.loi { color: #b91c1c; }

.dang-nhap { width: min(360px, calc(100% - 32px)); margin: 12vh auto; background: #fff; border: 1px solid #e3e9f2; border-radius: 12px; padding: 24px; display: grid; gap: 12px; }
.dang-nhap h2 { margin: 0; }
label { display: grid; gap: 4px; }
label.ngang { display: flex; align-items: center; gap: 6px; }

header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: #0b4ea2; color: #fff; }
header label { display: flex; align-items: center; gap: 6px; }
header .the { background: transparent; color: #fff; border-color: transparent; }
header .the.dang-chon { background: #fff; color: #0b4ea2; }
.day { flex: 1; }
main { padding: 16px; }
.thanh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.thanh input:not([type]) { min-width: 260px; }
#bieuMauThu input { flex: 1; }
.thong-bao { margin: 12px 16px 0; padding: 10px 14px; border-radius: 8px; background: #dcfce7; white-space: pre-line; }
.thong-bao.sai { background: #fee2e2; }

.cuon { overflow-x: auto; background: #fff; border: 1px solid #e3e9f2; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e3e9f2; padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #eaf2ff; white-space: nowrap; }
.rut-gon { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; cursor: pointer; }
.day-du { white-space: pre-line; cursor: pointer; }
.ds-cau-hoi { min-width: 900px; }
.ds-cau-hoi th, .ds-cau-hoi td { border-right: 1px solid #e3e9f2; }
.cot-stt { width: 50px; }
.cot-van-de { width: 14%; }
.cot-cau-hoi { width: 23%; }
.cot-nhom { width: 110px; }
.cot-danh-gia { width: 90px; }
.cot-thao-tac { width: 120px; }
td.dam { font-weight: 600; }
tr.tat td { background: #f8fafc; color: #64748b; }
td.nut { white-space: nowrap; }
td.nut button { margin-right: 6px; padding: 4px 10px; }
.nut-lien-ket { border: 1px solid #cbd5e1; border-radius: 6px; padding: 7px 12px; background: #fff; text-decoration: none; }
.loi { white-space: pre-line; }
.phan-trang { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 10px 0; }

.hop { background: #fff; border: 1px solid #e3e9f2; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.hop h3 { margin-top: 0; }
.luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-content: start; }
.rong { grid-column: 1 / -1; }
@media (max-width: 640px) { .luoi { grid-template-columns: 1fr; } }
textarea { resize: vertical; width: 100%; }
dialog { width: min(820px, calc(100% - 24px)); border: 0; border-radius: 12px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(15,23,42,.5); }
dialog h3 { margin: 0; }
.anh-bot { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid #cbd5e1; }
pre { background: #0f172a; color: #e2e8f0; padding: 10px; border-radius: 8px; overflow-x: auto; }

#tuKhoa { min-width: 320px; }
dialog.xac-nhan { width: min(560px, calc(100% - 24px)); padding: 0; overflow: hidden; }
.xn-dau { padding: 14px 20px; background: #b91c1c; color: #fff; }
.xn-than { padding: 16px 20px; max-height: 55vh; overflow-y: auto; }
.xn-than p { margin: 0 0 10px; white-space: pre-line; }
.xn-than dl { margin: 0; }
.xn-than dt { font-weight: 600; color: #475569; font-size: 12px; margin-top: 8px; }
.xn-than dd { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.xn-chan { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e3e9f2; }
#nutDongY { background: #b91c1c; border-color: #b91c1c; color: #fff; }
tr.moi-luu td { animation: nhay-sang 3s ease-out; }
@keyframes nhay-sang { 0%, 40% { background: #fde68a; } 100% { background: transparent; } }
