/* Thu Chi v2 — các màn ngoài Tổng quan / Ghi sổ: đăng nhập, Sổ, Cố định, Cổ đông, Thêm, Quản trị.
   Cùng hệ màu app.css (xanh lá, số to, thẻ bo 22px). Mọi ô nhập ≥ 16px để iOS không phóng trang. */

/* —— Chung —— */
.xanh { color: var(--g2) !important; }
.dau-chim { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); opacity: .045; user-select: none; -webkit-user-select: none; }
.dau-chim span { display: flex; align-items: center; justify-content: center; transform: rotate(-22deg); font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ink); }
@media print { body * { visibility: hidden !important; } body::after { content: "Tài liệu tài chính nội bộ — không in"; visibility: visible; } }
body:not(.trang-ghi-so) { -webkit-user-select: none; user-select: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
body.khoa-cuon { overflow: hidden; }
.nut-chinh, .nut-phu { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 16px; border: 0; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; text-align: center; }
.nut-chinh { color: #fff; background: linear-gradient(180deg, var(--g1), var(--g3)); box-shadow: 0 8px 18px rgba(5,150,105,.28); }
.nut-chinh svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nut-chinh:active, .nut-phu:active { transform: scale(.97); }
.nut-chinh.nho { min-height: 40px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.nut-phu { color: var(--g3); background: var(--g-soft); }
.nut-nho { border: 0; font: inherit; font-size: 13.5px; font-weight: 800; padding: 8px 12px; border-radius: 11px; background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; white-space: nowrap; }
.nut-nho.dam { background: var(--g2); color: #fff; box-shadow: none; }
.link-mui { display: block; margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--g2); }
.link-do { border: 0; background: none; font: inherit; color: var(--bad); font-weight: 700; font-size: 14px; padding: 6px 0; cursor: pointer; }
.o-nhap { display: flex; flex-direction: column; gap: 6px; position: relative; }
.o-nhap > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.o-nhap input, .o-nhap select { font: inherit; font-size: 16px; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fbfcfc; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.o-nhap input:focus, .o-nhap select:focus { border-color: var(--g1); box-shadow: 0 0 0 4px rgba(16,185,129,.14); background: #fff; }
.form-doc { display: flex; flex-direction: column; gap: 14px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--g2); }
.bao-ok, .bao-loi, .bao-khoa { margin: 14px 16px 0; padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.bao-ok { background: var(--g-soft); color: var(--g3); }
.bao-loi { background: var(--bad-soft); color: #b42318; }
.bao-khoa { background: #f1f3f2; color: var(--ink-2); }
.trong-lon { text-align: center; padding: 32px 22px; color: var(--muted); }
.trong-lon .hl-mam { width: 64px; margin: 0 auto 6px; }
.trong-lon h1 { color: var(--ink); font-size: 19px; margin: 6px 0; }
.trong-lon.nho { padding: 22px; }
.trong-nho { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 4px 0; }
.trong-nho .hl-mam { width: 38px; flex: 0 0 auto; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.tag-cd { background: #EEF2FF; color: #3730A3; }
.g2-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; }
.g2-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.g2-chip.co { background: var(--g-soft); color: var(--g3); }
.g2-chip.chua { background: var(--bad-soft); color: #b42318; }

/* —— Toast dùng chung —— */
#toast-chung { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--dock-h) + 22px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(16,35,27,.95); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 14px 30px rgba(0,0,0,.22); animation: hien .2s ease-out; }
#toast-chung button { border: 0; background: none; color: #6ee7b7; font: inherit; font-weight: 800; cursor: pointer; padding: 0; }
@keyframes hien { from { opacity: 0; transform: translate(-50%, 8px); } }

/* —— Bảng trượt (sheet) —— */
.sheet-nen { position: fixed; inset: 0; z-index: 50; background: rgba(15,29,23,.38); opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.sheet-nen.hien { opacity: 1; }
.sheet { position: fixed; z-index: 55; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 86vh; overflow: auto; transform: translate(-50%, 100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); background: #fff; border-radius: 26px 26px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
.sheet.hien { transform: translate(-50%, 0); }
.sheet-tay { width: 44px; height: 5px; border-radius: 3px; background: #d7dfdb; margin: 4px auto 14px; cursor: pointer; }
.xoay { display: block; width: 28px; height: 28px; margin: 30px auto; border-radius: 50%; border: 3px solid var(--g-soft); border-top-color: var(--g1); animation: xoay .8s linear infinite; }
@keyframes xoay { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-nen { transition: none; } }

/* —— Topbar: người dùng —— */
.toi { display: flex; align-items: center; gap: 10px; }
.toi-ten { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.toi-ten b { font-size: 13.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toi-ten small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.toi-av { position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #34d399, #059669 60%, #047857); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px #c9eedd; }
.toi-av.lon { width: 60px; height: 60px; font-size: 20px; }
.cham-on { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
@media (max-width: 360px) { .toi-ten { display: none; } }

/* —— Dock 4 mục (người không ghi được) —— */
body.dock-4 .dock { grid-template-columns: repeat(4, 1fr); }

/* —— Đăng nhập —— */
.trang-dang-nhap { padding-bottom: 0; background: #fff; }
.dn-trang { min-height: 100vh; display: flex; flex-direction: column; }
.dn-dau { position: relative; height: 34vh; min-height: 210px; overflow: hidden; background: radial-gradient(120% 90% at 20% 0%, #6ee7b7 0%, #10b981 40%, #047857 100%); }
.dn-dau::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -40px; height: 80px; background: #fff; border-radius: 50% 50% 0 0; }
.dn-canh { position: absolute; width: 190px; opacity: .5; }
.dn-canh .la path:first-child { fill: #ecfdf5; }
.dn-canh .than { stroke: #ecfdf5; }
.dn-canh-1 { left: -26px; bottom: 6px; }
.dn-canh-2 { right: -30px; top: -34px; transform: rotate(180deg); transform-origin: 50% 50%; animation: none; width: 170px; }
.dn-mam { position: absolute; left: 50%; bottom: 34px; width: 74px; transform: translateX(-50%); z-index: 1; }
.dn-mam ellipse { fill: rgba(255,255,255,.4); }
.dn-the { position: relative; z-index: 2; margin-top: -18px; padding: 0 24px 28px; }
.dn-the h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -.035em; color: var(--g2); }
.dn-the h1 b { color: #f59e0b; }
.dn-phu { margin: 2px 0 20px; color: var(--muted); font-size: 15px; }
.dn-loi { margin: 0 0 14px; padding: 11px 14px; border-radius: 14px; background: var(--bad-soft); color: #b42318; font-weight: 600; font-size: 14px; animation: lac .35s; }
.dn-form { display: flex; flex-direction: column; gap: 14px; }
.dn-form .nut-chinh { margin-top: 6px; min-height: 54px; font-size: 17px; }
@keyframes lac { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* —— Đầu trang chung: ‹ Tháng › + chọn quán —— */
.so-dau { background: var(--card); padding: 12px 16px 14px; border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.thang-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.thang-nav h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; text-align: center; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-mui { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f1f4f3; }
.tn-mui svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tn-mui.tat { background: none; }
.quan-chon { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.quan-chon::-webkit-scrollbar { display: none; }
.quan-chon a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 13px; background: #f2f5f4; font-weight: 700; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.quan-chon a.on { background: linear-gradient(180deg, var(--g1), var(--g2)); color: #fff; box-shadow: 0 6px 14px rgba(5,150,105,.25); }
.so-tong { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.so-tong div { background: #f6f8f7; border-radius: 14px; padding: 10px 12px; }
.so-tong small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.so-tong b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }

/* —— Sổ: tìm món —— */
.tim-o { padding: 10px 12px; }
.tim-nhap { display: flex; align-items: center; gap: 8px; }
.tim-nhap svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.tim-nhap input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; padding: 8px 0; background: none; }
.tim-tong { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 6px; }
.tim-tong div { background: var(--g-soft); border-radius: 12px; padding: 9px 11px; }
.tim-tong small { display: block; font-size: 12px; color: var(--g3); font-weight: 600; }
.tim-tong b { font-size: 18px; color: var(--g3); }
.tim-ds { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.tim-ds li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 14.5px; cursor: pointer; }
.tim-ng { color: var(--muted); font-weight: 700; font-size: 13px; }
.tim-ds b { font-variant-numeric: tabular-nums; }
.tim-trong { color: var(--muted); margin: 10px 0 4px; font-size: 14px; }

/* —— Sổ: lịch nhiệt —— */
.lich-so { padding: 14px 12px; }
.ls-thu, .ls-luoi { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ls-thu span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.ls-luoi button { position: relative; aspect-ratio: 1 / 1.08; border: 0; border-radius: 12px; padding: 4px 2px; font: inherit; background: #f3f5f4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; animation: o-hien .4s ease-out both; animation-delay: var(--tre); transition: transform .12s; }
.ls-luoi button:active { transform: scale(.93); }
.ls-luoi b { font-size: 15px; font-weight: 800; line-height: 1; }
.ls-luoi small { font-size: 10px; font-weight: 700; line-height: 1.1; opacity: .85; white-space: nowrap; letter-spacing: -.02em; }
.ls-luoi .muc1 { background: #d1fae5; color: #065f46; }
.ls-luoi .muc2 { background: #6ee7b7; color: #064e3b; }
.ls-luoi .muc3 { background: #10b981; color: #fff; }
.ls-luoi .muc4 { background: #047857; color: #fff; }
.ls-luoi .lo { background: #fee2e2; color: #b42318; }
.ls-luoi .thieu { background: #fff; box-shadow: inset 0 0 0 1.5px #fca5a5; color: #b42318; }
.ls-luoi .thieu small { font-weight: 600; }
.ls-luoi .sau { opacity: .35; cursor: default; }
.ls-luoi .nay { box-shadow: 0 0 0 2.5px var(--ink); }
@keyframes o-hien { from { opacity: 0; transform: scale(.7); } }
.ls-chu { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 2px 0; font-size: 12.5px; color: var(--muted); }
.ls-chu span { display: inline-flex; align-items: center; gap: 6px; }
.ls-chu i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ls-chu i.muc2 { background: linear-gradient(90deg, #d1fae5, #047857); width: 22px; }
.ls-chu i.lo { background: #fee2e2; }
.ls-chu i.thieu { box-shadow: inset 0 0 0 1.5px #fca5a5; }

/* —— Sổ: danh sách ngày —— */
.ngay-ds { list-style: none; margin: 0; padding: 0; }
.ngay-ds li + li { border-top: 1px solid var(--line); }
.ngay-ds button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.nd-ngay { width: 42px; flex: 0 0 auto; text-align: center; display: flex; flex-direction: column; }
.nd-ngay b { font-size: 19px; line-height: 1.1; }
.nd-ngay small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.nd-giua { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.nd-so { display: flex; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.nd-thanh { height: 6px; border-radius: 3px; background: #e8f7f0; overflow: hidden; }
.nd-thanh i { display: block; height: 100%; border-radius: 3px; background: #94a3b8; }
.nd-thanh i.cao { background: #f59e0b; }
.nd-thanh i.vuot { background: var(--bad); }
.nd-con { font-size: 16px; font-weight: 800; color: var(--g2); white-space: nowrap; }

/* —— Sổ: bảng chi tiết ngày —— */
.sn-dau { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sn-dau small { color: var(--muted); font-weight: 700; font-size: 13px; }
.sn-dau h2 { margin: 0; font-size: 22px; font-weight: 800; }
.sn-so { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.sn-so div { background: #f6f8f7; border-radius: 13px; padding: 9px 11px; }
.sn-so small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.sn-so b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sn-thanh { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin-bottom: 8px; }
.sn-thanh i { display: block; min-width: 4px; }
.sn-ds { list-style: none; margin: 0 0 12px; padding: 0; }
.sn-ds li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.sn-ds li b { font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.sn-ds li.cd { opacity: .75; }
.sn-vet, .sn-trong, .sn-loi { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.sn-khoa { font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: #f1f3f2; padding: 9px 12px; border-radius: 12px; margin: 0 0 10px; }
.sheet .nut-chinh, .sheet .nut-phu { width: 100%; }

/* —— Chi cố định —— */
.cd-trang { padding-bottom: 150px; }
.cd-hero { position: relative; display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #ecfeff 100%); }
.cd-hero .ring-chay { stroke: #6366f1; }
.cd-hero .ring-nen { stroke: rgba(99,102,241,.14); }
.cd-hero .ring-pct { font-size: 19px; color: #4338ca; }
.cd-hero .dk-k { color: #4338ca; }
.cd-tong { margin: 2px 0 0; font-size: clamp(26px, 8vw, 32px); font-weight: 800; letter-spacing: -.03em; color: #312e81; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-thieu-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 16px 8px; }
.cd-thieu-dau h2 { margin: 0; font-size: 15px; font-weight: 800; color: #9a3412; }
.cd-ma { display: flex; align-items: center; gap: 12px; margin: 8px 16px 0; padding: 12px 14px; border-radius: 18px; border: 2px dashed #fcd9a6; background: rgba(255,250,242,.8); animation: o-hien .35s ease-out both; }
.cd-ma[data-go] { cursor: pointer; }
.cd-ma[data-go]:active { transform: scale(.98); }
.cd-ma-go { flex: 0 0 auto; font-size: 13.5px; font-weight: 800; color: var(--g2); padding: 8px 12px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1.5px #c9eedd; }
.cd-ma.qh { border-color: #fbb4a8; background: rgba(255,246,244,.85); }
.cd-ico { font-size: 22px; width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(15,29,23,.08); }
.cd-ma-giua { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-ma-giua b { font-size: 15px; }
.cd-ma-giua small { font-size: 12.5px; color: var(--muted); }
.cd-ma.qh small { color: #b42318; }
.cd-nhom-dau { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cd-nhom-dau h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 800; }
.cd-nhom-dau b { font-size: 16.5px; font-variant-numeric: tabular-nums; }
.cd-ds { list-style: none; margin: 0; padding: 0; }
.cd-ds li { border-top: 1px solid var(--line); }
.cd-mo { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border: 0; background: none; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.cd-mo:disabled { cursor: default; }
.cd-mo span { display: flex; flex-direction: column; min-width: 0; }
.cd-mo b { font-weight: 600; font-size: 15px; }
.cd-mo small { font-size: 12px; color: var(--muted); }
.cd-mo em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-dong.moi { animation: dong-moi .9s ease-out; }
@keyframes dong-moi { 0% { background: #d1fae5; transform: translateX(-10px); opacity: 0; } 40% { opacity: 1; transform: none; } 100% { background: transparent; } }
.cd-ds .g1-sua { display: grid; grid-template-columns: 1fr 120px; gap: 8px; padding: 10px 0; }
.cd-ds .g1-sua input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--g1); min-width: 0; }
.cd-ds .s-nut { grid-column: 1 / -1; display: flex; justify-content: space-between; }
.cd-ds .s-nut button { border: 0; font: inherit; font-weight: 800; padding: 9px 16px; border-radius: 11px; cursor: pointer; }
.cd-ds .s-xoa { background: var(--bad-soft); color: #b42318; }
.cd-ds .s-ok { background: var(--g2); color: #fff; }
.cd-ds .s-tra { grid-column: 1 / -1; border: 1.5px dashed #f2b766; background: #fff7ec; color: #9a4d00; font: inherit; font-size: 13.5px; font-weight: 700; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left; }
.cd-ghi { margin: 14px 20px 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.cd-chan { position: fixed; z-index: 35; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); width: 100%; max-width: 480px; padding: 8px 12px 10px; background: linear-gradient(180deg, rgba(244,246,245,0), var(--bg) 30%); }
.cd-chan .g1-nhap-o { display: flex; gap: 8px; background: #fff; border-radius: 18px; padding: 6px 6px 6px 14px; box-shadow: 0 8px 24px rgba(15,29,23,.12), inset 0 0 0 1.5px var(--line); }
.cd-chan .g1-nhap-o input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; background: none; }
.cd-chan .g1-nhap-o button { width: 44px; height: 44px; border: 0; border-radius: 14px; background: linear-gradient(180deg, #818cf8, #4f46e5); color: #fff; cursor: pointer; display: grid; place-items: center; }
.cd-chan .g1-nhap-o svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.cd-luu-thanh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: #312e81; color: #fff; font-size: 14px; font-weight: 600; animation: o-hien .25s ease-out; }
.cd-luu-thanh .nut-chinh { background: #fff; color: #312e81; box-shadow: none; }

/* —— Cổ đông —— */
.cdong-hero { display: flex; gap: 16px; align-items: center; }
.donut { position: relative; width: 132px; height: 132px; flex: 0 0 auto; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 15; }
.donut-nen { stroke: #eef2f0; }
.donut-phan { stroke-linecap: butt; animation: donut-ve .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--tre); }
.donut-phan.toi { stroke-width: 19; }
@keyframes donut-ve { from { stroke-dasharray: 0 400; } }
.donut-giua { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-giua small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.donut-giua b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.cdong-chu { min-width: 0; }
.cdong-chu .hero-label { margin: 0; font-size: 14px; }
.cdong-so { margin: 2px 0 0; font-size: clamp(24px, 7.4vw, 32px); font-weight: 800; letter-spacing: -.035em; color: var(--g3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cdong-so small { font-size: .55em; opacity: .5; margin-left: 2px; }
.cdong-dk, .cdong-ba { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.nguoi-ds .card { margin-top: 10px; }
.nguoi { position: relative; overflow: hidden; animation: len .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--tre); }
@keyframes len { from { opacity: 0; transform: translateY(14px); } }
.nguoi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--mau); }
.nguoi.toi { box-shadow: 0 0 0 2px var(--mau), 0 14px 30px rgba(15,29,23,.1); }
.nguoi-dau { display: flex; align-items: center; gap: 12px; }
.nguoi-tien { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nguoi-thanh { height: 7px; border-radius: 4px; background: #f1f4f3; margin-top: 10px; overflow: hidden; }
.nguoi-thanh i { display: block; height: 100%; border-radius: 4px; background: var(--mau); animation: thanh-chay 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--tre); transform-origin: left; }
@keyframes thanh-chay { from { transform: scaleX(0); } }
.nguoi-dk { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.nguoi-dk b { color: var(--ink); }
.nguoi-quan { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nguoi-quan li { display: flex; gap: 6px; font-size: 12.5px; padding: 4px 9px; border-radius: 9px; background: #f6f8f7; }
.ban { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--mau, var(--g2)); color: #fff; vertical-align: 2px; }
.ls-cot { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; }
.ls-mot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ls-mot small { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.ls-khung { position: relative; width: 100%; height: 110px; display: flex; align-items: flex-end; justify-content: center; border-radius: 10px; background: #f6f8f7; }
.ls-khung i { width: 62%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #6ee7b7, #059669); animation: moc-len .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--tre); transform-origin: bottom; }
.ls-khung i.lo { background: linear-gradient(180deg, #fca5a5, #dc2626); }
@keyframes moc-len { from { transform: scaleY(0); } }
.ls-khung em { position: absolute; left: 50%; width: 12px; height: 12px; margin: 0 0 -6px -6px; border-radius: 50%; background: #fff; border: 3px solid #f59e0b; }
.ls-mot b { font-size: 13px; }
.ls-mot.on b { color: var(--g2); }
.ls-mot.on .ls-khung { box-shadow: inset 0 0 0 2px var(--g1); }
.chot-the p { margin: 0 0 10px; font-size: 14px; }
.chot-lech { color: var(--warn); font-weight: 600; }
.chot-the .nut-phu { width: 100%; }
@media (prefers-reduced-motion: reduce) { .donut-phan, .nguoi, .nguoi-thanh i, .ls-khung i, .ls-luoi button, .cd-ma, .cd-dong.moi { animation: none !important; } }

/* —— Thêm —— */
.toi-the { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: linear-gradient(135deg, #e7f8f0, #f0fbf7 55%, #e4f3f6); }
.toi-chu h1 { margin: 0; font-size: 20px; font-weight: 800; }
.toi-chu p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.vai { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.vai-quan_tri { background: #ede9fe; color: #5b21b6; }
.vai-quan_ly { background: #dbeafe; color: #1e40af; }
.vai-co_dong { background: #fef3c7; color: #92400e; }
.toi-quyen { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.toi-quyen li { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 13px; background: rgba(255,255,255,.75); text-align: center; }
.toi-quyen li span { font-size: 20px; }
.toi-quyen li b { font-size: 13.5px; }
.toi-quyen li small { font-size: 11.5px; font-weight: 700; color: var(--g3); }
.toi-quyen li.xem small { color: #1e40af; }
.toi-quyen li.khong { opacity: .45; }
.toi-quyen li.khong small { color: var(--muted); }
.menu-tieu { margin: 20px 20px 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.menu { padding: 4px 6px; margin-top: 0; }
.menu-dong { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 10px; border: 0; background: none; font: inherit; text-align: left; color: inherit; cursor: pointer; border-radius: 14px; }
.menu-dong + .menu-dong { border-top: 1px solid var(--line); }
.menu-dong:active { background: #f4f6f5; }
.menu-ico { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: #f1f4f3; font-size: 20px; }
.menu-ico.tim { background: #f3e8ff; }
.menu-ico.cam { background: #ffedd5; }
.menu-ico.xanh { background: var(--g-soft); }
.menu-ico.xanh-duong { background: #dbeafe; }
.menu-ico.do { background: var(--bad-soft); color: var(--bad); font-weight: 800; }
.menu-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-chu b { font-size: 15.5px; }
.menu-chu small { font-size: 12.5px; color: var(--muted); }
.menu-dong.do b { color: var(--bad); }
.menu-mui { width: 20px; height: 20px; fill: none; stroke: #b8c3be; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.chan-trang { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 0; color: var(--muted); font-size: 12.5px; }
.chan-trang .hl-mam { width: 30px; }
.xuat-form h2 { margin: 0; font-size: 20px; }
.xuat-form .muted { margin: 2px 0 14px; }
.xuat-hang { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.xuat-nhom { border: 0; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.xuat-nhom legend { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.xuat-nut { display: flex; gap: 10px; margin-top: 18px; }
.xuat-nut button { flex: 1; }

/* —— Quản trị —— */
.qt-trang .quan-chon a { flex: 1 0 auto; }
.nd { padding: 0; overflow: hidden; }
.nd.tat { opacity: .65; }
.nd summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.nd summary::-webkit-details-marker { display: none; }
.nd[open] summary { border-bottom: 1px solid var(--line); }
.nd-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nd-chu b { font-size: 15.5px; }
.nd-chu small { font-size: 12px; color: var(--muted); }
.nd-quan { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.q-chip { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: #f1f4f3; color: var(--ink-2); }
.q-chip.ql { background: var(--g-soft); color: var(--g3); }
.q-chip.do { background: var(--bad-soft); color: #b42318; }
.nd form.form-doc { padding: 14px 16px; }
.nd-xoa { padding: 0 16px 14px; }
.nd.moi .toi-av { background: #f1f4f3; color: var(--g2); box-shadow: none; font-size: 22px; }
.vai-chon { display: flex; gap: 8px; flex-wrap: wrap; }
.vai-chon input { position: absolute; opacity: 0; }
.vai-chon .vai { padding: 9px 14px; font-size: 14px; cursor: pointer; opacity: .55; box-shadow: inset 0 0 0 1.5px transparent; }
.vai-chon input:checked + .vai { opacity: 1; box-shadow: inset 0 0 0 2px currentColor; }
.ma-tran { border: 0; margin: 0; padding: 12px; border-radius: 14px; background: #f6f8f7; }
.ma-tran legend { font-size: 13px; font-weight: 800; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.ma-tran legend small { font-weight: 500; color: var(--muted); }
.mt-dau, .mt-hang { display: grid; grid-template-columns: 1fr 70px 80px; align-items: center; text-align: center; padding: 6px 0; clear: both; }
.mt-dau b { font-size: 12.5px; color: var(--muted); }
.mt-hang span { text-align: left; font-weight: 600; font-size: 14.5px; }
.mt-hang input { width: 22px; height: 22px; accent-color: var(--g2); }
.mt-hang + .mt-hang { border-top: 1px solid var(--line); }
.ma-tran .muted { margin: 8px 0 0; font-size: 12px; }
.the-tieu { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
.nk-ds { list-style: none; margin: 0; padding: 0; }
.nk-ds li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.nk-ds li:first-child { border-top: 0; }
.nk-gio { width: 46px; flex: 0 0 auto; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.nk-gio small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.nk-chu small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.don-tieu { margin: 18px 0 6px; font-size: 15px; }
.don-tieu small { font-weight: 600; color: var(--muted); }
.don-ds { list-style: none; margin: 0; padding: 0; }
.don-ds li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.don-ds li.nghi { background: #fffaf2; }
.don-ds li small { color: var(--muted); }
.don-ds b { font-variant-numeric: tabular-nums; }

/* —— Ghi sổ: chế độ chỉ xem —— */
.g2-chi-xem { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 14px; background: #f1f3f2; color: var(--ink-2); font-weight: 800; font-size: 14px; }
.g2-chi-xem svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.k-ly-do { font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: right; max-width: 55%; }
.g2-luu.dang { opacity: .7; pointer-events: none; }

/* ============================================================
   2026-10-11 — Sổ + Cố định mở toàn trang (user duyệt trên mockup)
   ============================================================ */
/* Hộp «Chưa lưu thay đổi» */
.hoi { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(15,29,23,.42); backdrop-filter: blur(3px); animation: hoi-nen .2s ease-out; }
.hoi-the { width: 100%; max-width: 340px; background: #fff; border-radius: 24px; padding: 22px 20px 14px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: hoi-bat .32s cubic-bezier(.3,1.4,.5,1); }
.hoi-ico { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 18px; background: #fff4e5; font-size: 28px; }
.hoi-the h3 { margin: 0; font-size: 19px; font-weight: 800; }
.hoi-the p { margin: 6px 0 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.hoi-the .nut-chinh, .hoi-the .nut-phu { width: 100%; margin-top: 8px; }
.hoi-the .hoi-bo { color: #b42318; background: var(--bad-soft); }
.hoi-o { margin-top: 6px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 10px; cursor: pointer; width: 100%; }
@keyframes hoi-nen { from { opacity: 0; } }
@keyframes hoi-bat { from { opacity: 0; transform: scale(.88) translateY(12px); } }

/* Toàn trang: không thanh dưới, ô nhập dính đáy, trang trượt vào */
body.toan-trang { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.toan-trang .g1-chan { bottom: 0; }
body.toan-trang #toast-chung { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.toan-trang > .g2-dau, body.toan-trang > main { animation: vao-trang .28s cubic-bezier(.2,.8,.2,1); }
body.ra-trang > .g2-dau, body.ra-trang > main { animation: ra-trang .2s ease-in forwards; }
body.ra-trang > .g1-chan { animation: mo-di .2s ease-in forwards; }
@keyframes mo-di { to { opacity: 0; } }
@keyframes vao-trang { from { opacity: 0; transform: translateX(24px); } }
@keyframes ra-trang { to { opacity: 0; transform: translateX(28px); } }

/* Khối «← | quán»: nút quay lại nối liền nút chọn quán */
.g2-hang { grid-template-columns: 1fr auto; }
.g2-cum { justify-self: start; display: inline-flex; align-items: center; height: 46px; padding: 3px; border-radius: 16px; background: #f3f6f5; box-shadow: inset 0 0 0 1px #e6ece9; }
.g2-ve { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 13px; background: transparent; color: var(--ink); cursor: pointer; transition: background .15s, transform .15s; }
.g2-ve:hover { background: #e8eeeb; }
.g2-ve:active { transform: translateX(-2px) scale(.94); background: #e1e9e5; }
.g2-ve svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.g2-cum-vach { width: 1.5px; height: 22px; border-radius: 1px; background: #d6dfdb; margin: 0 2px; }
.g2-cum .g2-quan-nut { background: transparent; padding: 3px 10px 3px 4px; }
.g2-cum .g2-quan-nut:active, .g2-cum .g2-quan-nut.mo { background: #e8eeeb; }
.g3-so .mui { display: inline-block; width: 18px; height: 18px; vertical-align: 2px; margin-left: 4px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.g2-chip.thieu { color: #b45309; background: #fff4e5; }

/* Lịch tháng trượt lên (Sổ) */
.lt-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lt-dau h2 { margin: 0; font-size: 20px; font-weight: 800; }
.lt-dau .tn-mui { border: 0; cursor: pointer; }
.lt-dau .tn-mui:disabled { opacity: .3; cursor: default; }
.lt-tab { display: flex; background: #f0f3f2; border-radius: 12px; padding: 3px; margin: 12px 0 10px; }
.lt-tab button { flex: 1; border: 0; background: none; font: inherit; font-weight: 700; font-size: 14.5px; padding: 8px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.lt-tab button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,29,23,.12); }
.sheet .so-tong { margin-top: 12px; }
.sheet .tim-o { display: flex; margin: 10px 0 0; padding: 8px 12px; border-radius: 14px; background: #f6f8f7; box-shadow: none; }
.sheet .lich-so { padding: 0; margin: 0; box-shadow: none; }
.sheet .ls-luoi button.chon { box-shadow: 0 0 0 2.5px var(--g1), 0 6px 14px rgba(5,150,105,.25); }
.sheet .ngay-ds { margin-top: 2px; }
.lt-nut-nay { margin-top: 12px; width: 100%; }
.lt-cho { min-height: 220px; display: grid; place-items: center; }

/* Cố định toàn trang */
.cd-g1 .card { margin: 14px 0 0; }
.cd-g1 .cd-hero { margin-top: 0; }
.cd-g1 .cd-ma { margin: 8px 0 0; }
.cd-g1 .cd-thieu-dau { margin: 18px 2px 4px; }
.cd-g1 .bao-khoa { margin: 12px 0 0; }
.th-ds { list-style: none; margin: 10px 0 0; padding: 0; }
.th-ds a { width: 100%; display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; padding: 11px 4px; border-top: 1px solid var(--line); color: inherit; }
.th-ds li:first-child a { border-top: 0; }
.th-ds a.on { background: var(--g-soft); border-radius: 12px; }
.th-ds b { font-size: 15px; }
.th-thanh { height: 8px; border-radius: 4px; background: #eef2ff; overflow: hidden; }
.th-thanh i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #818cf8, #4f46e5); }
.th-so { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.th-so small { display: block; font-size: 11.5px; font-weight: 700; }
.th-so small.du { color: var(--g2); }
.th-so small.thieu { color: #b45309; }
@media (prefers-reduced-motion: reduce) { body.toan-trang > .g2-dau, body.toan-trang > main, body.ra-trang > * { animation: none !important; } }
/* Nhóm cố định: đầu nhóm là nút; nhóm nhiều khoản (Lương) thu gọn khi đã lưu (user 2026-10-11) */
.cd-nhom-dau { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: 0; margin-bottom: 6px; cursor: pointer; border-radius: 12px; }
.cd-nhom-dau:disabled { cursor: default; }
.cd-nhom-ten { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-nhom-ten b { font-size: 16px; font-weight: 800; }
.cd-nhom-ten small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cd-nhom-tong { font-size: 16.5px; font-variant-numeric: tabular-nums; }
.cd-nhom-mui { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.cd-nhom.gon .cd-nhom-mui { transform: none; }
.cd-nhom.gon .cd-nhom-dau { margin-bottom: 0; }
.cd-nhom.gon .cd-ds { display: none; }
.cd-nhom:not(.gon) .cd-ds { animation: o-hien .25s ease-out; }
.cd-dong.doi .cd-mo small { color: #4338ca; font-weight: 700; }
.cd-dong.doi { background: linear-gradient(90deg, #eef2ff, transparent 70%); }
.cd-trang .cd-chan, .cd-luu-thanh { display: none; }
/* Sổ (lịch): ngày chưa ghi chạm được → «+ ghi»; hôm nay chưa ghi viền xanh */
.ls-luoi [data-ghi] small { color: var(--g2); font-weight: 800; }
.ls-luoi .thieu[data-ghi] { box-shadow: inset 0 0 0 1.5px #fca5a5; }
.ls-luoi .cho-ghi { background: #fff; box-shadow: inset 0 0 0 2px var(--g1); color: var(--g3); }
.ls-luoi button.bam { transform: scale(.9); background: var(--g-soft); }
body.ra-trang-trai .page { animation: ra-trai .18s ease-in forwards; }
@keyframes ra-trai { to { opacity: 0; transform: translateX(-24px); } }
.sn-so b { font-size: clamp(13px, 3.9vw, 16px); white-space: nowrap; }
.cd-nhom.mot .cd-nhom-dau { margin-bottom: 0; }
.cd-nhom.mot .cd-ds { display: none; }
.cd-nhom.mot.doi { background: linear-gradient(90deg, #eef2ff, #fff 70%); }
.cd-nhom.mot .cd-nhom-ten small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Logo trên màn đăng nhập: nổi lên khỏi phần đầu xanh */
.dn-logo { display: block; width: 76px; height: 76px; margin: -60px 0 10px; border-radius: 22px; box-shadow: 0 14px 30px rgba(4,120,87,.35), 0 0 0 5px #fff; animation: logo-vao .6s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes logo-vao { from { transform: scale(.6) translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dn-logo { animation: none; } }
/* —— Chọn kỳ so sánh (Tổng quan, 2026-10-11) —— */
.hero-ss { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font: inherit; color: var(--ink-2); padding: 2px 0; cursor: pointer; border-bottom: 1.5px dashed #c9d2ce; }
.hero-ss svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-ss:active { opacity: .7; }
.hero-delta .hero-ss span { border: 0; padding: 0; }
.ss-tieu { margin: 0; font-size: 20px; font-weight: 800; }
.ss-phu { margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; }
.ss-phu b { color: var(--ink); }
.ss-ds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ss-ky { display: grid; grid-template-columns: 1fr auto 26px; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 16px; background: #f6f8f7; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background .2s, transform .15s; }
.ss-ky:active { transform: scale(.98); }
.ss-ky.on { background: var(--g-soft); box-shadow: inset 0 0 0 2px var(--g1); }
.ss-ky.tat { opacity: .45; }
.ss-chu { display: flex; flex-direction: column; min-width: 0; }
.ss-chu b { font-size: 15px; }
.ss-chu small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-so { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ss-so em { display: block; font-style: normal; font-size: 12px; font-weight: 800; }
.ss-so em.len { color: var(--g2); }
.ss-so em.xuong { color: var(--bad); }
.ss-dau { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.ss-ky.on .ss-dau { background: var(--g2); color: #fff; }
.ss-dau svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ss-tu { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ss-tu-tieu { margin: 0 0 8px; font-weight: 800; font-size: 15px; }
.ss-goi { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ss-goi button { border: 0; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 11px; border-radius: 999px; background: #f1f4f3; color: var(--ink-2); cursor: pointer; }
.ss-goi button.on { background: var(--g2); color: #fff; }
.ss-nut { width: 100%; margin-top: 12px; }
/* Cố định: dòng nhắc số lạ dưới thẻ xem trước */
.x-goi { font-size: 12.5px; font-weight: 700; color: #b45309; padding: 0 4px; }

/* ============================================================
   Bàn phím điện thoại (2026-10-11): ô nhập dính trên bàn phím · màn hình gọn khi gõ · dải tóm tắt
   ============================================================ */
/* iPhone: trang không co khi bàn phím mở → nâng ô nhập đáy lên đúng phần bàn phím che */
.g1-chan { transform: translateX(-50%) translateY(calc(-1 * var(--phim, 0px))); transition: transform .14s ease-out; }
body.co-phim .g1-chan { padding-bottom: 8px; box-shadow: 0 -8px 24px rgba(15,29,23,.08); }
body.trang-ghi-so { padding-bottom: calc(110px + var(--phim, 0px) + env(safe-area-inset-bottom)); }
/* Đang gõ: phần đầu thu thành 1 dòng, ẩn trang trí, ẩn chú thích */
body.dang-go .g2-dau { padding-bottom: 8px; box-shadow: 0 8px 24px rgba(15,29,23,.08); }
body.dang-go .g3-ngay { margin-top: 6px; }
body.dang-go .g3-tieu { flex-direction: row; align-items: baseline; gap: 8px; animation: none; }
body.dang-go .g3-so { font-size: 18px; }
body.dang-go .g3-lich { width: 34px; height: 34px; }
body.dang-go .hl-goc, body.dang-go .g2-dau .hl-dau, body.dang-go .g1-cd, body.dang-go .cd-ghi, body.dang-go .g1-nhap { display: none; }
body.dang-go .cd-hero { padding: 10px 14px; }
body.dang-go .cd-hero .ring, body.dang-go .cd-hero .ring-pct, body.dang-go .cd-hero .dk-s { display: none; }
/* Dải tóm tắt nhỏ trên ô nhập — chỉ khi đang gõ */
.g1-tom { display: none; gap: 6px 12px; flex-wrap: wrap; align-items: center; padding: 2px 4px 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
body.dang-go .g1-tom:not(:empty) { display: flex; animation: o-hien .2s ease-out; }
.g1-tom b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.g1-tom b.duong { color: var(--g2); }
.g1-tom b.am { color: var(--bad); }
.g1-tom .thieu { color: #b45309; font-weight: 800; }
body.khoa .g1-tom { display: none !important; }
/* «Vừa ghi» — 3 món cuối, chỉ khi bàn phím mở (2026-10-11: iPhone đẩy danh sách khuất, user không thấy món vừa thêm) */
.g1-gan { display: none; list-style: none; margin: 0 0 8px; padding: 0 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
body.co-phim .g1-gan:not(:empty) { display: block; }
body.khoa .g1-gan { display: none !important; }
.g1-gan li { display: flex; align-items: center; gap: 8px; min-height: 34px; border-top: 1px solid #eef1f0; cursor: pointer; }
.g1-gan li:first-child { border-top: 0; }
.g1-gan li.moi { animation: g1-vao .35s cubic-bezier(.2,.9,.25,1.15) both, g1-loe 1.4s ease-out both; }
.g1-gan .n-ten { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g1-gan .n-tag { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.g1-gan b { flex: 0 0 auto; min-width: 72px; text-align: right; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Bảng trượt (lịch, tìm món…) không bị bàn phím che: nằm trên bàn phím, cao vừa phần còn thấy */
.sheet { bottom: var(--phim, 0px); max-height: min(86vh, calc(var(--vv-h, 100vh) - 24px)); }
@media (prefers-reduced-motion: reduce) { .g1-chan { transition: none; } }

/* —— Khối chọn tháng liền «‹ Tháng ⌄ ›» (2026-10-11: ‹ đứng lẻ bị nhầm là nút quay lại) —— */
.thang-chon { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 4px; padding: 4px; border-radius: 20px; background: #f1f5f3; box-shadow: inset 0 0 0 1px #e3eae6; }
.tc-mui { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 16px; color: var(--g3); transition: background .15s, transform .15s; }
.tc-mui:active { transform: scale(.9); background: #e1ebe6; }
.tc-mui svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tc-mui.tat { color: #c3cec9; }
.tc-giua { display: flex; flex-direction: column; align-items: center; gap: 0; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 4px 6px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(15,29,23,.08); transition: transform .15s; }
.tc-giua:active { transform: scale(.97); }
.tc-giua small { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--g2); }
.tc-giua b { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.tc-giua b svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.thang-chon.chan { animation: g1-lac .35s ease-in-out; }
@keyframes g1-lac { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.so-trang.ra-trai .lich-so, .so-trang.ra-trai .so-tong { animation: ra-trai-nhe .15s ease-in forwards; }
.so-trang.ra-phai .lich-so, .so-trang.ra-phai .so-tong { animation: ra-phai-nhe .15s ease-in forwards; }
@keyframes ra-trai-nhe { to { opacity: 0; transform: translateX(-30px); } }
@keyframes ra-phai-nhe { to { opacity: 0; transform: translateX(30px); } }
/* Bảng 12 tháng */
.th12 a.trong { opacity: .5; }
.th12 b small { font-size: 11px; color: var(--muted); }
.th-thanh.xanh { background: #e8f7f0; }
.th-thanh.xanh i { background: linear-gradient(90deg, #6ee7b7, var(--g2)); }
/* Sổ toàn trang (2026-10-11): cùng bố cục Cố định */
.so-trang.g1 .card { margin: 14px 0 0; }
.so-trang .so-tong { margin-top: 0; }
.g2-nay { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.g2-nay svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
/* Tháng: mũi tên sát hai bên chữ «‹ Tháng 10 2026 ⌄ ›» */
.g3-thang { cursor: default; }
.g3-thang:active { transform: none; }
.tc-dong { display: inline-flex; align-items: center; gap: 2px; margin-left: -6px; }
.tc-mui.nho { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f3; }
.tc-mui.nho svg { width: 18px; height: 18px; stroke-width: 2.6; }
.tc-mui.nho.tat { background: #f6f8f7; }
.tc-chu { display: inline-flex; align-items: baseline; gap: 4px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0 4px; border-radius: 10px; }
.tc-chu small { font-size: .7em; font-weight: 700; }
.tc-chu .mui { align-self: center; }
.tc-chu:active { transform: scale(.97); }
.g3-thang.chan { animation: g1-lac .35s ease-in-out; }
body.dang-go .tc-mui.nho { width: 26px; height: 26px; }
/* Khối tháng ở Cổ đông: mũi tên sát chữ (không trải hết chiều ngang) */
.thang-chon { display: flex; justify-content: center; width: max-content; margin: 0 auto; gap: 4px; }
.thang-chon .tc-giua { padding: 4px 16px; }
.g3-thang .g3-so { font-size: 25px; white-space: nowrap; }
.tc-dong { flex-wrap: nowrap; white-space: nowrap; }
.tc-chu { white-space: nowrap; flex: 0 0 auto; }
.g3-thang { min-width: 0; flex: 1 1 auto; }
@media (max-width: 370px) { .g3-thang .g3-so { font-size: 22px; } }
/* Trạng thái tháng nằm trên dòng nhỏ (nhường chỗ cho «‹ Tháng ›») */
.g3-tt { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: 11.5px; font-weight: 800; vertical-align: 1px; }
.g3-tt i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.g3-tt.co { color: var(--g3); background: var(--g-soft); }
.g3-tt.thieu { color: #b45309; background: #fff4e5; }
.g3-tt.chua { color: var(--muted); background: #f1f4f3; }
/* Ô tên tĩnh trong khối «← | …» (Thêm, Quản trị, Tài khoản) */
.g2-quan-nut.tinh { cursor: default; }
.g2-quan-nut.tinh:active { transform: none; }
.them-trang, .qt-trang, .cdong-trang { padding-top: 2px; }
/* Hộp «Kiểm tra trước khi lưu» */
.kt-the { text-align: left; }
.kt-the h3, .kt-the .hoi-ico { text-align: center; }
.kt-ds { list-style: none; margin: 10px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.kt-ds li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #fffaf2; border: 1px solid #fde4bf; }
.kt-ds li > span { font-size: 18px; line-height: 1.3; }
.kt-ds p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.kt-ds b { color: var(--ink); }
.x-goi.thong-tin { color: #4338ca; }

/* ============================================================
   Kỳ xem + So sánh dễ hiểu — 2026-10-11
   (user: «so tuần thì hiện tuần, so 2 ngày thì hiện 2 ngày; lựa chọn kỳ so sánh làm dễ hiểu»)
   ============================================================ */
/* Ngày · Tuần · Tháng · Tự chọn — viên trắng trượt */
.ky-seg { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; padding: 3px; border-radius: 14px; background: #eef3f1; box-shadow: inset 0 0 0 1px #e1e9e5; }
.ky-con { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 4); border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(15,29,23,.08), 0 4px 10px rgba(15,29,23,.08); transform: translateX(calc(var(--vt, 2) * 100%)); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.ky-seg a, .ky-seg button { position: relative; z-index: 1; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; padding: 8px 0; cursor: pointer; transition: color .2s; }
.ky-seg .on { color: var(--g3); }

/* Dòng so sánh dưới số to */
.ss-hang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ss-to { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 800; padding: 6px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ss-to em { font-style: normal; opacity: .85; }
.ss-to.k-len { color: var(--g3); background: var(--g-soft); }
.ss-to.k-xuong { color: #b42318; background: var(--bad-soft); }
.ss-to.k-dat { color: #1d4ed8; background: #eaf1ff; }
.ss-to.k-bang { color: var(--ink-2); background: #eef1f0; }
.ss-vong { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(currentColor calc(var(--p) * 1%), rgba(29,78,216,.18) 0); }
.ss-pill { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; border: 0; font: inherit; font-size: 14px; color: var(--ink-2); background: #fff; border-radius: 999px; padding: 6px 9px 6px 12px; box-shadow: 0 0 0 1.5px #dbe4e0, 0 2px 8px rgba(15,29,23,.06); cursor: pointer; transition: transform .15s, box-shadow .2s; }
.ss-pill:active { transform: scale(.97); }
.ss-pill span { color: var(--muted); }
.ss-pill b { color: var(--ink); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-pill svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: var(--g2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Bảng «So sánh với…» */
.ss2 .ss-tieu { margin-bottom: 10px; }
.ss-nay { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, #ecfdf5, #f3fbf8); box-shadow: inset 0 0 0 1.5px #a7f3d0; }
.ss-nay-cham { width: 10px; height: 32px; border-radius: 5px; background: linear-gradient(#34d399, #059669); }
.ss-nay-chu { display: flex; flex-direction: column; min-width: 0; }
.ss-nay-chu small { font-size: 12px; color: var(--muted); font-weight: 600; }
.ss-nay-chu b { font-size: 16px; }
.ss-nay-chu em { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.ss-nay strong { font-size: 21px; font-weight: 800; color: var(--g3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ss-meo { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: #7c4a03; background: #fff8e6; border-radius: 12px; padding: 8px 11px; }
.ss-nhom { margin: 16px 0 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ss2 .ss-ky { grid-template-columns: 1fr auto 24px; grid-template-areas: "chu so dau" "thanh ket ket"; row-gap: 8px; column-gap: 10px; }
.ss2 .ss-chu { grid-area: chu; }
.ss2 .ss-so { grid-area: so; font-size: 15.5px; }
.ss2 .ss-dau { grid-area: dau; width: 24px; height: 24px; }
.ss2 .ss-ky:not(.on) .ss-dau svg { opacity: 0; }
.ss-thanh { grid-area: thanh; display: flex; flex-direction: column; gap: 3px; align-self: center; }
.ss-thanh i { display: block; height: 6px; border-radius: 3px; transform-origin: 0 50%; }
.ss-thanh .t-nay { background: linear-gradient(90deg, #34d399, #059669); }
.ss-thanh .t-so { background: #c5cfca; }
.ss2.chay .ss-thanh i { animation: mo-thanh .6s cubic-bezier(.2,.8,.2,1) both; }
.ss2.chay .ss-thanh .t-so { animation-delay: .08s; }
@keyframes mo-thanh { from { transform: scaleX(0); } }
.ss-ket { grid-area: ket; justify-self: end; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.ss-ket small { font-weight: 700; opacity: .75; }
.ss-ket.k-len { color: var(--g2); }
.ss-ket.k-xuong { color: var(--bad); }
.ss-ket.k-dat { color: #1d4ed8; }
.ss-ket.k-bang { color: var(--muted); }
.ss-khac { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ss-khac summary { display: flex; align-items: center; gap: 8px; list-style: none; font-weight: 800; font-size: 15px; cursor: pointer; padding: 4px 0; }
.ss-khac summary::-webkit-details-marker { display: none; }
.ss-khac summary svg { margin-left: auto; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; transition: transform .2s; }
.ss-khac[open] summary svg { transform: rotate(180deg); }
.ss-khac form { margin-top: 10px; }
.ky-goi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ky-goi a { display: flex; flex-direction: column; padding: 11px 13px; border-radius: 14px; background: #f6f8f7; transition: transform .15s; }
.ky-goi a:active { transform: scale(.97); }
.ky-goi b { font-size: 15px; }
.ky-goi small { font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ky-con { transition: none; } .ss2.chay .ss-thanh i { animation: none; } }

/* Biểu đồ cột đôi (kỳ ngắn) */
.chart-cap .cot-so { transform-box: fill-box; transform-origin: 50% 100%; animation: moc .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--tre, 0ms); }
.cap-so { position: absolute; left: 0; right: 0; top: 0; height: 172px; pointer-events: none; }
.cap-so span { position: absolute; transform: translate(-50%, -125%); font-size: 10.5px; font-weight: 800; color: var(--g3); white-space: nowrap; font-variant-numeric: tabular-nums; animation: hien-so .5s .45s both; }
.cap-so span.so-xam { color: var(--muted); }
.mot-ngay .cap-so span { font-size: 12px; }
@keyframes hien-so { from { opacity: 0; transform: translate(-50%, -60%); } }
.cap-x { height: auto; min-height: 18px; }
.cap-x span, .cap-x span:first-child { transform: translateX(-50%); text-align: center; line-height: 1.25; }
.cap-x span b { display: block; font-weight: 800; color: var(--ink-2); }
.cap-x span.nay, .cap-x span.nay b { color: var(--g2); }
.chart-cap .chart-x { height: 30px; }
.mot-ngay .chart-x { height: 20px; }
.mot-ngay .cap-x span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.lg-xam { width: 10px; height: 12px; border-radius: 3px; background: #c5cfca; }
.ky-buoc a.buoc { padding: 9px 9px; }
.ky-buoc a.buoc svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; }
.nut-sua-ky { display: inline-flex; align-items: center; gap: 8px; border: 0; font: inherit; font-weight: 700; font-size: 14.5px; color: var(--ink-2); background: #f1f4f3; padding: 10px 14px; border-radius: 14px; cursor: pointer; }
.nut-sua-ky svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Bảng «So sánh chi tiết» */
.cb-luoi { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 52px; gap: 9px 10px; align-items: baseline; font-size: 13.5px; }
.cb-ten { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-dau { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; white-space: nowrap; }
.cb-dau.xanh { color: var(--g2); }
.cb-ten { color: var(--ink-2); min-width: 0; }
.cb-ten.dam { color: var(--ink); font-weight: 800; }
.cb-n { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-n.am { color: var(--bad); }
.cb-s { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-c { text-align: right; font-size: 12.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.cb-c.tot { color: var(--g2); }
.cb-c.xau { color: var(--bad); }
.cb-nhom { margin: 18px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cb-chu { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.ss-canh { display: flex; gap: 7px; align-items: flex-start; margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: #b45309; }
.ss-canh::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.ss-canh.ghi { color: #4b7a63; }
.ss-canh.ghi::before { background: #86d7b0; box-shadow: 0 0 0 3px rgba(16,185,129,.12); }
.trong-lon .nut-phu { display: block; width: 100%; margin-top: 10px; }

/* Xuất chi phí: chọn cả chi cố định (2026-10-11) */
.xuat-tat { margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: #f3f7f5; width: 100%; box-sizing: border-box; }
.xuat-tat small { color: var(--muted); font-weight: 600; }
.xuat-nhom legend { display: flex; align-items: center; gap: 10px; width: 100%; }
.xuat-nho { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--g2); padding: 2px 0; cursor: pointer; margin-left: auto; }
.xuat-nhom.cd { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.xuat-dem { margin: 12px 0 0; font-size: 13px; }
/* Cổ đông: đầu tháng mở tháng trước + nút bỏ chốt (test 4 vai trò 2026-10-11) */
.cd-mo-truoc { margin: 0 0 12px; padding: 10px 13px; border-radius: 14px; background: #eef6ff; color: #1e3a8a; font-size: 13.5px; line-height: 1.5; }
.cd-mo-truoc a { color: #1d4ed8; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cdong-dk .am { color: var(--bad); }
.nut-bo-chot { margin-top: 8px; color: var(--bad); }
.xuat-hang .o-nhap { min-width: 0; }
.xuat-hang .o-nhap input, .xuat-hang .o-nhap select { min-width: 0; width: 100%; box-sizing: border-box; }
.nhac-chot { background: #fff7e8; color: #92400e; font-size: 13px; } .g1 > .nhac-chot { margin: 10px 0 0; }
/* Đang gõ (đầu trang 1 dòng): không xuống hàng khi chip «Đang sửa» dài — bỏ « · hôm nay» (test 375px 2026-10-11) */
body.dang-go .g3-tieu { min-width: 0; flex: 1 1 auto; overflow: hidden; }
body.dang-go .g3-thu, body.dang-go .g3-so { white-space: nowrap; }
body.dang-go .g3-nay { display: none; }
body.dang-go .g3-phai { gap: 6px; }
/* Số to Cổ đông vừa khung 375px (cạnh donut) — «286.923.629 đ» bị cắt chữ đ (test 2026-10-11) */
.cdong-so { font-size: clamp(19px, 5.6vw, 30px); }


/* Ảnh chụp sổ ngày khi máy không chia sẻ được (TC.luuAnh): nhấn giữ ảnh để Lưu / Chia sẻ — trên dấu chìm (9999) */
.anh-chup-nen { position: fixed; inset: 0; z-index: 10001; display: flex; flex-direction: column; background: rgba(10,20,16,.97); }
.anh-chup-dau { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; color: #fff; font-size: 14.5px; font-weight: 600; }
.anh-chup-dau span { flex: 1; }
.anh-chup-dau button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 18px; cursor: pointer; }
.anh-chup-cuon { flex: 1; overflow: auto; padding: 0 14px calc(14px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.anh-chup { display: block; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 14px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.anh-chup-nut { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px 0; }
.anh-chup-nut button { min-height: 52px; }
.anh-chup-nut svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.anh-chup-nut .nut-phu { background: #fff; }
.anh-chup-goi { margin: 8px 16px 0; color: rgba(255,255,255,.75); font-size: 12.5px; line-height: 1.45; text-align: center; }
.anh-chup-nen { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.anh-chup-cuon { padding-bottom: 4px; }
#toast-chung { z-index: 10002; }  /* thông báo nổi trên ảnh chụp (.anh-chup-nen 10001) */
body:has(.anh-chup-nen) #toast-chung { top: calc(64px + env(safe-area-inset-top)); bottom: auto; }  /* đang xem ảnh chụp: thông báo lên trên, không che 2 nút */
