/* CHAN HAIR · Quảng cáo — tông đen / trắng / vàng kem, đồng bộ các trang Chan Hair khác. Ưu tiên điện thoại. */
:root {
  --ink: #141414; --ink-2: #3a3a3a; --muted: #7a746b; --line: #e7dfd2; --bg: #faf7f2; --card: #ffffff; --cream: #f3e9d7;
  --gold: #b8935a; --gold-d: #9a7841;
  --ok: #2f7d4f; --ok-bg: #e5f3ea; --warn: #9a6a00; --warn-bg: #fdf3d8; --bad: #b3261e; --bad-bg: #fbe7e5; --info: #2c5b8a; --info-bg: #e6eef7;
  --xam: #6f6a62; --xam-bg: #eeebe6;
  --r: 14px; --shadow: 0 1px 2px rgba(20,20,20,.05), 0 4px 16px rgba(20,20,20,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.cho { padding: 40vh 16px 0; text-align: center; color: var(--muted); }

.dau { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: 10px 16px 0; padding-top: max(10px, env(safe-area-inset-top)); }
.dau-in { max-width: 1180px; margin: 0 auto; }
.dau-1 { display: flex; align-items: center; gap: 12px; }
.hieu { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; letter-spacing: .18em; font-size: 21px; white-space: nowrap; }
.hieu b { color: var(--gold); font-weight: 600; }
.dau-ten { font-size: 13px; color: #cfc6b6; border-left: 1px solid #444; padding-left: 12px; white-space: nowrap; }
.dau-nguoi { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #e8e1d4; min-width: 0; }
.dau-nguoi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.the { display: flex; gap: 2px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.the::-webkit-scrollbar { display: none; }
.the button { background: none; border: 0; color: #cfc6b6; padding: 10px 14px; white-space: nowrap; border-bottom: 3px solid transparent; cursor: pointer; font-size: 14px; }
.the button.chon { color: #fff; border-bottom-color: var(--gold); font-weight: 600; }

.than { max-width: 1180px; margin: 0 auto; padding: 14px 12px 60px; }
.o { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.o h2 { margin: 0 0 10px; font-size: 16px; }
.o h3 { margin: 0 0 8px; font-size: 14px; }
.nho { font-size: 12.5px; color: var(--muted); }
.hang { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.day-phai { margin-left: auto; }

.nut { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; cursor: pointer; min-height: 38px; }
.nut:hover { border-color: var(--gold); }
.nut.chinh { background: var(--ink); color: #fff; border-color: var(--ink); }
.nut.vang { background: var(--gold); color: #fff; border-color: var(--gold); }
.nut.nhe { padding: 4px 9px; min-height: 30px; font-size: 13px; }
.nut.chon { background: var(--cream); border-color: var(--gold); font-weight: 600; }
.nut.do { color: var(--bad); }
.nut:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], select, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; min-height: 38px; max-width: 100%; }
textarea { width: 100%; min-height: 84px; resize: vertical; }
label.truong { display: block; margin-bottom: 10px; }
label.truong > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
label.truong > input, label.truong > select { width: 100%; }

.bang-bao { border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }
.bang-bao.vang { background: var(--warn-bg); color: #5c4000; border: 1px solid #f0dca0; }
.bang-bao.do { background: var(--bad-bg); color: #7a1a14; border: 1px solid #f1c4c0; }
.bang-bao.xanh { background: var(--info-bg); color: #1f4468; border: 1px solid #c9d9ea; }

.so-lon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.so-lon .o { margin: 0; padding: 12px; }
.so-lon .nhan { font-size: 12.5px; color: var(--muted); }
.so-lon .gt { font-size: 20px; font-weight: 700; line-height: 1.25; word-break: break-word; }
@media (min-width: 860px) { .so-lon { grid-template-columns: repeat(5, 1fr); } }

.mau { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.mau::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mau.xanh { background: var(--ok-bg); color: var(--ok); } .mau.vang { background: var(--warn-bg); color: var(--warn); }
.mau.do { background: var(--bad-bg); color: var(--bad); } .mau.xam { background: var(--xam-bg); color: var(--xam); }
.tat { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 6px; white-space: nowrap; }

.cuon { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: right; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #fff; position: sticky; top: 0; }
th:first-child, td:first-child { text-align: left; white-space: normal; min-width: 180px; }
td.trai, th.trai { text-align: left; white-space: normal; }
tr.c0 > td { font-weight: 700; background: #fbf8f2; }
tr.c1 > td:first-child { padding-left: 22px; } tr.c2 > td:first-child { padding-left: 40px; } tr.c3 > td:first-child { padding-left: 58px; }
tr.c2 > td, tr.c3 > td { font-size: 13.5px; color: var(--ink-2); }
tr.tong > td { font-weight: 700; border-top: 2px solid var(--ink); background: var(--cream); }
.mo { border: 0; background: none; cursor: pointer; width: 22px; padding: 0; color: var(--gold-d); font-size: 13px; }
.ly-do { display: block; font-size: 12px; color: var(--muted); white-space: normal; max-width: 260px; margin-left: auto; }

.bd { position: relative; width: 100%; }
.bd svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.bd .luoi { stroke: var(--line); stroke-width: 1; }
.bd text { font-size: 11px; fill: var(--muted); }
.bd .cham-moc { cursor: pointer; }
.bd .vung:hover { fill: rgba(184,147,90,.10); }
.chu-thich { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; align-items: center; }
.chu-thich i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.chu-thich .tay { background: var(--gold); border-radius: 50%; } .chu-thich .td { background: var(--info); transform: rotate(45deg) scale(.85); }
.chu-thich .gop { background: var(--ink); border-radius: 50%; } .chu-thich .net { height: 3px; width: 18px; vertical-align: 3px; }
.goi-y { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; z-index: 5; max-width: 240px; white-space: pre-line; }

.thanh { height: 10px; background: var(--xam-bg); border-radius: 999px; overflow: hidden; min-width: 90px; }
.thanh > i { display: block; height: 100%; border-radius: 999px; }
.thanh .xanh { background: var(--ok); } .thanh .vang { background: #d9a400; } .thanh .do { background: var(--bad); } .thanh .xam { background: #b9b3a8; }
.luoi-bd { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 860px) { .luoi-bd { grid-template-columns: 1fr 1fr; } }
.luoi-bd .o { margin: 0; }

.cot-ngang { display: grid; grid-template-columns: minmax(96px, 30%) 1fr auto; gap: 6px 10px; align-items: center; font-size: 13.5px; }
.cot-ngang .ten { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cot-ngang .thanh { height: 16px; border-radius: 6px; } .cot-ngang .thanh > i { border-radius: 6px; }

/* Bảng ngân sách: trên điện thoại mỗi chi nhánh thành 1 khối */
@media (max-width: 760px) {
  table.the-dt thead { display: none; }
  table.the-dt, table.the-dt tbody, table.the-dt tr, table.the-dt td { display: block; width: 100%; }
  table.the-dt tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; background: #fff; }
  table.the-dt tr.tong { background: var(--cream); }
  table.the-dt td { border: 0; padding: 3px 0; text-align: right; white-space: normal; display: flex; justify-content: space-between; gap: 12px; align-items: center; background: none !important; }
  table.the-dt td::before { content: attr(data-nhan); color: var(--muted); font-size: 12.5px; font-weight: 400; text-align: left; }
  table.the-dt td:first-child { font-weight: 700; font-size: 15px; min-width: 0; }
  table.the-dt td:first-child::before { content: none; }
  table.the-dt .thanh { flex: 1; }
}

.hop-nen { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.hop { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
@media (min-width: 620px) { .hop-nen { align-items: center; } .hop { border-radius: 18px; } }
.hop h2 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.hop h2 .nut { margin-left: auto; }
.muc-moc { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.muc-moc .dau-moc { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.kieu-moc { display: inline-block; width: 10px; height: 10px; } .kieu-moc.tay { background: var(--gold); border-radius: 50%; } .kieu-moc.tu_dong { background: var(--info); transform: rotate(45deg); }
.ss { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 6px 10px; font-size: 14px; align-items: center; margin-top: 8px; }
.ss .tieu-de { font-size: 12px; color: var(--muted); }
.giam { color: var(--ok); font-weight: 700; } .tang { color: var(--bad); font-weight: 700; }

.bao { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 80; max-width: 92vw; font-size: 14px; }
.bao.loi { background: var(--bad); }
.dang-nhap { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.dang-nhap .hieu { color: var(--ink); font-size: 28px; text-align: center; margin-bottom: 4px; }
.luoi-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 620px) { .luoi-2 { grid-template-columns: 1fr 1fr; } }
.trong { text-align: center; color: var(--muted); padding: 26px 10px; }
