/* Trang chủ Máy Tính Gia Khang – cùng kiểu dáng với 8 phân hệ (màu, chữ, bo góc lấy từ style.css của app Kho). */
:root {
  --nen: #F4F6F9;
  --the: #FFFFFF;
  --chu: #111827;
  --chu-phu: #5B6472;
  --vien: #E3E7ED;
  --vien-dam: #D5DBE3;
  --chinh: #1F5FBF;
  --chinh-dam: #174A96;
  --chinh-nhat: #E6EEFA;
  --vang-nen: #FEF3C7;
  --vang-chu: #92400E;
  --vang-vien: #F2C46D;
  --do-nen: #FDECEC;
  --do-chu: #B91C1C;
  --do-vien: #E5B4B4;
  --tat: #C9D3E3;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--nen); color: var(--chu);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
a { color: var(--chinh); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #93B4E6; outline-offset: 2px; }

#app {
  max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; background: var(--nen);
}
@media (min-width: 600px) { #app { border-left: 1px solid var(--vien); border-right: 1px solid var(--vien); } }

.dang-tai { margin: 40vh auto 0; width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--chinh-nhat); border-top-color: var(--chinh); animation: quay 0.8s linear infinite; }
@keyframes quay { to { transform: rotate(360deg); } }

.bang-demo { background: var(--vang-nen); color: var(--vang-chu); font-size: 12px; font-weight: 600; text-align: center; padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); }

/* ---------- Đầu trang ---------- */
.dau {
  background: var(--chinh); color: #fff;
  padding: 14px 16px 18px; padding-top: max(14px, env(safe-area-inset-top));
  display: flex; flex-direction: column; gap: 16px;
  border-radius: 0 0 22px 22px;
}
.dau-hang { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.thuong-hieu { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thuong-hieu img { border-radius: 10px; box-shadow: 0 0 0 2px rgb(255 255 255 / .35); }
.thuong-hieu b { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; }
.thuong-hieu span { display: block; font-size: 12px; opacity: .85; }
.nut-ra {
  height: 40px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .4); background: transparent; color: #fff;
  display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 14px; font-weight: 500; flex-shrink: 0;
}
.nut-ra:hover { background: rgb(255 255 255 / .12); }
@media (max-width: 360px) { .nut-ra span { display: none; } .nut-ra { width: 40px; padding: 0; justify-content: center; } }
.chao { display: flex; align-items: center; gap: 12px; }
.chao .phu { font-size: 13px; opacity: .85; }
.chao b { font-size: 19px; font-weight: 700; }
.avatar {
  width: 48px; height: 48px; border-radius: 24px; background: #fff; color: var(--chinh);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.nhan { display: inline-block; margin-left: 6px; vertical-align: 2px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgb(255 255 255 / .2); }

/* ---------- Thân ---------- */
.than { flex: 1; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.tieu-de { margin: 0; font-size: 16px; font-weight: 600; }
.luoi-o { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.o-phan-he {
  background: var(--the); border: 1px solid var(--vien); border-radius: 18px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--chu); min-height: 150px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.o-phan-he:hover { border-color: var(--chinh); box-shadow: 0 4px 14px rgb(31 95 191 / .12); color: var(--chu); }
.o-phan-he:active { transform: scale(.98); }
.o-phan-he img { border-radius: 12px; margin-bottom: 4px; }
.o-phan-he .ten { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.o-phan-he .mo-ta { font-size: 12.5px; color: var(--chu-phu); line-height: 1.35; }
.chi-qt { color: var(--chu-phu); display: inline-flex; font-style: normal; }
@media (min-width: 520px) { .luoi-o { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.canh-bao {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--do-nen); color: var(--do-chu); border: 1px solid var(--do-vien); font-size: 14px;
}
.canh-bao.vang { background: var(--vang-nen); color: var(--vang-chu); border-color: var(--vang-vien); }

.the-thu { background: var(--the); border: 1px dashed var(--vang-vien); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.the-thu h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--vang-chu); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--vien-dam); background: var(--the);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; text-decoration: none; color: var(--chu);
}
.chip[aria-current="true"] { background: var(--chinh); border-color: var(--chinh); color: #fff; }

/* ---------- Đăng nhập ---------- */
.dang-nhap { justify-content: center; padding: 24px 20px 32px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { border-radius: 14px; }
.logo h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.logo .phu { font-size: 13px; color: var(--chu-phu); }
.dang-nhap form { display: flex; flex-direction: column; gap: 14px; }
.truong { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.truong input {
  height: 52px; border-radius: 12px; border: 1px solid var(--vien-dam); background: var(--the);
  padding: 0 14px; font-size: 16px; outline: none;
}
.truong input:focus { border-color: var(--chinh); box-shadow: 0 0 0 3px var(--chinh-nhat); }
.nut {
  height: 56px; border-radius: 14px; border: none; padding: 0 16px; font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.nut-chinh { background: var(--chinh); color: #fff; }
.nut-chinh:hover { background: var(--chinh-dam); }
.nut-chinh:disabled { background: var(--tat); color: #3F4A5A; }
.nut-vien { background: var(--the); color: var(--chinh); border: 1.5px solid var(--chinh); }
.nut-day { width: 100%; }
.ghi-chu-nho { margin: 0; font-size: 12px; color: var(--chu-phu); text-align: center; }

/* ---------- Chân trang: thông tin công ty ---------- */
.chan-cty {
  padding: 16px 16px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--vien);
  display: flex; flex-direction: column; gap: 3px; text-align: center; font-size: 12px; color: var(--chu-phu);
}
.chan-cty b { color: var(--chu); font-size: 12.5px; letter-spacing: .2px; }
