/* Bảng số Phuhoa Fresh — màu theo bộ nhận diện (Hồ sơ công ty/nhan-dien.css), chế độ tối chọn riêng */
:root {
  color-scheme: light;
  --nen: #f7f5e9; --the: #ffffff; --the-2: #fbfaf2; --vien: #e6e2cc;
  --chu: #12302A; --chu-2: #4a5e57; --chu-3: #6f7f79;
  --chinh: #004D3A; --chinh-nhat: #E0EAE7; --nhan: #FFB500; --nhan-chu: #946900;
  --cot-nay: #477F71; --cot-truoc: #B8CDC8; --cot-hom-nay: #85AAA0;
  --tot: #1f7a45; --xau: #b3261e; --vang-nen: #FFEAB8; --vang-chu: #5c4100; --do-nen: #fde3e1;
  --bong: 0 1px 2px rgba(18,48,42,.06), 0 4px 16px rgba(18,48,42,.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --nen: #0f1a17; --the: #16231f; --the-2: #1b2a26; --vien: #2a3b36;
    --chu: #eef3ef; --chu-2: #b9c6c1; --chu-3: #8fa09a;
    --chinh: #8fd0bb; --chinh-nhat: #1f3a32; --nhan: #FFCA47; --nhan-chu: #FFCA47;
    --cot-nay: #5fae96; --cot-truoc: #2f5249; --cot-hom-nay: #3f7a69;
    --tot: #6fd39a; --xau: #ff8a80; --vang-nen: #4a3a10; --vang-chu: #ffe3a0; --do-nen: #4a1f1c;
    --bong: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --nen: #0f1a17; --the: #16231f; --the-2: #1b2a26; --vien: #2a3b36;
  --chu: #eef3ef; --chu-2: #b9c6c1; --chu-3: #8fa09a;
  --chinh: #8fd0bb; --chinh-nhat: #1f3a32; --nhan: #FFCA47; --nhan-chu: #FFCA47;
  --cot-nay: #5fae96; --cot-truoc: #2f5249; --cot-hom-nay: #3f7a69;
  --tot: #6fd39a; --xau: #ff8a80; --vang-nen: #4a3a10; --vang-chu: #ffe3a0; --do-nen: #4a1f1c;
  --bong: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nen); color: var(--chu); font: 400 15px/1.55 'Be Vietnam Pro', system-ui, sans-serif; }
h1, h2, h3 { font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif; line-height: 1.2; margin: 0; }
h1 { font-size: 22px; } h2 { font-size: 18px; color: var(--chinh); } h3 { font-size: 15px; }
a { color: var(--chinh); }
.khung { max-width: 1180px; margin: 0 auto; padding: 16px 16px 64px; }
.dau { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0 4px; }
.dau .phu { color: var(--chu-2); font-size: 13px; margin-top: 4px; }
.cong-tac { display: inline-flex; border: 1.5px solid var(--chinh); border-radius: 999px; overflow: hidden; }
.cong-tac button { border: 0; background: transparent; color: var(--chinh); font: 600 14px 'Be Vietnam Pro', sans-serif; padding: 8px 14px; min-height: 40px; cursor: pointer; }
.cong-tac button[aria-pressed="true"] { background: var(--chinh); color: var(--nen); }
.nut-nho { border: 1px solid var(--vien); background: var(--the); color: var(--chu-2); border-radius: 999px; padding: 8px 12px; font: 500 13px 'Be Vietnam Pro', sans-serif; cursor: pointer; min-height: 40px; }
.dai-demo { background: var(--nhan); color: #2b1f00; font-weight: 800; border-radius: 12px; padding: 10px 14px; margin: 12px 0; letter-spacing: .02em; }
.bao { border-radius: 12px; padding: 12px 14px; margin: 12px 0; background: var(--the); border: 1px solid var(--vien); font-size: 14px; }
.bao.vang { background: var(--vang-nen); color: var(--vang-chu); border-color: transparent; }
.bao.do { background: var(--do-nen); border-color: transparent; }
.bao b { font-weight: 700; }
.bao button { margin-left: 8px; }
section { margin-top: 28px; }
section > .tieu { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
section > .tieu .ghi { color: var(--chu-3); font-size: 13px; }
.luoi-so { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.the { background: var(--the); border: 1px solid var(--vien); border-radius: 14px; padding: 14px; box-shadow: var(--bong); min-width: 0; }
.the .nhan { font-size: 12.5px; color: var(--chu-2); }
.the .so { font: 700 26px/1.15 'Montserrat', sans-serif; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.the .so.trong { color: var(--chu-3); font-size: 18px; font-weight: 600; }
.the .so-sanh { font-size: 12.5px; color: var(--chu-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12.5px; border-radius: 999px; padding: 1px 8px; background: var(--the-2); border: 1px solid var(--vien); }
.chip.tot { color: var(--tot); } .chip.xau { color: var(--xau); } .chip.it { color: var(--chu-3); font-weight: 500; }
.hai-cot { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.bieu-do { position: relative; }
.bieu-do svg { display: block; width: 100%; height: auto; overflow: visible; }
.bieu-do .truc { fill: var(--chu-3); font-size: 11px; }
.bieu-do .luoi { stroke: var(--vien); stroke-width: 1; }
.chu-giai { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--chu-2); margin-top: 6px; }
.chu-giai i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.goi-y { position: fixed; pointer-events: none; z-index: 50; background: var(--chu); color: var(--nen); font-size: 12.5px; border-radius: 8px; padding: 6px 9px; max-width: 240px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.pheu .hang { display: grid; grid-template-columns: 110px 1fr 92px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13.5px; }
.pheu .thanh { height: 22px; background: var(--the-2); border-radius: 6px; overflow: hidden; }
.pheu .thanh span { display: block; height: 100%; background: var(--cot-nay); border-radius: 0 4px 4px 0; min-width: 2px; }
.pheu .gt { text-align: right; font-variant-numeric: tabular-nums; }
.pheu .gt small { color: var(--chu-3); display: block; font-size: 11.5px; }
.bang-cuon { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 8px; border-bottom: 1px solid var(--vien); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--chu-2); font-weight: 600; font-size: 12.5px; }
.mot-cot { display: grid; gap: 12px; }
.kenh-hai-cot { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 6px; }
@media (max-width: 820px) { .kenh-hai-cot { grid-template-columns: 1fr; } }
.kenh-trong { color: var(--chu-3); font-size: 14px; }
.kenh-trong b { color: var(--chu); }
.ghi-tin { color: var(--chu-3); font-size: 12.5px; margin-top: 8px; }
.bat-thuong { border-left: 4px solid var(--nhan); padding: 8px 12px; margin: 8px 0; background: var(--the); border-radius: 0 10px 10px 0; font-size: 14px; }
.bat-thuong.do { border-color: var(--xau); }
/* Bản đồ nhiệt */
.dieu-khien { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ban-do { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.ban-do.mt { grid-template-columns: minmax(0, 1fr) 320px; }
.khung-anh { position: relative; height: min(78vh, 900px); overflow-y: auto; overflow-x: hidden; border-radius: 14px; border: 1px solid var(--vien); background: #fff; }
.khung-anh .trong-anh { position: relative; margin: 0 auto; }
.khung-anh img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.khung-anh canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.khung-anh .vach { position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(0,0,0,.55); pointer-events: none; }
.khung-anh .vach span { position: absolute; right: 6px; top: -12px; background: rgba(0,0,0,.72); color: #fff; font: 700 12px 'Be Vietnam Pro', sans-serif; padding: 2px 8px; border-radius: 999px; }
.thang-mau { height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(255,214,102,.35), #ff9f1c, #e4572e, #8c1c13); margin: 6px 0 2px; }
.thang-chu { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--chu-3); }
.toi-phan .hang { display: grid; grid-template-columns: 1fr 54px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.toi-phan .thanh { grid-column: 1 / -1; height: 6px; background: var(--the-2); border-radius: 3px; overflow: hidden; margin-top: -2px; }
.toi-phan .thanh span { display: block; height: 100%; background: var(--cot-nay); }
.toi-phan .ten small { color: var(--chu-3); display: block; font-size: 11.5px; }
.toi-phan .pt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.nut-clarity { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; border-radius: 12px; background: var(--chinh); color: var(--nen); font: 700 15px 'Be Vietnam Pro', sans-serif; text-decoration: none; margin-top: 12px; border: 0; }
.nut-clarity[aria-disabled="true"] { background: var(--the-2); color: var(--chu-3); border: 1px dashed var(--vien); cursor: not-allowed; }
.chan { margin-top: 36px; color: var(--chu-3); font-size: 12.5px; }
.chan .noi { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; }
.dang-tai { color: var(--chu-3); padding: 40px 0; text-align: center; }
@media (max-width: 820px) {
  .ban-do, .ban-do.mt { grid-template-columns: 1fr; }
  .khung-anh { height: 70vh; }
  .the .so { font-size: 22px; }
}
@media (max-width: 420px) {
  .pheu .hang { grid-template-columns: 86px 1fr 76px; }
  .luoi-so { grid-template-columns: 1fr 1fr; }
}
/* Đăng nhập */
.dang-nhap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.dang-nhap form { width: 100%; max-width: 360px; background: var(--the); border: 1px solid var(--vien); border-radius: 16px; padding: 24px; box-shadow: var(--bong); }
.dang-nhap input { width: 100%; font: 400 16px 'Be Vietnam Pro', sans-serif; border: 1.5px solid var(--vien); border-radius: 10px; padding: 10px 12px; min-height: 46px; background: var(--the-2); color: var(--chu); margin: 14px 0 10px; }
.dang-nhap button { width: 100%; min-height: 46px; border: 0; border-radius: 10px; background: var(--chinh); color: var(--nen); font: 700 15px 'Be Vietnam Pro', sans-serif; cursor: pointer; }
.dang-nhap .loi { color: var(--xau); font-size: 13.5px; min-height: 20px; }
