/* Màu và cỡ chữ. Đổi ở đây nếu có DESIGN.md. Tương phản đạt WCAG AA. */
:root {
  --nen: #f4f6f9;
  --nen-the: #ffffff;
  --nen-phu: #eaeef4;
  --chu: #14213a;
  --chu-phu: #4b5873;
  --chinh: #0b4ea2;
  --chinh-dam: #083b7a;
  --nhan: #b4470c;
  --nhan-nen: #fdf0e7;
  --xanh-la: #11703f;
  --xanh-la-nen: #e6f4ec;
  --do: #b42318;
  --do-nen: #fdecea;
  --vang-nen: #fff6d6;
  --vien: #d3dae6;
  --bong: 0 1px 2px rgb(20 33 58 / 6%), 0 2px 8px rgb(20 33 58 / 5%);
  --font: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --le: 16px;
  --bo: 10px;
}
@media (min-width: 768px) { :root { --le: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nen); color: var(--chu); font-family: var(--font); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
a { color: var(--chinh); }
:focus-visible { outline: 3px solid var(--chinh); outline-offset: 2px; }
[hidden] { display: none !important; }
.khung { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--le); }
.an-chu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bo-qua { position: absolute; left: -9999px; }
.bo-qua:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }
.phu { color: var(--chu-phu); font-size: .9rem; }
.the { background: var(--nen-the); border: 1px solid var(--vien); border-radius: var(--bo); box-shadow: var(--bong); }

/* Nút */
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1.5px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.nut--chinh { background: var(--chinh); color: #fff; }
.nut--chinh:hover { background: var(--chinh-dam); }
.nut--phu { background: #fff; color: var(--chinh); border-color: var(--chinh); }
.nut--phu:hover { background: var(--nen-phu); }
.nut--nhe { background: transparent; color: var(--chu-phu); }
.nut--nhe:hover { background: var(--nen-phu); }
.nut--rong { width: 100%; }
.nut:disabled { opacity: .55; cursor: progress; }

input, select, textarea { font: inherit; color: var(--chu); background: #fff; border: 1.5px solid var(--vien); border-radius: 8px; min-height: 44px; padding: 8px 12px; width: 100%; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--chinh); outline: none; box-shadow: 0 0 0 3px rgb(11 78 162 / 18%); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--chinh); margin: 0; }
label { font-weight: 600; font-size: .9rem; }
.bao-loi { color: var(--do); background: var(--do-nen); padding: 8px 12px; border-radius: 8px; margin: 8px 0; }

/* Đăng nhập */
.dang-nhap { min-height: 100vh; display: grid; place-items: center; padding: var(--le); background: linear-gradient(160deg, #0b4ea2 0%, #0a3470 100%); }
.dang-nhap__the { width: 100%; max-width: 400px; padding: 28px; display: grid; gap: 8px; }
.dang-nhap__the h1 { font-size: 1.6rem; }
.dang-nhap__the .mo-ta { color: var(--chu-phu); margin: 0 0 8px; }
.dang-nhap__the button { margin-top: 12px; }
.nhan-nho { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--chinh); }

/* Đầu trang */
.dau-trang { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--vien); }
.dau-trang__trong { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.thuong-hieu { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thuong-hieu strong { display: block; font-size: 1.05rem; }
.thuong-hieu .phu { display: block; font-size: .8rem; }
.thuong-hieu__dau { width: 34px; height: 34px; border-radius: 8px; background: var(--chinh) url("../img/favicon.svg") center / 22px no-repeat; flex: none; }
.dau-trang__nut { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .dau-trang { position: static; }
  .dau-trang__nut { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .dau-trang__nut .nut { padding: 10px 8px; }
  #nut-cap-nhat { grid-column: 1 / -1; }
}

/* Tổng quan */
.tong-quan { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 12px; }
@media (min-width: 768px) { .tong-quan { grid-template-columns: repeat(4, 1fr); } }
.chi-so { text-align: left; display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--bo); border: 1px solid var(--vien); background: #fff; font: inherit; color: var(--chu-phu); cursor: pointer; min-height: 44px; }
.chi-so:hover { border-color: var(--chinh); }
.chi-so__so { font-size: 1.6rem; font-weight: 700; color: var(--chu); line-height: 1.1; font-variant-numeric: tabular-nums; }
.chi-so--nhan .chi-so__so { color: var(--nhan); }

/* Bộ lọc */
.bo-loc { padding: 12px; display: grid; gap: 10px; }
.bo-loc__luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.bo-loc__luoi label:not(.o-chon) { display: grid; gap: 4px; }
@media (min-width: 900px) { .bo-loc__luoi { grid-template-columns: repeat(4, 1fr) auto; } }
.o-chon { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; cursor: pointer; }
#dem-ket-qua { margin: 14px 2px 8px; }

/* Danh sách gói */
.ds-goi { display: grid; gap: 10px; }
.goi { padding: 14px 16px; display: grid; gap: 8px; border-left: 4px solid transparent; }
.goi--moi { border-left-color: var(--nhan); }
.goi--theo { border-left-color: var(--chinh); }
.goi--het { opacity: .78; }
.goi__dong1 { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .82rem; color: var(--chu-phu); }
.goi__so { font-weight: 700; color: var(--chu); font-variant-numeric: tabular-nums; }
.goi__ten { font-size: 1.02rem; font-weight: 650; margin: 0; }
.goi__ten a { color: var(--chu); text-decoration: none; }
.goi__ten a:hover { color: var(--chinh); text-decoration: underline; }
.goi__tt { display: grid; grid-template-columns: 1fr; gap: 4px 18px; font-size: .9rem; color: var(--chu-phu); }
@media (min-width: 768px) { .goi__tt { grid-template-columns: 2fr 1fr 1fr; } }
.goi__tt b { color: var(--chu); font-weight: 600; }
.goi__chan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.the-nho { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--nen-phu); color: var(--chu-phu); }
.the-nho--tk { background: #e8f0fb; color: var(--chinh-dam); }
.the-nho--han { background: var(--xanh-la-nen); color: var(--xanh-la); }
.the-nho--gap { background: var(--vang-nen); color: #7a4b00; }
.the-nho--het { background: var(--do-nen); color: var(--do); }
.the-nho--moi { background: var(--nhan-nen); color: var(--nhan); }
.goi__xl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.goi__xl select { width: auto; min-width: 170px; }
.goi__ghi { display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--vien); }
@media (min-width: 768px) { .goi__ghi { grid-template-columns: 220px 1fr auto; align-items: start; } }
.goi__ghi label { display: grid; gap: 4px; }
.nut-mo-ghi { background: none; border: 0; color: var(--chinh); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0 4px; }

.trong { padding: 28px; text-align: center; margin-top: 12px; }
#nut-them { margin: 14px 0 32px; }

/* Hộp thoại */
.hop { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 12px 40px rgb(0 0 0 / 25%); color: var(--chu); }
.hop::backdrop { background: rgb(10 20 40 / 45%); }
.hop__dau { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--vien); position: sticky; top: 0; background: #fff; z-index: 1; }
.hop__dau h2 { font-size: 1.15rem; margin: 0; }
.nut-dong { width: 44px; height: 44px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; border-radius: 8px; color: var(--chu-phu); }
.nut-dong:hover { background: var(--nen-phu); }
.hop__than { padding: 16px 18px 20px; display: grid; gap: 12px; }
.chon-ngay { border: 1px solid var(--vien); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 12px; }
.chon-ngay legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.chon-ngay label { display: flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 500; cursor: pointer; }
.tien-do { height: 8px; background: var(--nen-phu); border-radius: 99px; overflow: hidden; }
.tien-do__thanh { height: 100%; width: 0; background: var(--chinh); transition: width .3s; }
.ds-ket-qua, .ds-tu-khoa { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ds-ket-qua li { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 6px 10px; border-radius: 6px; background: var(--nen); }
.ds-ket-qua .ok { color: var(--xanh-la); font-weight: 600; }
.ds-ket-qua .err { color: var(--do); }
.canh-bao { background: var(--vang-nen); border: 1px solid #ecd27a; border-radius: 8px; padding: 12px; font-size: .9rem; }
.canh-bao p { margin: 6px 0 0; }
.hop--rong { width: min(720px, calc(100vw - 24px)); }
.o-doc { display: grid; gap: 4px; }
.nho { font-size: .82rem; margin: 0; }
.them-tu { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; background: var(--nen); border-radius: 8px; }
@media (min-width: 600px) { .them-tu { grid-template-columns: 1fr 1fr; align-items: end; } .them-tu .nut { justify-self: end; } }
.ds-tu-khoa { display: grid; gap: 14px; }
.nhom-tk { border: 1px solid var(--vien); border-radius: 10px; overflow: hidden; }
.nhom-tk__dau { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; background: var(--nen-phu); }
.nhom-tk__dau h3 { font-size: .98rem; margin: 0; }
.nhom-tk__dau .phu { font-weight: 400; font-size: .82rem; }
.nhom-tk ul { list-style: none; margin: 0; padding: 0; }
.nhom-tk li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: 6px 6px 6px 12px; border-top: 1px solid var(--vien); }
.nhom-tk .tk-ten { font-weight: 600; flex: 1 1 200px; }
.nhom-tk .tk-tt { display: block; font-size: .78rem; color: var(--chu-phu); font-weight: 400; }
.nhom-tk .tk-tat .tk-ten { color: var(--chu-phu); text-decoration: line-through; }
.nhom-tk .tk-dk { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.nhom-tk .o-chon { font-size: .82rem; }
.nhom-tk select { width: auto; max-width: 220px; font-size: .85rem; }
.nut-them-nho { min-height: 44px; border: 0; background: none; color: var(--chinh); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; padding: 0 8px; border-radius: 8px; }
.nut-them-nho:hover { background: #fff; }
.nut-xoa { min-height: 44px; min-width: 44px; border: 0; background: none; color: var(--do); cursor: pointer; border-radius: 8px; font: inherit; }
.nut-xoa:hover { background: var(--do-nen); }

.thong-bao { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--chu); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: calc(100vw - 32px); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.the-nho--lv { background: var(--chinh); color: #fff; }
