/* Thu Chi Điểm Dừng v2 — phong cách báo cáo «số to + cột ngày + dự kiến» (user chọn 2026-10-10) */
:root {
  --bg: #f4f6f5;
  --card: #ffffff;
  --ink: #0f1d17;
  --ink-2: #3b4a43;
  --muted: #7a8781;
  --line: #e7ecea;
  --g1: #10b981;
  --g2: #059669;
  --g3: #047857;
  --g-soft: #e8f7f0;
  --bad: #e5484d;
  --bad-soft: #fdecec;
  --warn: #c2410c;
  --warn-soft: #fff4e5;
  --r: 22px;
  --dock-h: 72px;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.am { color: var(--bad) !important; }
.muted { color: var(--muted); font-size: 13px; }

/* —— Top bar —— */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 0; background: linear-gradient(135deg, #34d399, #059669 60%, #f59e0b); }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--g2); }
.brand-name b { color: #f59e0b; font-weight: 800; }
.pill-v2 { font-size: 12px; font-weight: 700; color: var(--g3); background: var(--g-soft); padding: 7px 12px; border-radius: 999px; }
.ribbon { margin: 10px 16px 0; padding: 8px 12px; font-size: 12.5px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }
.ribbon a { text-decoration: underline; font-weight: 700; }

.page { padding: 0 0 8px; }

/* —— Hero —— */
.hero {
  position: relative; overflow: hidden;
  background: var(--card); padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; right: -80px; top: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.16), rgba(16,185,129,0) 70%); pointer-events: none;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--g2); }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--g1); box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.status-live i { animation: nhip 1.6s ease-in-out infinite; }
.status-thieu { color: var(--warn); }
.status-thieu i { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.18); }
@keyframes nhip { 50% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }
.seg-mini { display: flex; background: #f0f3f2; border-radius: 12px; padding: 3px; }
.seg-mini a { padding: 6px 14px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg-mini a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,29,23,.12); }
.hero-label { margin: 14px 0 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.tag-tam { display: inline-block; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 2px 7px; vertical-align: 2px; }
.tag-do { font-size: 12px; font-weight: 800; color: #fff; background: var(--bad); border-radius: 999px; padding: 2px 9px; }
.hero-num {
  margin: 2px 0 0; font-weight: 800; letter-spacing: -.045em; line-height: 1.05;
  font-size: clamp(38px, 11.5vw, 52px); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--g1), var(--g3)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-num.am { background: linear-gradient(180deg, #f87171, #b91c1c); -webkit-background-clip: text; background-clip: text; }
.hero-num small { font-size: .5em; margin-left: 2px; opacity: .45; }
.hero-delta { margin: 8px 0 0; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.hero-delta b { font-weight: 800; }
.hero-delta.len b { color: var(--g2); }
.hero-delta.xuong b { color: var(--bad); }
.hero-delta span { color: var(--ink-2); border-bottom: 1.5px dashed #c9d2ce; padding-bottom: 2px; }
.badge-fire { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 800; color: #7c2d12; background: linear-gradient(180deg, #fde68a, #fbbf24); border: 1px solid #f59e0b; border-radius: 999px; padding: 4px 12px; }

/* —— Chart —— */
.chart { position: relative; margin: 18px 0 0; }
.chart svg { width: 100%; height: 172px; }
.chart .grid { stroke: #e3e8e6; stroke-dasharray: 3 4; }
.chart .truc { stroke: #dfe5e2; }
.chart .moc { stroke: #94a39c; stroke-width: 2; stroke-linecap: round; opacity: .8; }
.chart-max { position: absolute; left: 0; top: -16px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.chart-x { position: relative; height: 18px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.chart-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; }
.lg-bar { width: 10px; height: 12px; border-radius: 3px; background: linear-gradient(#34d399, #059669); }
.lg-moc { width: 14px; height: 2.5px; border-radius: 2px; background: #94a39c; }
.lg-soc { width: 10px; height: 12px; border-radius: 3px; background: repeating-linear-gradient(45deg, #eef2f0 0 2px, #cfd8d3 2px 4px); }
.lg-thieu { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }

/* —— Segmented + chips —— */
.seg { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.seg a, .seg-cal { flex: 0 0 auto; padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.seg a.on, .seg-cal.on { background: linear-gradient(180deg, var(--g1), var(--g2)); color: #fff; box-shadow: 0 6px 14px rgba(5,150,105,.28); }
.seg-cal { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 9px 12px; }
.seg-cal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.seg-cal input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: #f2f5f4; border: 2px solid transparent; }
.chip.on { background: #fff; border-color: var(--g1); }
.chip-ico { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 17px; box-shadow: inset 0 0 0 2px #d9e7e0; font-weight: 800; color: var(--g2); }
.chip.on .chip-ico { box-shadow: inset 0 0 0 2px var(--g1); }
.chip-ico em { position: absolute; right: -4px; bottom: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; border: 2px solid #fff; }
.chip b { font-size: 15px; }
.chip-so { color: var(--muted); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

/* —— Cards —— */
.card { background: var(--card); border-radius: var(--r); margin: 14px 16px 0; padding: 16px; box-shadow: 0 1px 2px rgba(15,29,23,.04), 0 10px 30px rgba(15,29,23,.05); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

.du-kien { position: relative; display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, #e7f8f0 0%, #f0fbf7 45%, #e4f3f6 100%); }
.ring { width: 92px; height: 92px; flex: 0 0 auto; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-nen { stroke: rgba(5,150,105,.12); }
.ring-chay { stroke: url(#none); stroke: var(--g2); stroke-linecap: round; }
.ring-pct { position: absolute; left: 16px; width: 92px; text-align: center; font-weight: 800; font-size: 21px; }
.dk-k { margin: 0; font-weight: 700; color: var(--g3); font-size: 14.5px; }
.dk-v { margin: 2px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--g3); }
.dk-s { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.dk-s b { color: var(--g2); }
.dk-m { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 16px 0; }
.grid2 .card { margin: 0; }
.tile { padding: 14px; }
.tile-k { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.tile-k i { width: 9px; height: 9px; border-radius: 50%; }
.tile-v { margin: 6px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile-d { margin: 4px 0 0; font-size: 12.5px; font-weight: 800; }
.tile-d span { font-weight: 500; color: var(--muted); }
.tile-d.tot { color: var(--g2); }
.tile-d.xau { color: var(--bad); }
.nl-bar { position: relative; height: 7px; border-radius: 4px; background: #eef2f0; margin-top: 8px; }
.nl-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: #0ea5e9; }
.nl.vuot .nl-bar span { background: var(--bad); }
.nl-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }

.cd-list, .bar-list, .kv-list { list-style: none; margin: 0; padding: 0; }
.cd-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cd-list li:first-child { border-top: 0; padding-top: 2px; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; flex: 0 0 auto; }
.av-nghia { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.av-phuc { background: linear-gradient(135deg, #f59e0b, #d97706); }
.av-chung_ho { background: linear-gradient(135deg, #34d399, #059669); }
.av-kep { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.cd-ten { flex: 1; display: flex; flex-direction: column; }
.cd-ten b { font-size: 15px; }
.cd-ten small { color: var(--muted); font-size: 12.5px; }
.cd-tien { font-weight: 800; font-size: 15.5px; font-variant-numeric: tabular-nums; }

.bar-list li { display: grid; grid-template-columns: 1fr 40px; gap: 4px 10px; align-items: center; padding: 8px 0; }
.bl-top { display: flex; justify-content: space-between; font-size: 14.5px; }
.bl-top b { font-variant-numeric: tabular-nums; }
.bl-track { grid-column: 1; height: 7px; border-radius: 4px; background: #f1f4f3; overflow: hidden; }
.bl-track span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #fb923c, #f97316); }
.bar-list small { grid-column: 2; grid-row: 1 / span 2; text-align: right; color: var(--muted); font-weight: 700; }
.kv-list li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv-list li:first-child { border-top: 0; }
.kv-list b { font-variant-numeric: tabular-nums; }

.thieu-list { display: flex; flex-wrap: wrap; gap: 8px; }
.thieu-list a { padding: 8px 12px; border-radius: 12px; background: var(--bad-soft); color: #b42318; font-weight: 700; font-size: 14px; }
.thieu-list a span { font-weight: 600; opacity: .75; margin-left: 4px; }

/* —— Dock —— */
.dock {
  position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding: 8px 6px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: start;
  background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.dock-item, .dock-fab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dock-ico { width: 52px; height: 32px; border-radius: 16px; display: grid; place-items: center; }
.dock-ico svg, .fab-ring svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dock-item.on { color: var(--g3); }
.dock-item.on .dock-ico { background: var(--g-soft); }
.dock-fab { color: var(--g3); font-weight: 700; }
.fab-ring { width: 46px; height: 46px; margin-top: -16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, var(--g1), var(--g3)); box-shadow: 0 8px 18px rgba(5,150,105,.35), 0 0 0 4px #fff; }
.fab-ring svg { stroke-width: 2.6; }

/* —— Trang chưa làm —— */
.sap-lam { text-align: center; padding: 48px 24px; color: var(--muted); }
.sap-lam h1 { color: var(--ink); font-size: 20px; }

/* —— Wow: cột mọc lên, chạm cột, điểm đáng chú ý —— */
.chart .cot { transform-box: fill-box; transform-origin: 50% 100%; animation: moc .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--tre, 0ms); }
@keyframes moc { from { transform: scaleY(0); opacity: .3; } }
.chart .chon-vach { stroke: var(--g3); stroke-width: 1.2; stroke-dasharray: 3 3; }
.cham-lop { position: absolute; left: 0; right: 0; top: 0; height: 172px; }
.cham { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.cham.on { background: rgba(16,185,129,.08); }
.tip { position: absolute; top: 0; z-index: 5; width: 236px; padding: 12px 14px; border-radius: 16px;
  background: rgba(16,35,27,.96); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.25); animation: hien .18s ease-out; }
.tip-h { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #a7f3d0; }
.tip-r { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 2px 0; }
.tip-r span { color: #b7c7c0; }
.tip-r b { font-variant-numeric: tabular-nums; }
.tip-r b.cam { color: #fdba74; }
.tip-r b.do { color: #fca5a5; }
.tip-r b.xanh { color: #6ee7b7; }
.tip-m { margin: 6px 0 0; font-size: 12.5px; color: #b7c7c0; }
.tip-m b { color: #fff; }
.tip-thieu { margin: 0; font-weight: 700; color: #fca5a5; }
.tip-a { display: block; margin-top: 10px; text-align: center; padding: 8px; border-radius: 10px; background: var(--g2); font-weight: 800; font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .chart .cot, .mon.moi, .tip { animation: none; } }

.diem-nhan { margin: 18px 0 0; }
.dn-tieu { margin: 0 16px 10px; font-size: 16px; font-weight: 800; }
.dn-cuon { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.dn-cuon::-webkit-scrollbar { display: none; }
.dn { position: relative; flex: 0 0 76%; scroll-snap-align: start; padding: 14px 14px 14px 16px; border-radius: var(--r); background: #fff; box-shadow: 0 1px 2px rgba(15,29,23,.04), 0 10px 30px rgba(15,29,23,.05); overflow: hidden; }
.dn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.dn-tang::before { background: #f97316; }
.dn-giam::before { background: var(--g1); }
.dn-lon::before { background: #6366f1; }
.dn-ico { position: absolute; right: 12px; top: 10px; font-size: 26px; opacity: .9; }
.dn-k { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding-right: 36px; }
.dn-v { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.dn-tang .dn-v { color: #ea580c; }
.dn-giam .dn-v { color: var(--g2); }
.dn-lon .dn-v { font-size: 20px; color: #4338ca; }
.dn-v small { font-size: 14px; font-weight: 700; }
.dn-s { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

/* ============================================================
   Cân chỉnh mobile (360–430px) — 2026-10-10
   ============================================================ */
/* Dòng trạng thái: 1 dòng, cắt «…» thay vì xuống dòng */
.hero-top .status { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 1.6; }
.hero-top .status i { display: inline-block; vertical-align: 1px; margin-right: 7px; }
.hero-top .seg-mini { flex: 0 0 auto; }
/* Số to: co theo độ dài để không tràn (vd. 1.219.xxx.xxx) */
.hero-num { font-size: clamp(34px, 11vw, 52px); white-space: nowrap; }
.hero-num.dai { font-size: clamp(30px, 9.2vw, 46px); }
.chart { margin-top: 24px; }
/* Chip: gọn hơn, mờ dần mép phải báo còn cuộn được */
.chips { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 40px; }
.chip { padding: 6px 12px 6px 6px; gap: 7px; }
.chip-ico { width: 30px; height: 30px; font-size: 15px; }
.chip b { font-size: 14.5px; }
.chip-so { font-size: 13.5px; }
/* Tiêu đề thẻ: số tổng không gãy dòng */
.card-head h2 { min-width: 0; }
.card-head > .muted, .card-head > .tong-nho { flex: 0 0 auto; white-space: nowrap; }
/* Ô 2 cột: cùng chiều cao, nhãn 1 dòng */
.grid2 { align-items: stretch; }
.tile { display: flex; flex-direction: column; }
.tile-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-v { font-size: clamp(21px, 6.6vw, 26px); }
.tile-d { margin-top: auto; padding-top: 4px; }

@media (max-width: 400px) {
  .du-kien { gap: 12px; padding: 14px; }
  .ring { width: 74px; height: 74px; }
  .ring-pct { left: 14px; width: 74px; font-size: 18px; }
  .dk-v { font-size: 30px; }
  .dk-s { font-size: 13.5px; }
  .seg a, .seg-cal { padding: 9px 13px; font-size: 14.5px; }
  .hero-label { font-size: 14px; }
  .dn { flex-basis: 82%; }
}
@media (max-width: 400px) {
  .seg { gap: 4px; }
  .seg a, .seg-cal { padding: 9px 11px; font-size: 14px; }
  .seg-cal { gap: 5px; }
  .seg-cal svg { width: 20px; height: 20px; }
}

/* —— Cảnh báo chi cố định chưa nhập —— */
.chip-cd { position: absolute; left: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: #f59e0b; color: #fff; font-style: normal; font-size: 11px; font-weight: 900; line-height: 16px; text-align: center; border: 2px solid #fff; }
.hero-canh { display: block; margin-top: 8px; padding: 8px 11px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; }
.hero-canh b { font-weight: 800; }
.canh-cd { border: 1.5px solid #fcd9a6; background: #fffaf2; }
.canh-cd.qua-han { border-color: #fbb4a8; background: #fff6f4; }
.ccd-dau { display: flex; gap: 12px; align-items: flex-start; }
.ccd-ico { font-size: 26px; line-height: 1; }
.ccd-dau h2 { margin: 0; font-size: 16px; font-weight: 800; color: #9a3412; }
.canh-cd.qua-han .ccd-dau h2 { color: #b42318; }
.ccd-dau p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.ccd-ds { list-style: none; margin: 12px 0 0; padding: 0; }
.ccd-ds li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed #f3d2c8; }
.ccd-ten { font-weight: 700; font-size: 14.5px; min-width: 0; }
.ccd-so { text-align: right; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ccd-so small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ccd-ds li.qh .ccd-so { color: #b42318; }
.ccd-ds li.st { opacity: .75; }
.ccd-nut { display: block; margin-top: 12px; text-align: center; padding: 12px; border-radius: 14px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #f97316, #c2410c); box-shadow: 0 6px 14px rgba(194,65,12,.25); }
.dk-s b.xuong { color: var(--bad); }
/* Ô chọn tháng trong suốt: 16px để iOS không phóng to khi chạm */
.seg-cal input { font-size: 16px; }

/* ============================================================
   Hoa lá «tươi xanh, phát triển» (2026-10-10) — chỉ ở mép / khoảng trống, không đè số
   ============================================================ */
.hl { display: block; overflow: visible; pointer-events: none; }
/* Lá mọc từ cuống, lần lượt dọc cành */
.hl .la { transform-box: fill-box; transform-origin: 0% 50%; animation: la-moc .6s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--tre, 0ms); }
@keyframes la-moc { from { transform: scale(0); opacity: 0; } }
/* Thân cành vẽ dần */
.hl .than { stroke-dasharray: 300; stroke-dashoffset: 300; animation: than-moc 1.1s ease-out forwards; }
@keyframes than-moc { to { stroke-dashoffset: 0; } }
/* Cành đung đưa nhẹ quanh gốc */
.hl-canh { animation: la-dua 7s ease-in-out 1.2s infinite; transform-origin: 7% 93%; }
@keyframes la-dua { 50% { transform: rotate(-3deg); } }
/* Dây lá góc dưới-trái, chìm sau nội dung */
.hl-goc { position: fixed; z-index: 0; left: -22px; bottom: 76px; width: 130px; opacity: .2; pointer-events: none; }
.page, .g1 { position: relative; z-index: 1; }
/* Cành lá rủ từ góc phải thanh trên (Tổng quan) */
.topbar { overflow: hidden; }
.topbar > :not(.hl) { position: relative; z-index: 1; }
.hl-dau { position: absolute; z-index: 0; right: -18px; top: -48px; width: 120px; opacity: .3; animation: la-dua-dau 7s ease-in-out 1.2s infinite; transform: rotate(180deg); }
@keyframes la-dua-dau { 0%, 100% { transform: rotate(180deg); } 50% { transform: rotate(183deg); } }
@media (prefers-reduced-motion: reduce) {
  .hl .la, .hl .than, .hl-canh, .hl-dau { animation: none !important; stroke-dashoffset: 0; }
}
/* Topbar: xoay quanh tâm để cành lật 180° vẫn nằm trong thanh (gốc mặc định ở dưới-trái làm cành văng ra ngoài) */
.topbar .hl-dau { transform-origin: 50% 50%; top: -62px; right: 96px; width: 128px; opacity: .32; }
/* Nút «Dòng tiền / Doanh thu» (đổi từ Lãi/Thu 2026-10-11): chữ dài hơn → gọn lại để dòng trạng thái không bị cắt */
.seg-mini a { padding: 6px 11px; font-size: 13.5px; white-space: nowrap; }
@media (max-width: 380px) {
  .seg-mini a { padding: 6px 9px; font-size: 13px; }
  .hero-top .status { font-size: 11px; letter-spacing: .02em; }
}
/* —— «Doanh thu | Dòng tiền» (2026-10-11): ô đang chọn = viên xanh nổi (cùng kiểu nút chính / seg tháng), trượt khi đổi —— */
.seg-mini { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 14px; background: #eef3f1; box-shadow: inset 0 0 0 1px #e1e9e5; }
.seg-mini a { position: relative; z-index: 1; text-align: center; color: var(--muted); font-weight: 700; transition: color .25s; }
.seg-mini a.on { color: #fff; background: none; box-shadow: none; text-shadow: 0 1px 1px rgba(4,120,87,.35); }
.seg-mini a:not(.on):active { color: var(--ink-2); }
.seg-con { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 11px;
  background: linear-gradient(180deg, #34d399, var(--g2)); box-shadow: 0 6px 14px rgba(5,150,105,.32), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .34s cubic-bezier(.3,1.35,.5,1), background .3s; }
.seg-mini.phai .seg-con { transform: translateX(100%); background: linear-gradient(180deg, var(--g1), var(--g3)); }
@media (prefers-reduced-motion: reduce) { .seg-con { transition: none; } }

/* ============================================================
   Thanh dưới nổi (2026-10-11, user: «icon không đẹp, rời rạc»):
   viên kính nổi bo tròn · bộ icon đồng bộ · mục đang chọn = viên xanh chuyển màu trượt tới (cùng kiểu «Doanh thu | Dòng tiền»)
   ============================================================ */
:root { --dock-h: 66px; }
body { padding-bottom: calc(var(--dock-h) + 34px + env(safe-area-inset-bottom)); }
.dock {
  left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 456px; height: var(--dock-h); padding: 6px;
  display: grid; grid-template-columns: repeat(var(--so, 4), 1fr); align-items: stretch;
  border: 0; border-radius: 24px; background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 12px 32px rgba(15,29,23,.16), 0 2px 6px rgba(15,29,23,.06), inset 0 0 0 1px rgba(255,255,255,.7), 0 0 0 1px rgba(15,29,23,.05);
}
.dock-vien {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--so, 4)); border-radius: 18px;
  background: linear-gradient(180deg, #34d399, var(--g2)); box-shadow: 0 6px 16px rgba(5,150,105,.35), inset 0 1px 0 rgba(255,255,255,.35);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .45s cubic-bezier(.3,1.35,.5,1);
}
.dock-vien.tat-chuyen { transition: none; }
.dock-item { position: relative; z-index: 1; justify-content: center; gap: 2px; border-radius: 18px; color: #6b7a73; font-size: 11.5px; font-weight: 700; letter-spacing: -.01em; transition: color .25s; -webkit-tap-highlight-color: transparent; }
.dock-item:active { transform: scale(.95); }
.dock-ico { width: auto; height: 26px; border-radius: 0; background: none !important; display: grid; place-items: center; }
.dock-ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.dock-ico svg .to { fill: currentColor; fill-opacity: 0; transition: fill-opacity .25s; }
.dock-item.on { color: #fff; }
.dock-item.on .dock-ico svg { transform: translateY(-1px) scale(1.06); }
.dock-item.on .dock-ico svg .to { fill-opacity: .22; }
.dock-item.on .dock-chu { text-shadow: 0 1px 1px rgba(4,120,87,.3); }
.dock-item:not(.on):hover { color: var(--g3); }
.hl-goc { bottom: calc(var(--dock-h) + 22px); }
#toast-chung { bottom: calc(var(--dock-h) + 26px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .dock-vien, .dock-ico svg { transition: none; } }
/* Thanh dưới nằm SÁT ĐÁY (user 2026-10-11), bo 2 góc trên; chừa đệm dưới chữ + vùng thanh vuốt iPhone để chữ không dính mép */
.dock {
  bottom: 0; width: 100%; max-width: 480px; border-radius: 22px 22px 0 0;
  height: calc(var(--dock-h) + 10px + env(safe-area-inset-bottom));
  padding: 7px 8px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(15,29,23,.10), 0 -1px 0 rgba(15,29,23,.06);
}
.dock-vien { top: 7px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 8px; width: calc((100% - 16px) / var(--so, 4)); }
body { padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); }
.hl-goc { bottom: calc(var(--dock-h) + 12px); }
#toast-chung { bottom: calc(var(--dock-h) + 20px + env(safe-area-inset-bottom)); }
/* Logo v2 trên thanh trên */
.brand-logo { width: 30px; height: 30px; border-radius: 9px; background: none; box-shadow: 0 3px 10px rgba(5,150,105,.25); }

/* ============================================================
   Hiệu ứng (2026-10-11): số chạy · vệt sáng tiền · thẻ nổi dần · chuyển trang
   ============================================================ */
/* Số chạy xong: nảy nhẹ */
.so-xong { display: inline-block; animation: so-bat .45s cubic-bezier(.3,1.7,.5,1); }
@keyframes so-bat { 40% { transform: scale(1.08); } }
/* Số to: đếm xong thì vệt sáng lướt qua như ánh tiền */
.hero-num { background-image: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%), linear-gradient(180deg, var(--g1), var(--g3));
  background-size: 260% 100%, 100% 100%; background-position: 160% 0, 0 0; background-repeat: no-repeat; }
.hero-num.am { background-image: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.75) 50%, transparent 62%), linear-gradient(180deg, #f87171, #b91c1c); }
.hero-num.lap-lanh { animation: lap-lanh 1.1s .1s ease-out both; }
@keyframes lap-lanh { from { background-position: 160% 0, 0 0; } to { background-position: -60% 0, 0 0; } }
/* Thẻ nổi dần khi cuộn tới */
.cho-vao:not(.vao-dan) { opacity: 0; transform: translateY(18px); }
.vao-dan { animation: vao-dan .42s cubic-bezier(.2,.85,.25,1) both; animation-delay: var(--tre, 0ms); }
@keyframes vao-dan { from { opacity: 0; transform: translateY(18px) scale(.985); } }

/* Chuyển trang v3 (2026-10-11, user: «lướt, chuyển trang thật ấn tượng — làm tôi wow»). Kiểu do chung.js / luot.js chọn:
   tien / lui — sang MÀN KHÁC: kiểu app iPhone — trang mới đẩy vào từ phải phủ lên, trang cũ lùi 28% và tối dần
                (nền xanh đêm lộ ra), mép trang mới đổ bóng. ← thì ngược lại.
   sau / truoc — CÙNG MÀN đổi tháng / ngày: thanh trên, thanh dưới, ô nhập đứng yên; chỉ nội dung lướt ngang.
   doi        — cùng màn đổi quán / kỳ: thanh đứng yên, nội dung mới nổi lên tại chỗ.
   keo        — sau khi vuốt mép trái về: trang cũ đã bị kéo đi, trang trước sáng dần lên.
   Chỉ transform + opacity (GPU, mượt trên điện thoại). */
@view-transition { navigation: auto; }
:root { --vt-t: .9s;   /* user 2026-10-11 chê nhanh 2 lần: .46 → .7 → .9s */ --vt-e: cubic-bezier(.32,.72,0,1); }
::view-transition { background: var(--bg); }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: var(--vt-t); animation-timing-function: var(--vt-e); animation-fill-mode: both; mix-blend-mode: normal;
}
::view-transition-old(root) { animation-name: vt-mo; animation-duration: .4s; }
::view-transition-new(root) { animation-name: vt-noi; animation-duration: .7s; }

/* Màn khác */
html[data-vt=tien]::view-transition, html[data-vt=lui]::view-transition,
html[data-vt=keo]::view-transition { background: #04110b; }
html[data-vt=tien]::view-transition-old(root) { animation-name: vt-lui-sau; }
html[data-vt=tien]::view-transition-new(root) { animation-name: vt-day-vao; box-shadow: -16px 0 40px rgba(2,20,12,.35); }
html[data-vt=lui]::view-transition-old(root) { animation-name: vt-day-ra; z-index: 2; box-shadow: -16px 0 40px rgba(2,20,12,.35); }
html[data-vt=lui]::view-transition-new(root),
html[data-vt=keo]::view-transition-new(root) { animation-name: vt-tien-len; }
html[data-vt=keo]::view-transition-old(root) { animation: vt-mo .3s linear both; z-index: 2; }

/* Cùng màn: thanh đứng yên (chỉ đặt tên khi đúng kiểu — màn khác thì thanh đi cùng trang) */
html[data-vt=sau] .topbar, html[data-vt=truoc] .topbar, html[data-vt=doi] .topbar { view-transition-name: vt-tren; }
html[data-vt=sau] .g2-dau, html[data-vt=truoc] .g2-dau, html[data-vt=doi] .g2-dau { view-transition-name: vt-dau; }
html[data-vt=sau] .dock, html[data-vt=truoc] .dock, html[data-vt=doi] .dock { view-transition-name: vt-duoi; }
html[data-vt=sau] .g1-chan, html[data-vt=truoc] .g1-chan, html[data-vt=doi] .g1-chan { view-transition-name: vt-chan; }
::view-transition-group(vt-tren), ::view-transition-group(vt-dau), ::view-transition-group(vt-duoi), ::view-transition-group(vt-chan) { animation-duration: .6s; animation-timing-function: var(--vt-e); }
/* Thanh không mờ chồng 2 bản (nhoè): bản mới hiện ngay, bản cũ ẩn — nhìn như thanh đứng yên, chỉ chữ tháng đổi */
::view-transition-old(vt-tren), ::view-transition-old(vt-dau), ::view-transition-old(vt-duoi), ::view-transition-old(vt-chan) { animation: none; opacity: 0; }
::view-transition-new(vt-tren), ::view-transition-new(vt-dau), ::view-transition-new(vt-duoi), ::view-transition-new(vt-chan) { animation: none; }
html[data-vt=sau]::view-transition-old(root) { animation: vt-ra-trai .5s cubic-bezier(.4,0,1,1) both; }
html[data-vt=sau]::view-transition-new(root) { animation: vt-vao-phai .82s var(--vt-e) both; }
html[data-vt=truoc]::view-transition-old(root) { animation: vt-ra-phai .5s cubic-bezier(.4,0,1,1) both; }
html[data-vt=truoc]::view-transition-new(root) { animation: vt-vao-trai .82s var(--vt-e) both; }
html[data-vt=doi]::view-transition-old(root) { animation: none; }
html[data-vt=doi]::view-transition-new(root) { animation: vt-noi .78s var(--vt-e) both; }

@keyframes vt-mo { to { opacity: 0; } }
@keyframes vt-noi { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes vt-lui-sau { to { transform: translateX(-28%) scale(.97); opacity: .4; } }
@keyframes vt-day-vao { from { transform: translateX(100%); } }
@keyframes vt-day-ra { to { transform: translateX(100%); } }
@keyframes vt-tien-len { from { transform: translateX(-28%) scale(.97); opacity: .4; } }
@keyframes vt-ra-trai { to { opacity: 0; transform: translateX(-18%); } }
@keyframes vt-vao-phai { from { opacity: 0; transform: translateX(22%); } }
@keyframes vt-ra-phai { to { opacity: 0; transform: translateX(18%); } }
@keyframes vt-vao-trai { from { opacity: 0; transform: translateX(-22%); } }
/* Dự phòng khi trình duyệt KHÔNG có View Transitions giữa 2 trang (iPhone iOS < 18.2) — cùng kiểu, cùng tốc độ.
   Trang mới: html.vao-<kiểu> (gắn ở <head>, layout.php). Trang cũ: html.ra-<kiểu> (diTrang trong chung.js) rồi mới chuyển.
   Dịch từng thanh/khối con của body (dịch cả body làm hỏng thanh cố định). */
html.vao-tien body > :is(.topbar, .g2-dau, main, .dock, .g1-chan) { animation: fb-vao-phai var(--vt-t) var(--vt-e) both; }
html.vao-lui body > :is(.topbar, .g2-dau, main, .dock, .g1-chan),
html.vao-keo body > :is(.topbar, .g2-dau, main, .dock, .g1-chan) { animation: fb-vao-trai var(--vt-t) var(--vt-e) both; }
html.vao-sau body > main { animation: vt-vao-phai .82s var(--vt-e) both; }
html.vao-truoc body > main { animation: vt-vao-trai .82s var(--vt-e) both; }
html.vao-doi body > main { animation: vt-noi .78s var(--vt-e) both; }
html.ra-tien body > :is(.topbar, .g2-dau, main, .dock, .g1-chan) { animation: fb-ra-trai .3s cubic-bezier(.4,0,1,1) forwards; }
html.ra-lui body > :is(.topbar, .g2-dau, main, .dock, .g1-chan) { animation: fb-ra-phai .3s cubic-bezier(.4,0,1,1) forwards; }
html.ra-sau body > main { animation: vt-ra-trai .3s cubic-bezier(.4,0,1,1) forwards; }
html.ra-truoc body > main { animation: vt-ra-phai .3s cubic-bezier(.4,0,1,1) forwards; }
html.ra-doi body > main { animation: vt-mo .3s ease-in forwards; }
@keyframes fb-vao-phai { from { opacity: 0; transform: translateX(45%); } }
@keyframes fb-vao-trai { from { opacity: 0; transform: translateX(-30%); } }
@keyframes fb-ra-trai { to { opacity: 0; transform: translateX(-25%); } }
@keyframes fb-ra-phai { to { opacity: 0; transform: translateX(35%); } }
/* Trình duyệt có View Transitions: tắt hiệu ứng «trang trượt vào» tự làm của trang toàn màn (kẻo trượt 2 lần) */
/* «html body» để thắng trang.css (nạp sau, cùng độ ưu tiên) — trước đây luật này không ăn */
html body.toan-trang > .g2-dau, html body.toan-trang > main { animation: none; }

/* ============================================================
   Lướt (luot.js, 2026-10-11): vuốt mép trái để quay lại · kéo xuống làm mới
   ============================================================ */
.keo-nen { position: fixed; inset: 0; z-index: 1; pointer-events: none; visibility: hidden; overflow: hidden;
  background: radial-gradient(130% 70% at 0% 50%, #0d4a31 0%, #062519 55%, #04110b 100%); }
body.dang-keo .keo-nen { visibility: visible; }
body.dang-keo > main { position: relative; z-index: 2; background: var(--bg); }
body.dang-keo > .g2-dau, body.dang-keo > main, body.dang-keo > .g1-chan { transform: translateX(var(--keo, 0px)); will-change: transform; }
body.keo-ve > .g2-dau, body.keo-ve > main, body.keo-ve > .g1-chan { transition: transform .3s var(--vt-e); }
body.keo-di > .g2-dau, body.keo-di > main, body.keo-di > .g1-chan { transition: transform .38s cubic-bezier(.3,.5,.5,1); }
/* Bóng đổ ở mép trang đang bị kéo */
.keo-bong { position: absolute; top: 0; bottom: 0; left: -36px; width: 36px; transform: translateX(var(--keo, 0px));
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.38)); }
body.keo-ve .keo-bong { transition: transform .3s var(--vt-e); }
body.keo-di .keo-bong { transition: transform .38s cubic-bezier(.3,.5,.5,1); }
/* Mũi tên + chữ «Về …» lớn dần theo tay; quá ngưỡng thì bật xanh */
.keo-mui { position: absolute; left: 14px; top: 50%; width: 54px; height: 54px; margin-top: -40px; border-radius: 50%; display: grid; place-items: center;
  color: #d1fae5; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1.5px rgba(167,243,208,.35);
  opacity: calc(var(--p, 0) * 1.4); transform: translateX(calc(var(--p, 0) * 22px)) scale(calc(.55 + var(--p, 0) * .45));
  transition: background .18s, color .18s, box-shadow .18s; }
.keo-mui svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.keo-chu { position: absolute; left: 14px; top: 50%; margin-top: 22px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; color: #a7f3d0; white-space: nowrap;
  opacity: calc(var(--p, 0) * 1.6 - .5); transform: translateX(calc(var(--p, 0) * 22px)); }
.keo-nen.du .keo-mui { color: #fff; background: linear-gradient(145deg, #34d399, #059669); box-shadow: 0 0 0 6px rgba(52,211,153,.18), 0 8px 24px rgba(16,185,129,.5);
  animation: keo-bat .32s cubic-bezier(.3,1.7,.5,1); }
@keyframes keo-bat { 45% { transform: translateX(22px) scale(1.14); } }

/* Kéo xuống làm mới: vòng tròn rơi xuống, vòng xanh đầy dần, mũi tên quay; thả ra → quay tròn rồi tải lại */
.keo-moi { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 8px); z-index: 70; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #059669; pointer-events: none; opacity: 0;
  box-shadow: 0 8px 26px rgba(4,60,38,.22), 0 0 0 1px rgba(16,185,129,.12);
  transform: translateY(calc(var(--k, 0px) - 58px)) scale(calc(.7 + var(--p, 0) * .3)); }
.keo-moi.hien { opacity: 1; }
.keo-moi.ve { transition: transform .3s var(--vt-e), opacity .3s; opacity: 0; }
.keo-moi svg { position: absolute; inset: 0; width: 46px; height: 46px; }
.keo-moi .vm-vong { fill: none; stroke: #10b981; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 88; stroke-dashoffset: calc(88 - var(--p, 0) * 88);
  transform: rotate(-90deg); transform-origin: 23px 23px; }
.keo-moi .vm-mui { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(calc(var(--p, 0) * 180deg)); transform-origin: 23px 23px; transition: opacity .15s; }
.keo-moi.du { background: linear-gradient(145deg, #34d399, #059669); color: #fff; animation: moi-bat .3s cubic-bezier(.3,1.7,.5,1); }
.keo-moi.du .vm-vong { stroke: rgba(255,255,255,.55); }
.keo-moi.dang .vm-vong { stroke-dasharray: 26 62; stroke-dashoffset: 0; animation: moi-quay .7s linear infinite; }
.keo-moi.dang .vm-mui { opacity: 0; }
@keyframes moi-bat { 50% { transform: translateY(calc(var(--k, 0px) - 58px)) scale(1.14); } }
@keyframes moi-quay { to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .so-xong, .hero-num.lap-lanh, .vao-dan, .keo-nen.du .keo-mui, .keo-moi.du { animation: none !important; }
  html[class*="vao-"] body > *, html[class*="ra-"] body > * { animation: none !important; }
  .cho-vao:not(.vao-dan) { opacity: 1; transform: none; }
}

/* ============================================================
   Tối ưu mượt trên điện thoại (2026-10-11, user: «hiệu ứng không mượt»)
   — chỉ animate transform/opacity; bỏ animation chạy mãi; bỏ backdrop-filter; lớp cố định tách riêng GPU
   ============================================================ */
/* Hoa lá đứng yên (đung đưa vô hạn trên SVG bắt vẽ lại mỗi khung hình) — chỉ mọc 1 lần ở con dấu Lưu & đăng nhập */
.hl-canh, .hl-dau, .topbar .hl-dau { animation: none !important; }
.hl .la, .hl .than { animation: none; stroke-dashoffset: 0; }
.g1-vong.dong .la, .dn-trang .hl .la { animation: la-moc .6s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--tre, 0ms); }
.g1-vong.dong .than, .dn-trang .hl .than { stroke-dasharray: 300; stroke-dashoffset: 300; animation: than-moc 1.1s ease-out forwards; }
.hl-goc { transform: translateZ(0); will-change: transform; }
/* Không làm mờ kính (rất nặng khi cuộn trên điện thoại) — nền gần đặc */
.dock { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.97); transform: translateX(-50%) translateZ(0); }
.topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.97); }
.sheet-nen, .hoi { backdrop-filter: none; -webkit-backdrop-filter: none; }
.sheet { will-change: transform; }
/* Chấm «đang chạy»: nhịp bằng transform/opacity thay vì box-shadow */
.status-live i { animation: none; position: relative; }
.status-live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(16,185,129,.35); animation: nhip-nhe 1.8s ease-out infinite; }
@keyframes nhip-nhe { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
/* Cột biểu đồ mọc nhanh hơn, ít khung hình hơn */
.chart .cot { animation-duration: .5s; }
/* Dấu chìm: 1 lớp ảnh nền tĩnh (thay 12 dòng chữ xoay), tách lớp GPU → cuộn không vẽ lại */
.dau-chim { display: block; background-repeat: repeat; background-size: 260px 150px; opacity: .05; transform: translateZ(0); will-change: transform; }
.dau-chim span { display: none; }
@media (prefers-reduced-motion: reduce) { .status-live i::after { animation: none; } }
/* Điểm đáng chú ý v2: màu theo loại nhận xét (tiền tố nx- — .dn-canh đã dùng cho cành lá màn đăng nhập) */
.dn-tieu small { font-size: 12px; font-weight: 800; color: #fff; background: var(--g2); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
.nx-canh::before { background: #f59e0b; }
.nx-xau::before { background: #f97316; }
.nx-tot::before { background: var(--g1); }
.nx-tin::before { background: #6366f1; }
.nx-canh { background: #fffbf2; }
.nx-canh .dn-v { color: #b45309; }
.nx-xau .dn-v { color: #ea580c; }
.nx-tot .dn-v { color: var(--g2); }
.nx-tin .dn-v { color: #4338ca; font-size: 22px; }
.dn-s { line-height: 1.45; }
.dn { display: flex; flex-direction: column; }
/* Chú thích số nhỏ trên chip quán (test 4 vai trò 2026-10-11) */
.chips-chu { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 2px 0; font-size: 11.5px; color: var(--muted, #6b7a72); }
.chips-chu span { display: inline-flex; align-items: center; gap: 5px; }
.chips-chu em, .chips-chu i { display: inline-block; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; color: #fff; font-style: normal; font-size: 9.5px; font-weight: 800; line-height: 15px; text-align: center; }
.chips-chu em { background: var(--bad); }
.chips-chu i { background: #f59e0b; border-radius: 50%; }

/* —— Ô icon quán + bảng chọn quán (dùng chung Sổ · Cố định · Tổng quan; chuyển từ ghi-so.css 2026-10-11) —— */
.g2-ico { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; }
.g2-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.g2-ico.lon { width: 44px; height: 44px; border-radius: 14px; }
.g2-ico.lon svg { width: 24px; height: 24px; }

.g2-mo-nen { position: fixed; inset: 0; z-index: 35; background: rgba(10,25,18,.32); opacity: 0; transition: opacity .2s ease; }
.g2-mo-nen.hien { opacity: 1; }
.g2-mo {
  position: fixed; z-index: 36; left: 50%; top: calc(62px + env(safe-area-inset-top)); width: min(440px, calc(100vw - 24px));
  padding: 8px; border-radius: 22px; background: #fff; box-shadow: 0 24px 60px rgba(15,29,23,.22), 0 2px 8px rgba(15,29,23,.08);
  transform: translateX(-50%) translateY(-10px) scale(.96); transform-origin: 50% 0; opacity: 0;
  transition: transform .26s cubic-bezier(.2,1.2,.4,1), opacity .18s ease;
}
.g2-mo.hien { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
.g2-mo-tieu { margin: 4px 10px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.g2-mo-dong { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; transition: background .15s, transform .15s; }
.g2-mo.hien .g2-mo-dong { animation: g2-dong .32s cubic-bezier(.2,1,.4,1) both; }
.g2-mo.hien .g2-mo-dong:nth-of-type(2) { animation-delay: .04s; }
.g2-mo.hien .g2-mo-dong:nth-of-type(3) { animation-delay: .08s; }
@keyframes g2-dong { from { opacity: 0; transform: translateY(-6px); } }
.g2-mo-dong:active, .g2-mo-dong.chon { background: #f1f5f3; transform: scale(.98); }
.g2-mo-dong.on { background: #f3faf6; }
.g2-mo-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.g2-mo-chu b { font-size: 16px; font-weight: 800; }
.g2-mo-chu small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-mo-chu small i { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.g2-mo-chu small.co i { background: var(--g1); }
.g2-mo-chu small.chua { color: #b45309; }
.g2-mo-chu small.chua i { background: #f59e0b; }
.g2-mo-dau { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.g2-mo-dau svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.g2-mo-dong.on .g2-mo-dau { background: var(--g2); color: #fff; }
@media (prefers-reduced-motion: reduce) { .g2-mo, .g2-mo-nen { transition: none; animation: none !important; } }

/* —— Tổng quan: nút «quán đang xem» (user 2026-10-11: «không biết đang chọn dự án nào») —— */
.hero.co-quan::before { background: radial-gradient(circle, var(--q-glow), rgba(255,255,255,0) 70%); transition: background .4s; }
.quan-nut {
  flex: 1 1 auto; min-width: 0; max-width: 60%; display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px; border-radius: 15px; border: 1.5px solid var(--q-vien); background: #fff;
  box-shadow: 0 6px 16px -10px var(--q2); font: inherit; color: var(--ink); text-align: left;
  -webkit-tap-highlight-color: transparent; transition: transform .15s, box-shadow .2s, border-color .2s;
}
button.quan-nut { cursor: pointer; }
button.quan-nut:active { transform: scale(.97); }
button.quan-nut.mo { border-color: var(--q2); box-shadow: 0 0 0 4px var(--q-glow); }
.quan-ico { position: relative; width: 32px; height: 32px; background: var(--q1); color: var(--q2); }
.quan-ico svg { width: 19px; height: 19px; stroke-width: 2; }
/* Chấm trạng thái ở góc ô icon: xanh nhịp = đang chạy, cam = thiếu sổ, xanh đậm = đủ */
.quan-ico i { position: absolute; right: -3px; top: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: var(--g1); }
.quan-nut.st-live .quan-ico i { box-shadow: 0 0 0 3px rgba(16,185,129,.2); animation: nhip 1.6s ease-in-out infinite; }
.quan-nut.st-thieu .quan-ico i { background: #f59e0b; }
.quan-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.quan-chu b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: var(--q2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quan-chu small { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quan-nut.st-thieu .quan-chu small { color: var(--warn); }
.quan-mui { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: var(--q2); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.2,1.2,.4,1); }
.quan-nut.mo .quan-mui { transform: rotate(180deg); }
.quan-mo .g2-mo-dong { gap: 10px; }
.quan-mo-so { flex: 0 0 auto; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.quan-mo-so.am { color: #d92d20; }
.quan-mo .g2-mo-dong.on .quan-mo-so { color: var(--g3); }
/* Vừa đổi quán: ô icon lật vào, viền nháy màu quán, quầng màu quán lan khắp khung số rồi tan */
.hero.doi-quan .quan-ico { animation: quan-lat .7s cubic-bezier(.3,1.4,.5,1) both; }
.hero.doi-quan .quan-nut { animation: quan-vong 1.2s ease-out both; }
.hero.doi-quan .quan-chu b { animation: quan-chu .5s .08s cubic-bezier(.2,1,.4,1) both; }
.hero.doi-quan::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: radial-gradient(150% 100% at 14% 0%, var(--q1), rgba(255,255,255,0) 62%);
  animation: quan-lan 1.4s ease-out both;
}
@keyframes quan-lat { 0% { transform: perspective(200px) rotateY(-180deg) scale(.6); } 60% { transform: perspective(200px) rotateY(12deg) scale(1.12); } 100% { transform: none; } }
@keyframes quan-vong { 0% { box-shadow: 0 0 0 0 var(--q-vien); } 35% { box-shadow: 0 0 0 7px var(--q-glow); } 100% { box-shadow: 0 6px 16px -10px var(--q2); } }
@keyframes quan-chu { from { opacity: 0; transform: translateX(-8px); } }
@keyframes quan-lan { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero.doi-quan .quan-ico, .hero.doi-quan .quan-nut, .hero.doi-quan .quan-chu b, .hero.doi-quan::after { animation: none; } }

/* Nút sửa nhanh trong hộp «Kiểm tra trước khi lưu» (×1000, «Đây là lương») — 2026-10-11 */
.kt-sua { display: inline-block; margin-top: 6px; padding: 6px 11px; border: 0; border-radius: 10px; background: #ecfdf5; color: #047857; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.kt-sua:disabled { background: #f1f5f3; color: #6b7a72; }

/* —— Tổng quan: khối số chính (user 2026-10-11: «bố trí khu vực này thông minh») ——
   Nhãn «Doanh thu [tháng này ⌄]» → số to → 1 viên [kết luận │ so với kỳ ⌄] → chú thích nhỏ. */
.hero-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.thang-nut {
  display: inline-flex; align-items: center; gap: 2px; border: 0; cursor: pointer; font: inherit; font-size: inherit; font-weight: 800;
  padding: 3px 6px 3px 10px; margin: -3px 0; border-radius: 999px; color: var(--g3); background: var(--g-soft);
  box-shadow: inset 0 0 0 1.5px rgba(16,185,129,.22); transition: transform .15s, box-shadow .2s;
}
.thang-nut:active { transform: scale(.95); }
.thang-nut:hover { box-shadow: inset 0 0 0 1.5px var(--g1); }
.thang-nut b { font-weight: 800; white-space: nowrap; }
.thang-nut svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.ss-cap {
  display: inline-flex; align-items: stretch; max-width: 100%; margin-top: 12px; border-radius: 999px; background: #fff;
  box-shadow: 0 0 0 1.5px #dbe4e0, 0 4px 14px -6px rgba(15,29,23,.14); overflow: hidden;
}
.ss-cap .ss-kq {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 12px 0 13px; font-size: 14.5px; font-weight: 800;
  font-variant-numeric: tabular-nums; white-space: nowrap; position: relative;
}
.ss-cap .ss-kq em { font-style: normal; opacity: .85; }
.ss-cap.k-len .ss-kq { color: var(--g3); background: var(--g-soft); }
.ss-cap.k-xuong .ss-kq { color: #b42318; background: var(--bad-soft); }
.ss-cap.k-dat .ss-kq { color: #1d4ed8; background: #eaf1ff; }
.ss-cap.k-bang .ss-kq { color: var(--ink-2); background: #eef1f0; }
.ss-cap .ss-pill { box-shadow: none; border-radius: 0; background: transparent; padding: 8px 9px 8px 11px; min-width: 0; }
.ss-cap .ss-pill:active { transform: none; background: #f4f7f6; }
.ss-lua { display: inline-block; margin-right: 1px; animation: lua-chay 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes lua-chay { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(-6deg); } }
.hero .ss-canh { margin-top: 7px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .ss-lua { animation: none; } }
@media (max-width: 360px) { .ss-cap { flex-wrap: wrap; border-radius: 18px; } .ss-cap .ss-kq { padding: 7px 12px; } }

.th-xanh .th-thanh { background: #e8f5ee; }
.th-xanh .th-thanh i { background: linear-gradient(90deg, #34d399, #059669); }
.th-ds b small { display: block; font-size: 11.5px; font-weight: 700; color: var(--g2); }
.th-so.am { color: #d92d20; }
.th-khac { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 6px; border-top: 1px solid var(--line); font-weight: 700; color: var(--ink-2); cursor: pointer; }
.th-khac svg { width: 20px; height: 20px; fill: none; stroke: var(--g2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.th-khac input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.th-ds.th-rong a { grid-template-columns: 116px 1fr auto; }

/* —— Hơn kỳ so → CẢ TRANG tông tím đậm (user 2026-10-11: «tím cả trang khi hơn», «tím đậm hơn 1 chút, làm tôi wow») ——
   body.tq-vuot đổi bộ màu chủ đạo --g* sang tím → mọi thứ dùng biến (nút, thanh chọn, dock, thẻ, vòng tiến độ) đổi theo;
   màu xanh viết cứng thì ghi đè bên dưới. Giảm so với kỳ so → giữ xanh như cũ. */
body.tq-vuot {
  --g1: #7c3aed; --g2: #6d28d9; --g3: #5b21b6; --g-soft: #f1ebff;
  --t0: #a78bfa; --t1: #8b5cf6; --t4: #4c1d95;
  background: linear-gradient(180deg, #efe8ff 0, #f5f2fb 380px, #f4f3f8 100%);
}
body.tq-vuot .hero.vuot { background-image: radial-gradient(130% 75% at 100% 0%, rgba(124,58,237,.16), rgba(124,58,237,0) 62%), linear-gradient(180deg, #fff, #fcfaff); }
body.tq-vuot .hero-num:not(.am) { background-image: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.9) 50%, transparent 62%), linear-gradient(180deg, var(--t1) 0%, var(--g3) 55%, var(--t4) 100%); }
/* Cột biểu đồ, chú giải, số trên cột */
body.tq-vuot #gBar stop:first-child { stop-color: #a78bfa; }
body.tq-vuot #gBar stop:last-child { stop-color: #5b21b6; }
body.tq-vuot .lg-bar, body.tq-vuot .ss-nay-cham, body.tq-vuot .ss-thanh .t-nay, body.tq-vuot .th-xanh .th-thanh i { background: linear-gradient(90deg, var(--t0), var(--g3)); }
body.tq-vuot .th-xanh .th-thanh { background: #efe9fd; }
body.tq-vuot .cap-so span:not(.so-xam) { color: var(--g2); }
body.tq-vuot .cham.on { background: rgba(124,58,237,.08); }
/* Nút kỳ + viên kết luận */
body.tq-vuot .thang-nut { color: var(--g3); background: var(--g-soft); box-shadow: inset 0 0 0 1.5px rgba(124,58,237,.28); }
body.tq-vuot .ss-cap { box-shadow: 0 0 0 1.5px #d9c9fb, 0 8px 22px -8px rgba(109,40,217,.45); animation: tim-sang 2.4s .6s ease-in-out 2; }
body.tq-vuot .ss-cap.k-len .ss-kq, body.tq-vuot .ss-cap.k-dat .ss-kq { color: #fff; background: linear-gradient(135deg, var(--t1), var(--g3)); text-shadow: 0 1px 1px rgba(76,29,149,.35); }
body.tq-vuot .ss-cap .ss-kq::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); background-size: 250% 100%; animation: tim-luot 1.4s .9s ease-out both; pointer-events: none; }
body.tq-vuot .ss-cap .ss-pill svg { stroke: var(--g2); }
body.tq-vuot .ss-canh.ghi { color: #6b5a8e; }
body.tq-vuot .ss-canh.ghi::before { background: var(--t0); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
@keyframes tim-sang { 50% { box-shadow: 0 0 0 1.5px #c4a8ff, 0 0 0 7px rgba(124,58,237,.12), 0 10px 26px -8px rgba(109,40,217,.55); } }
@keyframes tim-luot { from { background-position: 160% 0; } to { background-position: -60% 0; } }
/* Thanh Doanh thu / Dòng tiền, Ngày / Tuần / Tháng, dock đáy */
body.tq-vuot .seg-con, body.tq-vuot .dock-vien { background: linear-gradient(180deg, var(--t1), var(--g3)); box-shadow: 0 6px 16px rgba(109,40,217,.38), inset 0 1px 0 rgba(255,255,255,.3); }
body.tq-vuot .seg-mini a.on { text-shadow: 0 1px 1px rgba(76,29,149,.4); }
body.tq-vuot .ky-seg a.on, body.tq-vuot .ky-seg button.on { color: var(--g3); }
body.tq-vuot .seg a.on, body.tq-vuot .seg-cal.on, body.tq-vuot .quan-chon a.on { box-shadow: 0 6px 14px rgba(109,40,217,.3); }
body.tq-vuot .nut-chinh { box-shadow: 0 8px 18px rgba(109,40,217,.3); }
body.tq-vuot .ring-nen { stroke: rgba(109,40,217,.14); }
body.tq-vuot .tile-k i[style*="#10b981"] { background: var(--g1) !important; }
body.tq-vuot .status i, body.tq-vuot .quan-nut.st-live .quan-ico i { background: var(--g1); }
/* Lá trang trí đổi theo */
body.tq-vuot #la-g stop:nth-child(1) { stop-color: #c4b5fd; }
body.tq-vuot #la-g stop:nth-child(2) { stop-color: #8b5cf6; }
body.tq-vuot #la-g stop:nth-child(3) { stop-color: #5b21b6; }
/* Chuyển màu mượt khi vào trang (View Transition vẫn chạy như cũ) */
body.tq-vuot .seg-con, body.tq-vuot .dock-vien, body.tq-vuot .thang-nut, body.tq-vuot .ss-cap { transition: background .5s, box-shadow .5s, color .5s, transform .34s cubic-bezier(.3,1.35,.5,1); }
@media (prefers-reduced-motion: reduce) { body.tq-vuot .ss-cap, body.tq-vuot .ss-cap .ss-kq::after { animation: none; } }
body.tq-vuot .toi-av { background: linear-gradient(135deg, var(--t0), var(--g3) 65%); box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(124,58,237,.25); }

/* —— Thẻ so sánh: [Đang xem ⌄] ⇄ [So với ⌄] + dải kết luận (user 2026-10-11: «bố trí cân đối») —— */
.ss-the { margin-top: 12px; border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1.5px #dbe4e0, 0 8px 22px -12px rgba(15,29,23,.22); }
.ss-doi { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.vs-o { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 14px 10px; border: 0; background: none;
  font: inherit; text-align: left; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.vs-o + .vs-giua + .vs-o, .vs-giua + .vs-o { padding-left: 24px; border-left: 1px solid var(--line); }
.vs-o:active { background: #f5f8f7; }
.vs-o small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.vs-o span { display: flex; align-items: center; gap: 3px; max-width: 100%; }
.vs-o b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-o svg { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: var(--g2); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.vs-giua { position: absolute; left: 50%; top: 50%; z-index: 1; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(15,29,23,.08); color: var(--muted); }
.vs-giua svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ss-dai { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.ss-dai .ss-kq { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ss-dai .ss-kq em { font-style: normal; font-size: 14.5px; opacity: .85; }
.ss-dai .ss-mo { font-size: 13px; font-weight: 600; color: var(--muted); }
.ss-tag { flex: 0 0 auto; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: var(--warn); background: var(--warn-soft); }
.ss-the.k-len .ss-dai { color: var(--g3); background: var(--g-soft); border-top-color: transparent; }
.ss-the.k-xuong .ss-dai { color: #b42318; background: var(--bad-soft); border-top-color: transparent; }
.ss-the.k-dat .ss-dai { color: #1d4ed8; background: #eaf1ff; border-top-color: transparent; }
.ss-the.k-bang .ss-dai { color: var(--ink-2); background: #eef1f0; }
.ss-the + .ss-canh { margin-top: 8px; }
/* Tím khi hơn kỳ so */
body.tq-vuot .ss-the { box-shadow: 0 0 0 1.5px #d9c9fb, 0 10px 26px -10px rgba(109,40,217,.45); animation: tim-sang 2.4s .6s ease-in-out 2; }
body.tq-vuot .vs-o svg { stroke: var(--g2); }
body.tq-vuot .vs-giua { color: var(--g2); box-shadow: 0 0 0 1px #e3d8fc, 0 2px 8px rgba(109,40,217,.18); }
body.tq-vuot .ss-the.k-len .ss-dai, body.tq-vuot .ss-the.k-dat .ss-dai { color: #fff; background: linear-gradient(120deg, var(--t1), var(--g3) 70%, var(--t4)); text-shadow: 0 1px 1px rgba(76,29,149,.35); }
body.tq-vuot .ss-the .ss-dai::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%); background-size: 250% 100%; animation: tim-luot 1.4s .9s ease-out both; }
body.tq-vuot .ss-the .ss-tag { color: #fff; background: rgba(255,255,255,.2); text-shadow: none; }
@media (prefers-reduced-motion: reduce) { body.tq-vuot .ss-the, body.tq-vuot .ss-the .ss-dai::after { animation: none; } }

.ky-seg + .hero-num, .hero-top + .hero-num { margin-top: 14px; }

/* —— Thẻ so sánh 1 hàng: [Đang xem ⌄] [▲ giữa] [So với ⌄] (user 2026-10-11: «2 tháng 2 bên — tăng giảm ở giữa») —— */
.ss-3 { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch;
  border-radius: 18px; background: #fff; overflow: hidden; box-shadow: 0 0 0 1.5px #dbe4e0, 0 8px 22px -12px rgba(15,29,23,.22); }
.ss-3 .vs-o { padding: 9px 12px 10px; border-left: 0; }
.ss-3 .vs-o.phai { align-items: flex-end; text-align: right; padding-left: 8px; }
.ss-3 .vs-o.trai { padding-right: 8px; }
.ss-3 .vs-o b { font-size: 15.5px; }
.ss-giua { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  min-width: 92px; padding: 6px 12px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ss-giua b { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 800; line-height: 1.15; }
.ss-giua small { font-size: 12.5px; font-weight: 800; opacity: .85; line-height: 1.2; }
.ss-giua .ss-ngay { font-style: normal; font-size: 11px; opacity: .8; }
.ss-giua .ss-mo { color: var(--muted); }
.ss-3.k-trong .ss-giua small { color: var(--muted); font-weight: 600; }
.ss-3.k-len .ss-giua { color: var(--g3); background: var(--g-soft); }
.ss-3.k-xuong .ss-giua { color: #b42318; background: var(--bad-soft); }
.ss-3.k-dat .ss-giua { color: #1d4ed8; background: #eaf1ff; }
.ss-3.k-bang .ss-giua { color: var(--ink-2); background: #eef1f0; }
.ss-3.k-trong .ss-giua { background: #f6f8f7; }
.ss-canh .ss-tag { margin-right: 2px; }
.ss-canh.chi-tag::before { display: none; }
/* Tím khi hơn kỳ so: ô giữa tím đặc + vệt sáng, viền thẻ tím tỏa sáng */
body.tq-vuot .ss-3 { box-shadow: 0 0 0 1.5px #d9c9fb, 0 10px 26px -10px rgba(109,40,217,.45); animation: tim-sang 2.4s .6s ease-in-out 2; }
body.tq-vuot .ss-3.k-len .ss-giua, body.tq-vuot .ss-3.k-dat .ss-giua { color: #fff; background: linear-gradient(150deg, var(--t1), var(--g3) 65%, var(--t4)); text-shadow: 0 1px 1px rgba(76,29,149,.35); }
body.tq-vuot .ss-3 .ss-giua::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); background-size: 260% 100%; animation: tim-luot 1.4s .9s ease-out both; }
@media (prefers-reduced-motion: reduce) { body.tq-vuot .ss-3, body.tq-vuot .ss-3 .ss-giua::after { animation: none; } }
@media (max-width: 350px) { .ss-3 .vs-o b { font-size: 14px; } .ss-giua { min-width: 80px; padding: 6px 8px; } }

/* Vừa khít 375px: lửa thành huy hiệu góc ô giữa; tên kỳ dài thì xuống 2 dòng thay vì «…» */
.ss-giua { min-width: 84px; padding: 6px 10px; }
.ss-giua .ss-lua { position: absolute; top: 3px; left: 4px; font-size: 12px; margin: 0; }
.ss-3 .vs-o { padding-left: 11px; padding-right: 11px; }
.ss-3 .vs-o.trai { padding-right: 6px; }
.ss-3 .vs-o.phai { padding-left: 6px; }
.ss-3 .vs-o span { gap: 1px; }
.ss-3 .vs-o b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.15; overflow: hidden; text-overflow: clip; }
.ss-3 .vs-o.phai span { justify-content: flex-end; }
/* Gọn hơn (user 2026-10-11: «làm gọn lại nữa»): bỏ chữ nhỏ ĐANG XEM / SO VỚI, 1 hàng thấp */
.ss-3 .vs-o small { display: none; }
.ss-3 .vs-o { justify-content: center; padding-top: 7px; padding-bottom: 7px; }
.ss-3 .vs-o b { font-size: 15px; }
.ss-giua { padding: 4px 10px; min-width: 80px; }
.ss-giua b { font-size: 15px; }
.ss-giua small { font-size: 12px; }
.ss-3 { margin-top: 10px; border-radius: 16px; }

/* —— Hài hoà thẻ so sánh (user 2026-10-11: «căn chỉnh lại uiux cho hài hoà») ——
   Ô giữa là viên nổi bo tròn nằm gọn trong thẻ (không còn khối vuông cắt ngang viền);
   2 kỳ hai bên căn giữa trong nửa của mình → cân đối như cán cân. */
.ss-3 { align-items: center; padding: 5px; gap: 4px; border-radius: 20px; }
.ss-3 .vs-o, .ss-3 .vs-o.trai, .ss-3 .vs-o.phai { align-items: center; text-align: center; padding: 8px 4px; border-radius: 14px; }
.ss-3 .vs-o.phai span, .ss-3 .vs-o span { justify-content: center; }
.ss-3 .vs-o b { font-size: 15.5px; }
.ss-giua { min-width: 92px; padding: 6px 14px; border-radius: 15px; align-self: stretch; }
.ss-giua .ss-lua { position: static; font-size: 13px; margin-right: 2px; }
.ss-giua b { gap: 2px; }
.ss-3.k-len .ss-giua, .ss-3.k-dat .ss-giua, .ss-3.k-xuong .ss-giua, .ss-3.k-bang .ss-giua, .ss-3.k-trong .ss-giua { box-shadow: inset 0 0 0 1px rgba(15,29,23,.04); }
body.tq-vuot .ss-3.k-len .ss-giua, body.tq-vuot .ss-3.k-dat .ss-giua {
  background: linear-gradient(150deg, #9f67ff 0%, var(--g2) 55%, var(--t4) 100%);
  box-shadow: 0 6px 16px -4px rgba(109,40,217,.55), inset 0 1px 0 rgba(255,255,255,.28);
}
/* Thẻ «Dự kiến cả tháng» theo tông tím khi hơn kỳ so */
body.tq-vuot .du-kien { background: linear-gradient(135deg, #efe7ff 0%, #f7f3ff 45%, #eee9fb 100%); box-shadow: 0 0 0 1px #e6dcfb; }
body.tq-vuot .dk-s b { color: var(--g2); }
.ss-3 { padding: 4px; gap: 2px; }
.ss-giua { min-width: 0; padding: 6px 10px; }
.ss-giua b { font-size: 15px; }
.ss-giua .ss-lua { font-size: 12px; margin-right: 1px; }
.ss-3 .vs-o b { font-size: 15px; white-space: nowrap; }
.ss-3 .vs-o svg { width: 15px; height: 15px; }
/* Gọn thêm (user 2026-10-11: «làm gọn hơn 1 chút»): ô giữa 1 dòng «▲ 9,9 tr +6%», thẻ thấp ~40px */
.ss-3 { padding: 3px; border-radius: 16px; margin-top: 10px; }
.ss-3 .vs-o, .ss-3 .vs-o.trai, .ss-3 .vs-o.phai { padding: 6px 2px; border-radius: 12px; }
.ss-3 .vs-o b { font-size: 14.5px; }
.ss-3 .vs-o svg { width: 14px; height: 14px; }
.ss-giua { flex-direction: row; align-items: baseline; gap: 5px; padding: 6px 10px; border-radius: 12px; }
.ss-giua b { font-size: 14.5px; }
.ss-giua small { font-size: 12px; opacity: .9; }
.ss-giua .ss-lua { font-size: 11px; margin-right: 0; }
.ss-giua small { font-weight: 700; opacity: .72; }

/* —— Nút Chụp phiếu ngày (Sổ + thẻ cột Tổng quan) + phiếu ảnh dựng ẩn (chup-ngay.js, user 2026-10-11) —— */
.sn-nut { display: flex; gap: 8px; }
.sn-nut > a { flex: 1; }
.nut-chup-ngay, .tip-chup { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.nut-chup-ngay { flex: 0 0 auto; padding: 0 18px; border-radius: 16px; font-size: 15.5px; color: var(--g3); background: var(--g-soft); box-shadow: inset 0 0 0 1.5px rgba(16,185,129,.25); }
.nut-chup-ngay svg, .tip-chup svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nut-chup-ngay:active, .tip-chup:active { transform: scale(.96); }
.nut-chup-ngay.dang, .tip-chup.dang { opacity: .6; pointer-events: none; }
.tip-nut { display: flex; gap: 6px; margin-top: 10px; }
.tip-nut .tip-a { flex: 1; margin-top: 0; }
.tip-chup { padding: 8px 10px; border-radius: 10px; font-size: 13.5px; color: #fff; background: rgba(255,255,255,.14); }
.tip-chup svg { width: 16px; height: 16px; }

/* Nút quán 1 dòng (bỏ chữ trạng thái — user 2026-10-11): cao bằng nút Doanh thu / Dòng tiền, chữ căn giữa theo chiều dọc */
.quan-nut { gap: 9px; padding: 3px 10px 3px 3px; min-height: 41px; }
.quan-ico { width: 33px; height: 33px; border-radius: 11px; }
.quan-chu { justify-content: center; }
.quan-chu b { font-size: 16px; line-height: 1.2; }
/* Hai nút đầu khung cao bằng nhau, thẳng hàng */
.hero-top { align-items: stretch; }
.quan-nut { min-height: 42px; }
.hero-top .seg-mini { min-height: 42px; align-items: stretch; }
.hero-top .seg-mini a { display: flex; align-items: center; justify-content: center; }

