﻿:root {
  --nen: #f3f7fb;
  --the: #ffffff;
  --vien: #dbe5f0;
  --chu: #10223a;
  --nhan: #1d6fdc;
  --thanh-cong: #1f9d55;
  --canh-bao: #b7791f;
  --loi: #c53030;
  --dam: 0 16px 40px rgba(16, 34, 58, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  color: var(--chu);
  background:
    radial-gradient(circle at 10% 10%, #dbeeff 0, transparent 35%),
    radial-gradient(circle at 90% 80%, #e5f4ff 0, transparent 30%),
    var(--nen);
  min-height: 100vh;
}
.khung-trang { width: min(1400px, 96%); margin: 0 auto; padding: 36px 0 60px; }
.thanh-dieu-huong { display: flex; justify-content: flex-end; gap: 14px; margin-bottom: 24px; }
.lien-ket { color: var(--nhan); text-decoration: none; font-weight: 600; }
.tieu-de-chinh { text-align: center; margin: 0 0 26px; font-size: clamp(1.6rem, 4vw, 2.5rem); }
.the-noi-dung { background: var(--the); border: 1px solid var(--vien); border-radius: 18px; box-shadow: var(--dam); padding: clamp(18px, 4vw, 34px); }
.hang-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; max-width: 640px; margin: 0 auto; }
input, select, textarea, button { font: inherit; }
.o-nhap { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid #c8d6e6; outline: none; }
.o-nhap:focus { border-color: var(--nhan); }
.nut { border: none; border-radius: 12px; padding: 13px 20px; color: white; background: linear-gradient(135deg, #1d6fdc, #1559af); cursor: pointer; font-weight: 600; }
.nut:disabled { opacity: 0.7; cursor: not-allowed; }
.hop-ket-qua { margin-top: 22px; min-height: 72px; border-radius: 12px; border: 1px dashed #c8d6e6; padding: 16px; background: #f8fbff; }
.huong-dan-tra-cuu { max-width: 700px; margin: 14px auto 0; padding: 12px 14px; border-radius: 10px; background: #f2f8ff; border: 1px solid #d6e7fb; color: #23466d; text-align: center; line-height: 1.5; }
.trang-thai { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; }
.loading::before { content: ""; width: 14px; height: 14px; border: 2px solid #c8d6e6; border-top-color: var(--nhan); border-radius: 50%; animation: quay 0.8s linear infinite; }
.success { color: var(--thanh-cong); }
.warning { color: var(--canh-bao); }
.error { color: var(--loi); }
@keyframes quay { to { transform: rotate(360deg); } }
.bo-loc { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 18px; }
.luoi { display: grid; grid-template-columns: 1fr; gap: 16px; }
.thanh-tab { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.nut-tab { border: 1px solid #bfd0e3; color: #1a365d; background: #eef5fc; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; transition: all .2s ease; }
.nut-tab.dang-chon { background: linear-gradient(135deg, #1d6fdc, #1559af); border-color: #1559af; color: #fff; }
.panel-tab { display: none; opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; }
.panel-tab.dang-hien { display: block; opacity: 1; transform: translateY(0); }
.nhom { background: var(--the); border: 1px solid var(--vien); border-radius: 14px; padding: 16px; }
.bang { width: 100%; border-collapse: collapse; }
.bang th, .bang td { text-align: left; border-bottom: 1px solid #e6eef7; padding: 10px 6px; vertical-align: top; }
.bang-cuon { width: 100%; overflow-x: auto; }
.bang-du-lieu { min-width: 1200px; }
.cot-ma { min-width: 210px; white-space: nowrap; }
.cot-ngay { min-width: 160px; white-space: nowrap; }
.cot-viet { min-width: 320px; }
.cot-trung { min-width: 320px; }
.cot-viet, .cot-trung { word-break: break-word; line-height: 1.45; }
.cot-thao-tac { min-width: 120px; white-space: nowrap; }
.hanh-dong { display: flex; gap: 8px; }
.nut-phu { border: 1px solid #bfd0e3; color: #1a365d; background: #eef5fc; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.khung-them { margin-bottom: 16px; display: grid; gap: 8px; }
.vung-toast { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 10px; z-index: 50; width: min(360px, calc(100vw - 32px)); }
.toast { background: #ffffff; border: 1px solid #cde0f5; border-left: 4px solid #1d6fdc; border-radius: 10px; box-shadow: var(--dam); padding: 10px 12px; animation: hien .2s ease-out; }
.toast.success { border-left-color: var(--thanh-cong); color: #134d31; }
.toast.warning { border-left-color: var(--canh-bao); color: #73440e; }
.toast.error { border-left-color: var(--loi); color: #7c1d1d; }
.toast.an { opacity: 0; transform: translateY(6px); transition: all .3s ease; }
.lop-phu { position: fixed; inset: 0; background: rgba(16, 34, 58, 0.4); display: grid; place-items: center; z-index: 60; }
.lop-phu[hidden] { display: none !important; }
.hop-thoai { width: min(480px, 92vw); background: #fff; border-radius: 14px; padding: 18px; border: 1px solid #d7e4f2; box-shadow: var(--dam); }
@keyframes hien { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) {
  .hang-form, .bo-loc { grid-template-columns: 1fr; }
  .hanh-dong { flex-direction: column; }
  .vung-toast { right: 10px; left: 10px; width: auto; }
}
