/* Kế toán Hà Thành – giao diện chính.
   Màu thương hiệu từ logo: xanh #2665a6, đỏ; nền tối navy, điểm nhấn vàng trên nền tối.
   Chữ: tiêu đề Montserrat, nội dung Roboto (cả hai hỗ trợ đầy đủ tiếng Việt). */
:root {
  --brand: #2665a6; --brand-600: #1f5a99; --brand-50: #eef5fc; --brand-100: #d6e6f7;
  --navy: #0a2a52; --navy-2: #123f75;
  --red: #e01020; --red-700: #b80d1a; --red-50: #fdecee; --gold: #ffc233;
  --text: #1d2939; --text-2: #3b495d; --muted: #5f6c7f; --line: #e3e9f1; --tint: #f2f7fd;
  --ok: #137a3a; --ok-50: #e9f7ef; --ok-line: #bfe5cd;
  --warn: #8a5a07; --warn-50: #fdf5e4; --warn-line: #f2dcac;
  --bad: #b4232c; --bad-50: #fdeeef; --bad-line: #f5c9cc;
  --radius: 10px; --radius-lg: 16px;
  --shadow-sm: 0 2px 6px rgba(10, 42, 82, .06);
  --shadow: 0 10px 30px rgba(10, 42, 82, .12);
  --head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.65; color: var(--text); background: #fff;
       -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); margin: 0 0 .5em; line-height: 1.3; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid rgba(38, 101, 166, .45); outline-offset: 2px; }
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }

/* ---------- Thanh trên cùng ---------- */
.topbar { background: var(--brand); color: #e4eefa; font-size: .84rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .item { display: inline-flex; align-items: center; gap: 6px; }
.topbar .icon { width: 15px; height: 15px; color: #fff; opacity: .85; }
.topbar .group { display: flex; gap: 22px; flex-wrap: wrap; }
@media (max-width: 860px) { .topbar .addr { display: none; } .topbar .container { justify-content: center; } }
@media (max-width: 480px) { .topbar .mst { display: none; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 12px rgba(10, 42, 82, .08); }
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 78px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { height: 52px; width: auto; }
.brand-name { display: block; font-family: var(--head); font-weight: 800; color: var(--red); font-size: 1.2rem; letter-spacing: .01em; line-height: 1.1; white-space: nowrap; }
.brand-tag { display: block; font-family: var(--head); font-size: .66rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; margin-top: 5px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav .link { font-family: var(--head); font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--navy); text-decoration: none;
             padding: 10px 12px; border-radius: 6px; background: none; border: 0; cursor: pointer; position: relative; }
.nav .link:hover, .nav .link.active { color: var(--brand); }
.nav .link.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--red); border-radius: 2px; }
.nav form { margin: 0; }
.nav .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
         background: #fff; border-top: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: 0 16px 24px rgba(10, 42, 82, .1); }
  .site-header.open .nav { display: flex; }
  .nav .link { padding: 13px 12px; text-align: left; width: 100%; }
  .nav .link.active::after { display: none; }
  .nav .sep { width: auto; height: 1px; margin: 6px 0; }
  .nav .btn { margin: 8px 0 0; }
}
@media (max-width: 400px) { .brand img { height: 42px; } .brand-name { font-size: 1.02rem; } .brand-tag { font-size: .56rem; } }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--head); font-weight: 700; font-size: .92rem; line-height: 1.2;
       text-decoration: none; padding: 13px 24px; border-radius: 6px; border: 2px solid transparent; cursor: pointer;
       transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; }
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-accent { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(224, 16, 32, .28); }
.btn-accent:hover { background: var(--red-700); color: #fff; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--brand-50); color: var(--navy); }
.btn-ghost, .btn-glass { color: #fff; border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .08); }
.btn-ghost:hover, .btn-glass:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: 10px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Banner ---------- */
.hero { position: relative; color: #fff; padding: 110px 0 150px;
        background: linear-gradient(90deg, rgba(8, 32, 66, .94) 0%, rgba(8, 32, 66, .82) 42%, rgba(8, 32, 66, .35) 100%), var(--hero-img) center / cover no-repeat; }
.hero-content { max-width: 640px; }
.hero-badge { display: inline-block; font-family: var(--head); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
              background: var(--red); color: #fff; padding: 7px 14px; border-radius: 4px; margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.15; margin-bottom: 16px; }
.hero h1 .gold { color: var(--gold); }
.hero-sub { font-size: 1.18rem; color: #dbe6f3; margin-bottom: 22px; }
.hero-checks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.hero-checks li { display: flex; gap: 10px; align-items: center; font-size: 1.02rem; color: #fff; }
.hero-checks .icon { color: var(--gold); width: 22px; height: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 700px) {
  .hero { padding: 64px 0 96px; background: linear-gradient(180deg, rgba(8, 32, 66, .9), rgba(8, 32, 66, .82)), var(--hero-img) center / cover no-repeat; }
  .hero-actions .btn { width: 100%; }
}

.features { position: relative; z-index: 2; margin-top: -80px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.feature-box { padding: 30px 26px; text-align: center; border-top: 4px solid transparent; transition: border-color .2s, background-color .2s; }
.feature-box + .feature-box { border-left: 1px solid var(--line); }
.feature-box:hover { border-top-color: var(--red); background: var(--tint); }
.f-ico { width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.f-ico .icon { width: 28px; height: 28px; }
.feature-box h3 { margin-bottom: 6px; font-size: 1.06rem; }
.feature-box p { color: var(--muted); font-size: .93rem; margin: 0; line-height: 1.5; }
@media (max-width: 960px) { .features-grid { grid-template-columns: 1fr 1fr; } .feature-box:nth-child(3) { border-left: 0; } .feature-box:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .features { margin-top: -56px; } .feature-box { padding: 22px 14px; } .f-ico { width: 50px; height: 50px; } }

/* ---------- Section chung ---------- */
.section { padding: 90px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin-bottom: 14px; }
.kicker, .section-head .kicker { display: block; font-family: var(--head); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 0 0 10px; }
.title-bar { display: block; width: 64px; height: 4px; background: var(--red); border-radius: 2px; margin: 0 auto; }
.section-head.on-dark h2 { color: #fff; }
.section-head.on-dark .kicker { color: var(--gold); }
.center-btn { text-align: center; margin-top: 40px; }
@media (max-width: 700px) { .section { padding: 60px 0; } .section-head { margin-bottom: 32px; } }

/* Về chúng tôi */
.about { padding-top: 110px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.about-media { position: relative; padding: 0 0 28px 28px; }
.about-media::before { content: ""; position: absolute; left: 0; bottom: 0; width: 70%; height: 75%; background: var(--brand); border-radius: var(--radius-lg); }
.about-media img { position: relative; border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; height: auto; }
.about-tag { position: absolute; right: -14px; bottom: 54px; background: var(--red); color: #fff; padding: 16px 22px; border-radius: var(--radius); box-shadow: 0 10px 24px rgba(224, 16, 32, .3); }
.about-tag strong { display: block; font-family: var(--head); font-size: 1.1rem; }
.about-tag span { font-size: .88rem; opacity: .9; }
.about h2 { margin-bottom: 18px; }
.about-text { color: var(--text-2); font-size: 1.04rem; }
.about-text strong { color: var(--navy); }
.about-list { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 16px; }
.about-list li { display: flex; gap: 14px; align-items: flex-start; }
.a-ico { width: 46px; height: 46px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.a-ico .icon { width: 23px; height: 23px; }
.about-list strong { display: block; font-family: var(--head); color: var(--navy); font-size: 1rem; }
.about-list li span:last-child { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .about { padding-top: 70px; } .about-grid { grid-template-columns: 1fr; gap: 40px; } .about-tag { right: 8px; } }

/* Dịch vụ */
.services-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }
.service-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); padding: 32px 28px; text-decoration: none; color: var(--text);
                box-shadow: var(--shadow-sm); border-bottom: 4px solid transparent; transition: transform .2s, box-shadow .2s, border-color .2s, background-color .2s; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-bottom-color: var(--red); color: var(--text); }
.s-ico { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--brand), var(--navy-2)); color: #fff; display: grid; place-items: center; margin-bottom: 20px;
         box-shadow: 0 8px 18px rgba(38, 101, 166, .3); }
.s-ico .icon { width: 30px; height: 30px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); flex: 1; font-size: .96rem; margin-bottom: 18px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 700; color: var(--red); font-size: .88rem; }
.more .icon { width: 16px; height: 16px; transition: transform .15s; }
.service-card:hover .more .icon, .news-card:hover .more .icon, .article-row:hover .more .icon { transform: translateX(4px); }

/* Quy trình (nền ảnh) */
.process { position: relative; padding: 90px 0; color: #fff;
           background: linear-gradient(rgba(8, 32, 66, .9), rgba(8, 32, 66, .9)), var(--bg-img) center / cover no-repeat; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--tint); border-radius: var(--radius); padding: 24px 22px; }
.step-num { display: block; font-family: var(--head); font-size: 2rem; font-weight: 800; color: var(--red); line-height: 1; margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.process .steps { gap: 28px; }
.process .step { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-lg); padding: 32px 28px; }
.process .step-num { font-size: 2.6rem; color: var(--gold); margin-bottom: 14px; }
.process .step h3 { color: #fff; font-size: 1.15rem; }
.process .step p { color: #c9d6e6; font-size: 1rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } .process { padding: 60px 0; } }

/* Tin bài trang chủ */
.news-cards { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .news-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .news-cards { grid-template-columns: 1fr; } }
.news-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--text);
             box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); color: var(--text); }
.news-card .cover-wrap { border-radius: 0; position: relative; }
.date-badge { position: absolute; right: 14px; top: 14px; background: var(--red); color: #fff; border-radius: 6px; padding: 6px 10px; text-align: center;
              font-family: var(--head); font-size: .72rem; font-weight: 600; line-height: 1.1; }
.date-badge b { display: block; font-size: 1.3rem; font-weight: 800; }
.news-card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { font-size: 1.08rem; line-height: 1.45; margin: 10px 0 8px; }
.news-card:hover h3 { color: var(--brand); }
.news-card p { color: var(--muted); font-size: .94rem; flex: 1; }

/* Kêu gọi liên hệ (nền ảnh) */
.cta-band { color: #fff; padding: 80px 0;
            background: linear-gradient(90deg, rgba(31, 90, 153, .95), rgba(10, 42, 82, .92)), var(--bg-img) center / cover no-repeat; }
.cta-band-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe6f3; font-size: 1.06rem; }
.cta-contacts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.cta-contacts li { display: flex; gap: 10px; align-items: center; }
.cta-contacts .icon { color: var(--gold); width: 19px; height: 19px; }
.cta-contacts a { color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.cta-contacts a:hover { text-decoration: underline; }
.cta-box { background: #fff; border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, .2); }
.cta-label { display: block; font-family: var(--head); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cta-phone { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--red);
             text-decoration: none; margin: 6px 0 20px; }
.cta-phone .icon { width: 30px; height: 30px; }
.cta-phone:hover { color: var(--red-700); }
@media (max-width: 860px) { .cta-band-inner { grid-template-columns: 1fr; gap: 32px; } .cta-band { padding: 60px 0; } }

/* Thẻ CTA nhỏ (trang con) */
.cta { background: linear-gradient(135deg, var(--brand), var(--navy)); color: #dbe6f3; border-radius: var(--radius-lg); padding: 30px 32px;
       display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 4px; }
.cta p { margin: 0; }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b0c1d6; padding: 64px 0 0; font-size: .94rem; border-top: 4px solid var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 48px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.site-footer h4 { color: #fff; font-size: .95rem; font-weight: 700; text-transform: uppercase; margin: 0 0 18px; padding-bottom: 10px; position: relative; }
.site-footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: var(--red); }
.site-footer a { color: #dbe5f1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.logo-tile { background: #fff; border-radius: 10px; padding: 7px 9px; display: grid; place-items: center; flex: none; }
.logo-tile img { height: 46px; width: auto; }
.footer-brand strong { color: #fff; display: block; font-family: var(--head); line-height: 1.35; font-weight: 700; text-wrap: balance; }
.footer-brand small { color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.f-item { display: flex; gap: 10px; align-items: flex-start; }
.f-item .icon { width: 17px; height: 17px; color: var(--gold); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 48px; padding: 20px 0; font-size: .84rem; color: #8299b3;
                 display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fab-call { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: none; align-items: center; gap: 8px; background: var(--red); color: #fff;
            padding: 12px 18px; border-radius: 999px; text-decoration: none; font-family: var(--head); font-weight: 700; box-shadow: 0 10px 24px rgba(224, 16, 32, .35); }
.fab-call:hover { color: #fff; background: var(--red-700); }
.fab-call .icon { width: 18px; height: 18px; }
@media (max-width: 700px) { .fab-call { display: inline-flex; } .site-footer { padding-bottom: 64px; } }

/* ---------- Trang con: đầu trang nền ảnh ---------- */
.page-head { color: #fff; padding: 56px 0 52px;
             background: linear-gradient(90deg, rgba(8, 32, 66, .95), rgba(18, 63, 117, .85)), url("img/photos/process.5d5c69c65ebd.webp") center / cover no-repeat; }
.page-head .row { display: flex; align-items: center; gap: 18px; }
.page-head .ico-box { margin: 0; background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.page-head h1 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 0; }
.page-head .sub { color: #d3e0ef; margin: 10px 0 0; max-width: 760px; font-size: 1.04rem; }
.crumbs { font-size: .86rem; color: #b9cbe0; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: #e4edf7; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.article-page .crumbs { color: var(--muted); }
.article-page .crumbs a { color: var(--muted); }
.article-page .crumbs a:hover { color: var(--brand); }
.page { padding: 44px 0 90px; background: var(--tint); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: start; }
.layout > .stack, .layout > aside { display: grid; gap: 24px; min-width: 0; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.card > :last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-title h2 { font-size: 1.2rem; margin: 0; }
@media (max-width: 600px) { .card { padding: 20px; } }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ico-box { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; flex: none; }
.ico-box .icon { width: 24px; height: 24px; }
.ico-box.red { background: var(--red-50); color: var(--red); }
aside .card h3 { font-size: 1.05rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-50); position: relative; }
aside .card h3::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 40px; height: 2px; background: var(--red); }
.steps-mini { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }

/* ---------- Đăng ký / đăng nhập ---------- */
.auth-wrap { padding: 48px 0 90px; background: var(--tint); }
.auth { display: grid; grid-template-columns: 400px minmax(0, 1fr); background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); max-width: 1080px; margin: 0 auto; }
.auth.narrow { max-width: 900px; grid-template-columns: 370px minmax(0, 1fr); }
.auth-side { color: #d3e0ef; padding: 40px 36px;
             background: linear-gradient(160deg, rgba(8, 32, 66, .95), rgba(31, 90, 153, .92)), url("img/photos/hero.211d4b5ad51b.webp") center / cover no-repeat; }
.auth-side .logo-tile { margin-bottom: 26px; display: inline-grid; }
.auth-side .logo-tile img { height: 56px; }
.auth-side h2 { color: #fff; font-size: 1.5rem; }
.auth-side ol, .auth-side ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 16px; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.auth-side .n { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--navy); font-family: var(--head); font-weight: 800; font-size: .85rem; display: grid; place-items: center; flex: none; }
.auth-side li strong { color: #fff; display: block; font-family: var(--head); }
.auth-side li > .icon { color: var(--gold); margin-top: 3px; }
.auth-side .contact { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .92rem; display: grid; gap: 8px; }
.auth-side .contact a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.auth-side .contact .icon { width: 16px; height: 16px; color: var(--gold); }
.auth-main { padding: 40px; }
.auth-main h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-main > .muted { margin-bottom: 26px; }
@media (max-width: 880px) {
  .auth, .auth.narrow { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 22px; }
  .auth-side .hide-sm { display: none; }
  .auth-main { padding: 28px 20px; }
}

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-section { font-family: var(--head); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin: 6px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--brand-50); grid-column: 1 / -1; }
.field { margin-bottom: 18px; min-width: 0; }
.field .lbl { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 7px; color: var(--navy); }
.field .req { color: var(--red); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field textarea,
.field input[type=number], .field input[type=date], .field input[type=search], .field input[type=url] {
  width: 100%; font: inherit; font-size: .98rem; padding: 12px 14px; border: 1.5px solid #d3dce8; border-radius: 8px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s; }
.field input::placeholder, .field textarea::placeholder { color: #9aa8ba; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(38, 101, 166, .12); }
.field.has-error input, .field.has-error textarea { border-color: var(--bad); }
.help { font-size: .84rem; color: var(--muted); margin-top: 6px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--bad); font-size: .87rem; font-weight: 500; }
.errorlist.nonfield { background: var(--bad-50); border: 1px solid var(--bad-line); padding: 10px 14px; border-radius: 8px; margin: 0 0 18px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.check-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid #d3dce8; border-radius: 8px; cursor: pointer;
              font-weight: 500; font-size: .94rem; background: #fff; transition: border-color .15s, background-color .15s; }
.check-card:hover { border-color: var(--brand-100); background: var(--brand-50); }
.check-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--navy); }
.check-card input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: none; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
/* Trang đăng ký gọn: ô nhỏ, lưới 6 cột (mặc định 2 ô / dòng, .c2 = 3 ô / dòng), ẩn chú thích dài (lỗi vẫn hiện) */
.auth-compact { grid-template-columns: 300px minmax(0, 1fr); max-width: 1120px; }
.auth-compact .auth-side { padding: 28px 26px; }
.auth-compact .auth-side .logo-tile { margin-bottom: 16px; }
.auth-compact .auth-side h2 { font-size: 1.25rem; }
.auth-compact .auth-side li { font-size: .86rem; }
.auth-compact .auth-main { padding: 24px 32px 26px; }
.auth-compact .auth-main h1 { font-size: 1.45rem; margin-bottom: 2px; }
.auth-compact .auth-main > .muted { margin-bottom: 12px; font-size: .9rem; }
.auth-compact .form-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 12px; }
.auth-compact .form-grid > .field { grid-column: span 3; }
.auth-compact .form-grid > .field.c2 { grid-column: span 2; }
.auth-compact .form-grid > .full { grid-column: 1 / -1; }
.auth-compact .form-section { margin: 4px 0 10px; padding-bottom: 5px; font-size: .72rem; }
.auth-compact .field { margin-bottom: 10px; }
.auth-compact .field .lbl { font-size: .84rem; margin-bottom: 4px; }
.auth-compact .field input[type=text], .auth-compact .field input[type=email], .auth-compact .field input[type=password],
.auth-compact .field input[type=tel], .auth-compact .field input[type=date], .auth-compact .field textarea {
  padding: 8px 11px; font-size: .9rem; border-width: 1px; }
.auth-compact .field .help { display: none; }
.auth-compact .errorlist { margin-top: 3px; font-size: .8rem; }
.auth-compact .checks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.auth-compact .check-card { padding: 7px 10px; font-size: .84rem; gap: 8px; border-width: 1px; }
.auth-compact .check-card input { width: 16px; height: 16px; }
.auth-compact .form-foot { margin-top: 4px; }
.auth-compact .pw-rules { margin: -4px 0 10px; padding: 0; background: none; border: 0; font-size: .8rem; }
/* mật khẩu nhập lại khớp: tích xanh trong cả hai ô; khác: viền đỏ ô nhập lại */
.field input.pw-ok { border-color: #18a058 !important; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%2318a058'/%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 18px; }
.field input.pw-bad { border-color: var(--bad) !important; }
/* Phễu lọc cạnh tên cột + khung lọc nổi */
.cf-h { display: inline-flex; align-items: center; gap: 5px; }
.cf-btn { position: relative; flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0; border: 0;
  border-radius: 5px; background: transparent; color: #93a2b6; cursor: pointer; }
.cf-btn:hover { background: rgba(38, 101, 166, .12); color: var(--brand); }
.cf-btn.on { background: var(--brand); color: #fff; }
.cf-btn svg { width: 11px; height: 11px; fill: currentColor; }
.cf-pop { position: fixed; z-index: 70; width: 240px; display: grid; gap: 6px; padding: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(15, 35, 70, .18); text-align: left; font-weight: 400; text-transform: none;
  letter-spacing: 0; white-space: normal; color: var(--text); }
.cf-pop[hidden] { display: none; }
.cf-pop .cf-l { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cf-pop select, .cf-pop input:not([data-date-native]) { width: 100%; max-width: none; height: 34px; padding: 0 9px; border: 1px solid #d3dce8;
  border-radius: 7px; font: inherit; font-size: .86rem; background: #fff; color: var(--text); }
.cf-pop select:focus, .cf-pop input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38, 101, 166, .12); }
.cf-pop .date-box { display: block; }
.cf-pop .cf-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.pw-warn { color: var(--bad); font-size: .8rem; font-weight: 500; margin-top: 4px; }
.pw-warn[hidden] { display: none; }
/* nút con mắt trong ô mật khẩu (tích xanh "khớp" lùi sang trái nhường chỗ) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 42px !important; }
.pw-wrap input.pw-ok { padding-right: 68px !important; background-position: right 42px center; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: #7a8899; cursor: pointer; padding: 0; }
.pw-eye:hover { color: var(--brand); background: var(--brand-50); }
.pw-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.auth-compact .form-foot p { font-size: .86rem; }
@media (max-width: 900px) { .auth-compact .form-grid > .field { grid-column: 1 / -1; } .auth-compact .checks { grid-template-columns: 1fr 1fr; } }
.form-foot p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- Thông báo, nhãn, bảng ---------- */
.messages { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; border: 1px solid; font-size: .96rem; }
.alert .icon { margin-top: 2px; }
.alert strong { display: block; }
.alert p { margin: 2px 0 0; }
.alert-success { background: var(--ok-50); border-color: var(--ok-line); color: #0e5c2c; }
.alert-warning { background: var(--warn-50); border-color: var(--warn-line); color: #6f4805; }
.alert-error { background: var(--bad-50); border-color: var(--bad-line); color: #8e1b22; }
.alert-info { background: var(--brand-50); border-color: var(--brand-100); color: var(--navy); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: var(--warn-50); color: var(--warn); }
.badge.approved { background: var(--ok-50); color: var(--ok); }
.badge.rejected { background: var(--bad-50); color: var(--bad); }
.table-wrap { overflow-x: auto; margin: 0 -28px -28px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; text-align: left; padding: 12px 28px; background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 15px 28px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) { .table-wrap { margin: 0 -20px -20px; } th, td { padding-left: 20px; padding-right: 20px; } }
.info-list { margin: 0; display: grid; gap: 14px; }
.info-list div { display: grid; gap: 2px; }
.info-list dt { font-size: .8rem; color: var(--muted); }
.info-list dd { margin: 0; font-weight: 500; color: var(--navy); overflow-wrap: anywhere; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tile-link { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px solid var(--brand-100); border-radius: 10px; text-decoration: none;
             color: var(--navy); background: var(--brand-50); font-family: var(--head); font-weight: 700; transition: border-color .15s, box-shadow .15s; }
.tile-link:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); color: var(--navy); }
.tile-link .ico-box { margin: 0; width: 44px; height: 44px; border-radius: 10px; background: #fff; }
.tile-link .ico-box .icon { width: 22px; height: 22px; }
.tile-link small { display: block; color: var(--brand); font-family: var(--body); font-weight: 500; font-size: .82rem; }
.tile-link > .icon { margin-left: auto; color: var(--brand); width: 18px; height: 18px; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.empty .ico-box { margin: 0 auto 14px; }
.side-contact { display: grid; gap: 10px; }
.side-contact a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; color: var(--navy); font-size: .96rem; }
.side-contact a:hover { color: var(--brand); }
.side-contact a span { min-width: 0; }
.side-contact .icon { color: var(--red); width: 18px; height: 18px; }

/* ---------- Kiến thức / bài viết ---------- */
.chip { display: inline-block; align-self: flex-start; font-family: var(--head); font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
        color: var(--brand); background: var(--brand-50); padding: 4px 10px; border-radius: 4px; white-space: nowrap; }
.meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.meta > * + *:not(.chip)::before { content: "·"; margin-right: 12px; color: #a3b0c0; }
.meta .chip + *::before { content: none; }
.article-heading { font-family: var(--head); font-weight: 700; color: var(--navy); line-height: 1.4; }
.excerpt { color: var(--muted); font-size: .96rem; line-height: 1.6; margin: 0; }
.cover-wrap { aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-50); border-radius: var(--radius); }
.cover { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .cover, .article-row:hover .cover, .article-card:hover .cover { transform: scale(1.05); }
.cover-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--brand); font-weight: 700; font-size: .9rem;
            background: radial-gradient(circle at 30% 20%, #fff, var(--brand-50) 60%, var(--brand-100)); text-align: center; padding: 12px; }
.cover-ph img { height: 44px; width: auto; opacity: .9; }

.article-rows { display: grid; gap: 20px; }
.article-row { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px; background: #fff; border-radius: var(--radius-lg);
               box-shadow: var(--shadow-sm); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.article-row:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.article-row .article-heading { font-size: 1.25rem; margin: 0 0 10px; }
.article-row:hover .article-heading { color: var(--brand); }
.article-row .excerpt { margin-bottom: 14px; }
@media (max-width: 760px) { .article-row { grid-template-columns: 1fr; gap: 16px; padding: 16px; } .article-row .article-heading { font-size: 1.12rem; } }

.article-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: inherit; }
.article-card .cover-wrap { border-radius: 0; }
.article-card .body { padding: 18px 20px 20px; }
.article-card .article-heading { font-size: 1rem; margin: 0; }
.article-card:hover .article-heading { color: var(--brand); }

.search { display: flex; gap: 8px; margin-top: 24px; max-width: 580px; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: .98rem; padding: 12px 16px; border: 0; border-radius: 6px; background: #fff; }
.search input:focus { outline: 3px solid rgba(255, 194, 51, .6); }
.search .btn { background: var(--red); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
       color: var(--navy); text-decoration: none; font-family: var(--head); font-weight: 600; font-size: .86rem; }
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.count { font-size: .72rem; font-weight: 700; background: rgba(10, 42, 82, .08); padding: 1px 8px; border-radius: 999px; }
.tab.active .count { background: rgba(255, 255, 255, .25); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; }

.article-page { padding-top: 36px; }
.article-page > .container > .stack { background: #fff; border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
@media (max-width: 600px) { .article-page > .container > .stack { padding: 20px; } }
.article-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.3; margin: 0 0 16px; }
.article-meta { font-size: .88rem; }
.article-summary { font-size: 1.12rem; font-weight: 500; color: var(--text-2); line-height: 1.7; margin: 8px 0 0; padding: 14px 18px; background: var(--tint); border-left: 4px solid var(--red); border-radius: 0 8px 8px 0; }
.legal-box { display: flex; flex-wrap: wrap; gap: 14px 40px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 16px 20px; }
.legal-box small { display: block; color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-family: var(--head); }
.legal-box strong { color: var(--navy); font-weight: 500; }
.article-cover { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }

.prose { font-size: 1.06rem; line-height: 1.8; color: var(--text); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.35rem; margin: 1.9em 0 .7em; padding-left: 14px; border-left: 4px solid var(--brand); line-height: 1.35; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--red); }
.prose strong { color: var(--navy); font-weight: 700; }
.prose a { color: var(--brand); }
.prose img { height: auto; border-radius: 10px; margin: 0 auto; box-shadow: var(--shadow-sm); }
.prose figure { margin: 1.8em 0; text-align: center; }
.prose figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; font-style: italic; }
.prose blockquote { margin: 1.6em 0; padding: 18px 22px; background: #fff8e6; border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; color: var(--text); font-size: 1rem; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .96rem; line-height: 1.55; }
.prose th, .prose td { border: 1px solid #d3dce8; padding: 10px 14px; vertical-align: top; text-transform: none; letter-spacing: 0; font-size: inherit; white-space: normal; }
.prose th { background: var(--brand); color: #fff; font-weight: 500; }
.prose tbody tr:nth-child(even) td { background: var(--tint); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0 1.2em; }
.prose hr + p em { font-size: .9rem; color: var(--muted); line-height: 1.6; display: block; }
@media (max-width: 700px) { .prose { font-size: 1.02rem; } .prose table { display: block; overflow-x: auto; } }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); font-size: .92rem; }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-list, .side-news { list-style: none; padding: 0; margin: 0; }
.cat-list li + li { border-top: 1px solid var(--line); }
.cat-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; text-decoration: none; color: var(--text-2); font-size: .96rem; }
.cat-list a:hover { color: var(--brand); }
.side-news li { padding: 12px 0; }
.side-news li:first-child { padding-top: 0; }
.side-news li + li { border-top: 1px solid var(--line); }
.side-news a { display: block; text-decoration: none; color: var(--navy); font-family: var(--head); font-weight: 600; line-height: 1.45; font-size: .93rem; }
.side-news a:hover { color: var(--brand); }
.side-news time { font-size: .8rem; color: var(--muted); }

/* ---------- Cổng số liệu doanh nghiệp ---------- */
.small { font-size: .86rem; }
.period-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 22px; }
.period-form label { display: grid; gap: 4px; font-size: .82rem; color: #d3e0ef; }
.period-form select, .period-form input { font: inherit; font-size: .95rem; padding: 9px 12px; border: 0; border-radius: 6px; min-width: 120px; color: var(--text); }
.dash { display: grid; gap: 24px; }
.alert-list { display: grid; gap: 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .kpi-grid { grid-template-columns: 1fr 1fr; } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: grid; gap: 4px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--brand); min-width: 0; }
.kpi .label { font-size: .84rem; color: var(--muted); font-weight: 500; }
.kpi .value { font-family: var(--head); font-weight: 800; font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: var(--navy); line-height: 1.2; }
.kpi .sub { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; }
.kpi .sub .icon { width: 15px; height: 15px; }
.kpi.is-neg { border-top-color: #d03b3b; }
.kpi.is-neg .sub { color: #b42318; font-weight: 500; }
.kpi.is-pos { border-top-color: #0ca30c; }
.kpi.is-pos .sub { color: var(--ok); font-weight: 500; }
.chart-card { position: relative; }
.legend { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; font-size: .86rem; color: var(--text-2); }
.legend li, .chart-tip div { display: flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.chart { width: 100%; height: 300px; position: relative; }
.chart svg { display: block; font-family: var(--body); }
.chart-tip { position: absolute; top: 64px; z-index: 5; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 12px; font-size: .85rem; pointer-events: none; }
.chart-tip b { display: block; margin-bottom: 4px; color: var(--navy); }
.chart-tip div span:last-child { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; color: var(--text); }
.chart-tip .pf { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; color: var(--muted); }
.table-toggle { margin-top: 12px; }
.table-toggle summary, .tb-card summary { cursor: pointer; color: var(--brand); font-weight: 500; }
.table-scroll { overflow-x: auto; }
.fin-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.fin-table th { background: var(--tint); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; text-align: right; border: 0; border-bottom: 1px solid var(--line); }
.fin-table th:first-child, .fin-table td:first-child, .fin-table td.name { text-align: left; }
.fin-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fin-table td.name { white-space: normal; min-width: 200px; }
.fin-table small { color: var(--muted); font-size: .72rem; }
.fin-table .neg { color: #b42318; }
.fin-table.pl td:first-child { white-space: normal; }
.fin-table tr.sum td { font-weight: 700; color: var(--navy); background: #fafcfe; }
.fin-table tr.total td { font-weight: 800; font-family: var(--head); color: var(--navy); border-top: 2px solid var(--navy); border-bottom: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.mini-title { font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.card-title + .mini-title { margin-top: 0; }
.debt-list { list-style: none; padding: 0; margin: 0; }
.debt-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.debt-list li b { font-variant-numeric: tabular-nums; color: var(--navy); white-space: nowrap; }
.tb-card summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; list-style: none; }
.tb-card summary::-webkit-details-marker { display: none; }
.tb-card summary h2 { font-size: 1.2rem; margin: 0; }
.tb-card[open] summary { margin-bottom: 16px; }
.report-item { border-top: 1px solid var(--line); padding: 20px 0; }
.report-item:first-of-type { border-top: 0; padding-top: 0; }
.report-item header h3 { margin: 0 0 2px; }
.report-note { background: var(--tint); border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 12px 0; }
.report-note p:last-child { margin: 0; }
.comments { display: grid; gap: 10px; margin: 14px 0; }
.comment { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; max-width: 760px; }
.comment.is-staff { background: var(--brand-50); border-color: var(--brand-100); margin-left: 32px; }
.comment .who { font-weight: 700; color: var(--navy); font-size: .9rem; }
.comment .when { font-size: .78rem; color: var(--muted); margin-left: 8px; }
.comment .msg { margin-top: 4px; }
.comment-form { display: flex; gap: 10px; align-items: flex-end; max-width: 760px; }
.comment-form textarea { flex: 1; font: inherit; padding: 10px 12px; border: 1.5px solid #d3dce8; border-radius: 8px; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--brand); }
.company-cta { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius-lg); text-decoration: none; color: #dbe6f3;
               background: linear-gradient(120deg, var(--navy), var(--brand)); box-shadow: var(--shadow); }
.company-cta:hover { color: #fff; }
.company-cta strong { display: block; color: #fff; font-family: var(--head); font-size: 1.1rem; }
.company-cta .ico-box { margin: 0; background: rgba(255, 255, 255, .15); color: #fff; }
.company-cta > .icon { margin-left: auto; color: var(--gold); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar.on-dark { margin: 20px 0 0; }
.list-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.list-table th { text-align: left; font-size: .76rem; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--tint); white-space: nowrap; }
.list-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list-table.small td { padding: 8px 12px; font-size: .88rem; }
.upload-form { display: grid; gap: 4px; max-width: 560px; }
.upload-form input[type=file] { font: inherit; padding: 10px; border: 1.5px dashed #b7c6d8; border-radius: 8px; width: 100%; background: var(--tint); }
.warn-pre { white-space: pre-wrap; font-size: .8rem; color: var(--warn); background: var(--warn-50); padding: 10px; border-radius: 8px; max-height: 240px; overflow: auto; }

/* ---------- Tab báo cáo công ty, BCTC, công nợ, sổ chi tiết ---------- */
.company-head { padding-bottom: 0; }
.company-tabs { margin-top: 26px; background: rgba(255, 255, 255, .08); border-top: 1px solid rgba(255, 255, 255, .12); }
.company-tabs .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.company-tabs a { color: #d3e0ef; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: .9rem; padding: 14px 16px; white-space: nowrap; border-bottom: 3px solid transparent; }
.company-tabs a:hover { color: #fff; }
.company-tabs a.on { color: #fff; border-bottom-color: var(--gold); background: rgba(255, 255, 255, .08); }
.kpi-link { text-decoration: none; transition: box-shadow .15s, transform .15s; }
.kpi-link:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kpi-link .sub { color: var(--brand); font-weight: 500; }
.debt-list li a { color: var(--text); text-decoration: none; }
.debt-list li a:hover { color: var(--brand); text-decoration: underline; }
.fin-table td a { color: var(--brand); font-weight: 500; text-decoration: none; }
.fin-table td a:hover { text-decoration: underline; }
.report-toolbar { display: flex; gap: 10px; justify-content: flex-end; }
.btn .icon { flex: none; }
.fs-card { padding: 32px; }
.fs-head { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.fs-form { text-align: right; font-weight: 700; color: var(--navy); }
.fs-title { text-align: center; font-size: 1.35rem; margin: 22px 0 4px; letter-spacing: .02em; }
.fs-sub { text-align: center; color: var(--muted); margin-bottom: 20px; font-style: italic; }
.fin-table.fs td { white-space: normal; }
.fin-table.fs td:nth-child(n+3) { white-space: nowrap; width: 18%; }
.fin-table.fs .ms { text-align: center; width: 70px; color: var(--muted); }
.fin-table.fs th:nth-child(2) { text-align: center; }
.fin-table.fs tr.sect td { font-family: var(--head); font-weight: 800; color: var(--navy); background: var(--brand-50); text-align: center; letter-spacing: .06em; }
.fin-table.fs tr.lv0 td { font-family: var(--head); font-weight: 800; color: var(--navy); background: #fafcfe; border-top: 2px solid var(--navy); }
.fin-table.fs tr.lv1 td { font-weight: 700; color: var(--navy); }
.fin-table.fs tr.lv2 td:first-child { padding-left: 28px; }
.fin-table.fs tr.lv3 td:first-child { padding-left: 44px; font-style: italic; color: var(--muted); }
.fs-check { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 500; margin: 14px 0 0; }
.fs-check .icon { width: 18px; height: 18px; }
.table-filter { width: 100%; max-width: 360px; font: inherit; padding: 9px 12px; border: 1.5px solid #d3dce8; border-radius: 8px; margin-bottom: 14px; }
.table-filter:focus { outline: none; border-color: var(--brand); }
.fin-table thead th[colspan] { text-align: center; border-bottom: 1px solid var(--line); }
.fin-table thead th[rowspan] { vertical-align: bottom; }
.fin-table tfoot td { font-weight: 800; font-family: var(--head); color: var(--navy); background: var(--brand-50); border-top: 2px solid var(--navy); text-align: right; }
.fin-table tfoot td:first-child, .fin-table tfoot td[colspan] { text-align: left; }
.fin-table td.strong { font-weight: 700; color: var(--navy); }
.fin-table.partners td.name { min-width: 260px; }
.fin-table.ledger td.name { min-width: 280px; white-space: normal; }
.fin-table.ledger tbody tr.sum td { font-weight: 700; background: #fafcfe; }
.ledger-name { font-family: var(--head); font-weight: 700; font-size: 1.1rem; color: var(--brand); margin: 0 0 4px; }
.ledger-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 20px; }
@media (max-width: 760px) { .ledger-summary { grid-template-columns: 1fr 1fr; } }
.ledger-summary div { background: var(--tint); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.ledger-summary span { font-size: .8rem; color: var(--muted); }
.ledger-summary b { font-family: var(--head); font-size: 1.05rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.ledger-summary .hl { background: var(--navy); }
.ledger-summary .hl span { color: #b9cbe0; }
.ledger-summary .hl b, .ledger-summary .hl small { color: #fff; }

@media print {
  .topbar, .site-header, .site-footer, .fab-call, .company-tabs, .period-form, .report-toolbar, .crumbs, .table-filter, .comment-form { display: none !important; }
  .page-head { background: none !important; color: #000; padding: 0 0 10px; }
  .page-head h1, .page-head .sub { color: #000 !important; }
  .page { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; break-inside: avoid-page; }
  .fs-card { break-after: page; }
  .fin-table th { background: #eee !important; }
}

/* Phần tử con của lưới không được tự giãn theo bảng rộng: bảng cuộn ngang trong khung, trang không tràn */
.dash > *, .two-col > *, .layout > * { min-width: 0; }
.table-scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) { .fs-card { padding: 18px 14px; } .fs-head { flex-direction: column; } .fs-form { text-align: left; } .report-toolbar { justify-content: flex-start; } }

/* Bảng công nợ / sổ chi tiết: tiêu đề căn giữa, bảng gọn vừa khung */
.fin-table.partners, .fin-table.ledger { font-size: .87rem; }
.fin-table.partners th, .fin-table.ledger th { text-align: center; padding: 8px 8px; }
.fin-table.partners td, .fin-table.ledger td { padding: 8px 8px; }
.fin-table.partners td.name { min-width: 200px; }
.fin-table.partners td:first-child { color: var(--muted); font-size: .8rem; }
.fin-table.ledger td.name { min-width: 220px; }
.fin-table.ledger td:nth-child(5) { font-size: .82rem; color: var(--text-2); }

.period-form label[hidden] { display: none; }
.period-form select[name=ky] { min-width: 210px; }

/* ---------- Cửa sổ nổi xem sổ chi tiết ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 24, 48, .55); backdrop-filter: blur(2px); animation: fadeIn .15s ease-out; }
.modal-panel { position: relative; width: 100%; max-width: 1120px; max-height: calc(100vh - 80px); overflow: auto; background: #fff; border-radius: var(--radius-lg);
               box-shadow: 0 30px 80px rgba(0, 0, 0, .35); padding: 28px; outline: none; animation: popIn .18s ease-out; }
.modal-close { position: sticky; top: 0; float: right; margin: -12px -12px 0 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
               background: #fff; color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; }
.modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }
.modal-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.modal-panel.modal-doc { max-width: 1000px; height: calc(100vh - 80px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.doc-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.doc-bar b { flex: 1; color: var(--navy); }
.doc-bar .modal-close { position: static; float: none; margin: 0; }
/* cửa sổ xem hóa đơn mở trên trang sổ rất dài (NDL): nền không làm mờ (blur cả trang nặng, máy yếu mở chậm) */
#doc-modal .modal-backdrop { backdrop-filter: none; background: rgba(8, 24, 48, .6); animation: none; }
#doc-modal { overscroll-behavior: contain; }
.doc-body { flex: 1; position: relative; display: flex; min-height: 0; }
.doc-frame { flex: 1; width: 100%; border: 0; background: #eef2f6; }
.doc-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted, #5d6b7c); font-weight: 600; background: #eef2f6; pointer-events: none; }
.doc-loading[hidden] { display: none; }
.doc-pdf { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.doc-pdf:hover { background: #f4f6f9; }
.doc-pdf[hidden] { display: none; }
.ledger-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal .ledger-detail .card-title { padding-right: 40px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .modal { padding: 8px; } .modal-panel { padding: 18px 14px; max-height: calc(100vh - 16px); } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-panel { animation: none; } }
@media (max-width: 600px) {
  .ledger-detail .card-title { flex-direction: column; align-items: stretch; padding-right: 36px; }
  .ledger-detail .card-title h2 { font-size: 1.05rem; }
  .ledger-name { font-size: 1rem; }
  .ledger-actions .btn { flex: 1; }
}

/* ---------- Tiền, kho, thuế GTGT ---------- */
.cash-total { text-align: right; display: grid; gap: 2px; }
.cash-total span { font-size: .8rem; color: var(--muted); }
.cash-total b { font-family: var(--head); font-size: 1.35rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.neg { color: #b42318; }
.fin-table tr.row-bad td { background: #fdeeef; }
.fin-table tr.row-bad td.name a { color: #b42318; }
.fin-table tr.row-check td { background: #fffaf0; }
.tag-check { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--warn); background: var(--warn-50); border: 1px solid var(--warn-line); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.fin-table.inv td.name { min-width: 220px; }
.fin-table.vat td:nth-child(5) { text-align: center; }
.vat-flow { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.vat-flow > div { flex: 1 1 180px; background: var(--tint); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; }
.vat-flow span { font-size: .82rem; color: var(--muted); }
.vat-flow b { font-family: var(--head); font-size: 1.2rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.vat-flow small { font-size: .78rem; color: var(--muted); }
.vat-flow i { align-self: center; font-style: normal; font-weight: 800; color: var(--muted); }
.vat-flow .hl { background: var(--navy); }
.vat-flow .hl span { color: #b9cbe0; }
.vat-flow .hl b { color: #fff; }
.vat-flow .hl.bad { background: #b42318; }
.vat-check { display: flex; gap: 8px; align-items: flex-start; color: var(--warn); font-size: .9rem; margin: 16px 0 0; }
.vat-check .icon { flex: none; margin-top: 2px; width: 18px; height: 18px; }

/* ---------- Hồ sơ hằng tháng ---------- */
.tab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-left: 4px; vertical-align: middle; }
.alert.reminder { align-items: center; }
.alert.reminder > div { flex: 1; }
.two-col.monthly { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.month-table td { vertical-align: top; }
.file-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.file-link .icon { width: 16px; height: 16px; color: var(--ok); }
.inline-form { margin: 0; }
.field select { width: 100%; font: inherit; font-size: .98rem; padding: 11px 12px; border: 1.5px solid #d3dce8; border-radius: 8px; background: #fff; color: var(--text); }
.field input[type=file] { width: 100%; font: inherit; padding: 10px; border: 1.5px dashed #b7c6d8; border-radius: 8px; background: var(--tint); }
.alert.small { font-size: .88rem; padding: 10px 12px; }

/* ---------- AI nhận xét ---------- */
.ai-card .card-title { flex-wrap: wrap; }
.ai-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ai-form label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.ai-form input { font: inherit; padding: 10px 12px; border: 1.5px solid #d3dce8; border-radius: 8px; }
.ai-form button[disabled] { opacity: .65; cursor: wait; }
.ai-result { border-top: 1px solid var(--line); padding-top: 16px; }
.ai-wait { display: flex; align-items: center; gap: 10px; color: var(--brand); font-weight: 500; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-text { background: var(--tint); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 10px 0 16px; max-height: 520px; overflow: auto; }
.ai-text p { margin: 0 0 .8em; }
code { background: var(--tint); padding: 1px 6px; border-radius: 4px; font-size: .88em; }

/* ======================================================================
   Khu vực số liệu doanh nghiệp: bố cục phần mềm (menu dọc + nội dung)
   ====================================================================== */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); background: #f4f6f9; min-height: calc(100vh - 78px); }
.app-side { background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 78px; height: calc(100vh - 78px); overflow-y: auto; display: flex; flex-direction: column; }
.side-back { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); text-decoration: none; padding: 4px 8px 12px; }
.side-back .icon { width: 16px; height: 16px; }
.side-back:hover { color: var(--brand); }
.co-block { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.co-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--head); font-weight: 700; flex: none; }
.co-name { font-weight: 600; font-size: .86rem; line-height: 1.35; color: var(--navy); }
.co-mst { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.side-nav { display: grid; gap: 2px; }
.side-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #8a97a8; padding: 14px 10px 4px; font-weight: 600; }
.side-link { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 500; position: relative; }
.side-link .icon { width: 18px; height: 18px; color: #7b8aa0; }
.side-link:hover { background: #f4f6f9; color: var(--navy); }
.side-link.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.side-link.on .icon { color: var(--brand); }
.side-link.on::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: auto; }
.side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff;
  font: 700 .72rem/20px var(--body); text-align: center; }
.new-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; vertical-align: middle; }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: .76rem; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--line); }
.side-foot b { color: var(--text-2); font-weight: 600; }
/* Menu trái: ảnh 3D (Fluent Emoji 3D của Microsoft, giấy phép MIT) trên ô màu riêng của từng mục (--c) */
.k-tq { --c: #2665a6; } .k-bctc { --c: #18794e; } .k-gtgt { --c: #d92d20; } .k-thu { --c: #e07a10; } .k-tra { --c: #7a45c4; }
.k-tien { --c: #0e8a8a; } .k-kho { --c: #9a6a2f; } .k-sct { --c: #4a5d75; } .k-hs { --c: #c99400; } .k-hd { --c: #1d5fbf; } .k-tk { --c: #5b6b80; }
.app-side .co-block { background: linear-gradient(135deg, var(--brand-50), #fff 70%); border: 1px solid var(--brand-100); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; gap: 9px; }
.app-side .co-avatar { width: 34px; height: 34px; }
.app-side .co-name { font-weight: 700; font-size: .8rem; line-height: 1.3; }
.app-side .co-mst { font-size: .72rem; margin-top: 1px; }
.app-side .side-nav { gap: 1px; }
.app-side .side-group { color: var(--brand); font-weight: 800; font-size: .68rem; padding: 10px 10px 3px; }
.app-side .side-link { padding: 4px 8px; gap: 11px; color: var(--navy); font-weight: 600; font-size: .9rem; }
.app-side .side-back { padding-bottom: 8px; }
.side-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: color-mix(in srgb, var(--c) 16%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); transition: background .15s; }
.side-ic img { width: 25px; height: 25px; filter: saturate(1.35) contrast(1.12) drop-shadow(0 2px 2px rgba(10, 42, 82, .3)); transition: transform .15s; }
.app-side .side-link:hover { background: #eef3f9; }
.app-side .side-link:hover .side-ic img { transform: scale(1.12); }
.app-side .side-link.on { background: linear-gradient(90deg, var(--brand), var(--navy)); color: #fff; box-shadow: 0 6px 14px rgba(10, 42, 82, .35); }
.app-side .side-link.on .side-ic { background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.app-side .side-link.on::before { display: none; }
/* Đăng nhập bằng MST / quên mật khẩu (OTP) */
.auth-forgot { margin: -6px 0 14px; text-align: right; font-size: .88rem; }
/* Duyệt đăng ký: nhân viên chờ admin duyệt */
.su-staff { margin-bottom: 20px; border-left: 4px solid #7a45c4; }
.su-staff-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #edf1f6; }
.su-staff-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.su-staff-info b { color: var(--navy); }
.su-staff-info small { color: var(--muted); font-size: .8rem; }
.su-staff-act { display: flex; gap: 8px; margin: 0; }
/* Đăng ký: chọn Doanh nghiệp / Nhân viên */
.reg-type { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 20px; }
.reg-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--text); background: #fff; transition: border-color .15s, background .15s; }
.reg-opt .icon { flex: none; width: 26px; height: 26px; color: #7b8aa0; margin-top: 2px; }
.reg-opt span { display: grid; gap: 2px; }
.reg-opt b { color: var(--navy); font-size: 1rem; }
.reg-opt small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.reg-opt:hover { border-color: var(--brand-100); background: #f8fbfe; }
.reg-opt.on { border-color: var(--brand); background: var(--brand-50); }
.reg-opt.on .icon { color: var(--brand); }
.login-type { margin: 4px 0 18px; }
/* ô chọn loại tài khoản: ảnh 3D + tên, không chú thích */
.reg-type { gap: 10px; }
.reg-type .reg-opt { align-items: center; gap: 10px; padding: 7px 12px; border-width: 1.5px; border-radius: 10px; }
.reg-opt > b { font-size: .92rem; }
.reg-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #eef3f9; transition: background .15s; }
.reg-ic img { width: 24px; height: 24px; filter: saturate(1.3) drop-shadow(0 1px 2px rgba(10, 42, 82, .25)); }
/* ô đang chọn: nền xanh đậm, chữ trắng, ảnh nằm trên ô trắng – nổi bật hẳn so với ô còn lại */
.reg-type .reg-opt.on { background: linear-gradient(90deg, var(--brand), var(--navy)); border-color: var(--navy); box-shadow: 0 6px 16px rgba(10, 42, 82, .3); }
.reg-type .reg-opt.on b { color: #fff; }
.reg-opt.on .reg-ic { background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.reg-type .reg-opt:not(.on) b { color: var(--text-2); }
.reg-done { text-align: center; padding: 18px 10px; }
.reg-done h2 { margin: 8px 0; }
.reg-done p { color: var(--text-2); margin: 0 0 16px; }
@media (max-width: 640px) { .reg-type { grid-template-columns: 1fr; } }
/* điều kiện mật khẩu mới: gõ tới đâu đánh dấu tới đó */
.pw-rules { list-style: none; margin: -6px 0 14px; padding: 10px 12px; display: grid; gap: 4px; border-radius: 8px; background: #f6f9fc;
  border: 1px solid #e3eaf3; font-size: .82rem; color: #5f6c7f; grid-column: 1 / -1; }
.pw-rules li { display: flex; align-items: center; gap: 8px; }
.pw-rules li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #b8c4d3; box-sizing: border-box; }
.pw-rules li.ok { color: #18794e; }
.pw-rules li.ok::before { content: "✓"; border: 0; background: #18a058; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.pw-rules li.bad { color: #b42318; }
.pw-rules li.bad::before { content: "✕"; border: 0; background: #e5484d; color: #fff; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
/* ô OTP + nút "Gửi mã" (đếm ngược) */
.otp-row { display: flex; gap: 8px; align-items: stretch; }
.otp-row input { flex: 1; min-width: 0; letter-spacing: .3em; font-weight: 700; font-size: 1.05rem; }
.otp-row input::placeholder { letter-spacing: normal; font-weight: 400; }
.otp-send { flex: none; min-width: 128px; white-space: nowrap; }
.otp-send:disabled { opacity: .7; cursor: default; }
.otp-field small { display: block; margin-top: 4px; font-size: .78rem; }
.otp-field small.otp-ok { color: #18794e; }
.otp-field small.otp-err { color: #b42318; }
.auth-otp-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.auth-otp-actions form { margin: 0; }
.auth-back { margin-top: 18px; }
/* Tổng quan: phần số liệu từ hóa đơn + tờ khai */
.ov-kpis { margin-bottom: 18px; }
.kpi.ov-pay { border-top-color: var(--gold); }
.kpi.ov-next { border-top-color: #7a45c4; }
.kpi.ov-next.soon { border-top-color: var(--red); }
.kpi.ov-next.soon .value { color: var(--red); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.ov-main { display: grid; gap: 18px; min-width: 0; }
.ov-main > .card, .ov-grid > .card { margin: 0; }
.ov-note { margin: 6px 0 0; }
.ov-returns { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ov-returns td { padding: 9px 6px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.ov-returns tr:last-child td { border-bottom: 0; }
.ov-returns td b { display: block; color: var(--navy); font-weight: 600; }
.ov-returns td small { display: block; color: var(--muted); font-size: .76rem; }
.ov-returns td.d { white-space: nowrap; color: var(--text-2); }
.ov-returns td.d small.late { color: #b76e00; font-weight: 600; }
.ov-returns td.s { text-align: right; }
.ov-todo { display: grid; gap: 8px; }
.ov-todo .card-title { margin-bottom: 4px; }
.ov-task { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid #7a45c4;
  border-radius: 10px; text-decoration: none; color: var(--text); background: #fff; transition: background .15s; }
.ov-task:hover { background: #f6f9fc; }
.ov-task .ov-dot { display: none; }
.ov-task-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ov-task-main b { font-size: .88rem; color: var(--navy); font-weight: 600; line-height: 1.35; }
.ov-task-main small { font-size: .76rem; color: var(--muted); }
.ov-days { flex: none; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f1e9fd; color: #6b3fb5; white-space: nowrap; }
.ov-task.missing { border-left-color: var(--red); background: #fffafa; }
.ov-task.missing .ov-days { background: var(--red-50); color: #b42318; }
.ov-task.docs { border-left-color: var(--gold); }
.ov-task.docs .ov-days { background: #fff4dc; color: #8a5a00; }
.ov-task.sync { border-left-color: var(--brand); }
.ov-task.sync .ov-days { background: var(--brand-50); color: var(--brand); }
/* Công việc kế toán: việc sắp đến hạn (2 cột) */
.sc-todo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.sc-todo-none { margin: 0 0 22px; }
/* Việc sắp đến hạn gộp theo kỳ: đầu thẻ = kỳ + hạn + nhãn ngày; mỗi tờ khai một dòng bấm được */
.ov-task.due-group { flex-direction: column; align-items: stretch; gap: 6px; }
.ov-task.due-group:hover { background: #fff; }
.ov-task.due-group.missing:hover { background: #fffafa; }
.due-head { display: flex; align-items: center; gap: 10px; }
.due-head .ov-task-main b { font-size: .95rem; font-weight: 700; }
.due-items { display: grid; gap: 4px; }
.due-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: #f5f2fb;
  color: var(--navy); font-size: .86rem; font-weight: 600; text-decoration: none; }
.due-item:hover { background: #ebe4f7; color: var(--brand); }
.due-item span { flex: 1; min-width: 0; }
.due-item em { font-style: normal; font-size: .75rem; color: var(--muted); font-weight: 500; }
.due-item i { font-style: normal; color: #7a45c4; font-weight: 700; }
.due-group.missing .due-item { background: #fff0f0; }
.due-group.missing .due-item:hover { background: #ffe2e2; }
.due-item.missing em { color: #b42318; font-weight: 700; }
/* Thanh bên: đổi nhanh công ty (kế toán nhiều công ty) */
.co-switch { position: relative; margin-bottom: 6px; }
.co-switch > summary { list-style: none; cursor: pointer; }
.co-switch > summary::-webkit-details-marker { display: none; }
.app-side .co-switch > summary.co-block { margin-bottom: 0; padding-right: 28px; position: relative; }
.co-switch > summary .icon { position: absolute; right: 8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--muted); transition: transform .15s; }
.co-switch[open] > summary .icon { transform: rotate(180deg); }
.co-switch > summary:hover { border-color: var(--brand); }
.co-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 35, 70, .16); padding: 6px; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.co-menu-h { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 4px; }
.co-menu a { display: grid; gap: 1px; padding: 7px 9px; border-radius: 8px; text-decoration: none; color: var(--navy); font-size: .8rem; font-weight: 600; line-height: 1.3; }
.co-menu a small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.co-menu a:hover { background: #f3f7fc; }
.co-menu a.on { background: var(--brand-50); color: var(--brand); }
.ov-section { font-size: 1.05rem; margin: 26px 0 14px; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--navy); }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: 1fr; } }
/* Khu kế toán – Việc hôm nay (bảng việc theo công ty) */
.wb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.wb-kpi { display: grid; gap: 2px; text-align: left; padding: 14px 18px; border: 1px solid var(--line); border-top: 4px solid #c3cfdd; border-radius: 12px;
  background: #fff; color: var(--text); text-decoration: none; font: inherit; box-shadow: var(--shadow-sm); }
button.wb-kpi, a.wb-kpi { cursor: pointer; transition: transform .15s, box-shadow .15s; }
button.wb-kpi:hover:not(:disabled), a.wb-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wb-kpi span { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wb-kpi b { font-family: var(--head); font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.wb-kpi small { font-size: .8rem; color: var(--muted); }
.wb-kpi.ok { border-top-color: #18a058; } .wb-kpi.warn { border-top-color: var(--gold); } .wb-kpi.bad { border-top-color: var(--red); }
.wb-kpi.bad b { color: var(--red); }
.wb-alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px; background: #fff4dc;
  border: 1px solid #f0d49a; color: #7a5200; text-decoration: none; }
.wb-alert .icon { width: 20px; height: 20px; flex: none; }
.wb-alert span { flex: 1; min-width: 0; }
.wb-alert em { font-style: normal; font-weight: 700; white-space: nowrap; }
.wb-sync { margin-bottom: 16px; }
.wb-sync-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wb-sync-head h2 { font-size: 1.05rem; margin: 0 0 2px; }
.wb-sync-head p { margin: 0; }
.wb-sync-body { margin-top: 14px; display: grid; gap: 12px; }
.wb-sync-body[hidden] { display: none; }
.wb-sync-body .sync-row { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.wb-sync-body .sync-row h3 { font-size: .98rem; margin: 0 0 2px; }
.wb-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.wb-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #4a5d75; background: #eef3f9; padding: 9px 10px; text-align: left; white-space: nowrap; }
.wb-table td { padding: 10px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.wb-table tbody tr:hover td { background: #f8fafd; }
.wb-co { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); min-width: 220px; }
.wb-co > span, .wb-co > img { flex: none; width: 36px; height: 36px; border-radius: 10px; }
.wb-co > span { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; font: 700 .76rem var(--head); }
.wb-co > img { object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; box-sizing: border-box; }
.wb-co div { display: grid; min-width: 0; }
.wb-co b { font-weight: 700; font-size: .88rem; }
.wb-co small { font-size: .74rem; color: var(--muted); }
.wb-co:hover b { color: var(--brand); text-decoration: underline; }
.wb-chip-link { display: grid; justify-items: start; gap: 3px; text-decoration: none; }
.wb-chip-link small { font-size: .74rem; color: var(--muted); }
.wb-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 .78rem var(--body); white-space: nowrap; border: 0; }
.wb-chip.ok { background: #e7f6ec; color: #18794e; }
.wb-chip.warn { background: #fff4dc; color: #8a5a00; }
.wb-chip.bad { background: var(--red-50); color: #b42318; }
.wb-chip.mute { background: #f1f4f8; color: #8a99ad; }
.wb-chip.info { background: #e8f1fc; color: #1d5fae; }  /* kỳ đang trong hạn nộp (chưa gấp) */
button.wb-chip { cursor: pointer; }
button.wb-chip:hover { filter: brightness(.96); }
.wb-new { color: var(--red) !important; font-weight: 700; }
.wb-under { display: block; margin-top: 3px; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.sync-covered { margin: 2px 0 0; font-size: .9rem; color: var(--text-2); }
.sync-covered b { color: var(--navy); font-size: 1rem; }
/* khung đồng bộ gọn: mỗi công ty một dòng, nhãn cột ghi một lần ở trên */
.wb-sync-cols { display: grid; grid-template-columns: 230px 366px 1fr; gap: 12px; padding: 0 17px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wb-sync-cols small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.wb-srow { display: grid; grid-template-columns: 230px 1fr; gap: 12px; align-items: center; padding: 10px 16px !important; }
.wb-srow.is-today { background: #f3fbf6 !important; border-color: #bfe5cc !important; }
.wb-sco { display: grid; gap: 2px; min-width: 0; }
.wb-sco a { font-weight: 700; color: var(--navy); text-decoration: none; font-size: .9rem; line-height: 1.3; }
.wb-sco a:hover { color: var(--brand); text-decoration: underline; }
.wb-scov { font-size: .78rem; color: var(--muted); }
.wb-scov b { color: var(--navy); }
.wb-srow.is-today .wb-scov { color: #18794e; }
.wb-hist-btn { justify-self: start; font-size: .76rem; padding: 0; }
.wb-srow .sync-form { flex-wrap: nowrap; gap: 10px; align-items: center; }
.wb-srow .sync-field > span:not(.date-box), .wb-srow .sync-field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wb-srow .sync-cap { flex-direction: row; align-items: center; gap: 6px; }
.wb-srow .sync-cap img, .wb-srow .sync-cap-wait { width: 190px; height: 50px; }
.wb-srow .sync-cap .link-btn { font-size: .74rem; white-space: nowrap; writing-mode: horizontal-tb; }
.wb-srow .sync-field input { height: 40px; }
.wb-srow .sync-field input[name=cvalue] { width: 120px; }
.wb-srow .sync-field input[data-date] { width: 140px; }
.wb-srow .sync-form .btn { height: 40px; }
.wb-srow .sync-status { margin: 6px 0 0; }
.wb-srow .sync-cap .link-btn { width: 70px; text-align: left; }
.wb-srow .sync-problem { margin: 0; }
.wb-srow .sync-hist { grid-column: 1 / -1; margin: 0; }
.sync-hist { margin: -4px 0 10px; font-size: .82rem; }
.sync-hist table { margin-top: 6px; border-collapse: collapse; width: 100%; max-width: 760px; }
.sync-hist th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 10px 4px 0; }
.sync-hist td { padding: 4px 10px 4px 0; border-top: 1px solid #edf1f6; white-space: nowrap; }
.wb-sub { font-size: .82rem; color: var(--text-2); }
@media (max-width: 1100px) { .wb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phản ánh tới quản lý (khách ↔ admin) */
.fb-wrap { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.fb-info { margin: 0; }
.fb-info h2 { font-size: 1.05rem; margin: 0 0 10px; }
.fb-info ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.fb-info li { display: flex; gap: 10px; font-size: .88rem; line-height: 1.5; color: var(--text-2); }
.fb-info li .icon { flex: none; width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.fb-wrap .chat-inline { height: min(640px, calc(100vh - 210px)); min-height: 420px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.fb-wrap .chat-inline .chat-panel { display: flex; flex-direction: column; }
.fb-wrap .chat-inline .chat-head { display: flex; }
.fb-wrap .chat-inline .chat-body { flex: 1; overflow-y: auto; background: #f6f9fc; padding: 16px 20px 8px; }
.fb-wrap .chat-inline .chat-compose { padding: 10px 16px; border-top: 1px solid var(--line); }
.inbox-tabs { display: flex; gap: 4px; margin: 4px 0 10px; }
.inbox-tabs a { flex: 1; text-align: center; padding: 7px 8px; border-radius: 8px; font-size: .8rem; font-weight: 700; text-decoration: none;
  color: var(--muted); background: #f1f4f8; }
.inbox-tabs a.on { background: var(--brand); color: #fff; }
.inbox-tabs a span { display: inline-block; min-width: 18px; margin-left: 3px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; line-height: 17px; }
.inbox-av.inbox-av-ql { background: linear-gradient(135deg, #e01020, #8c0a14); }
.inbox-av.inbox-av-nv { background: linear-gradient(135deg, #9b6ad8, #5a2d9c); }
.chat-readonly .chat-compose { display: none; }
.chat-ro-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); background: #f8fafc; }
.chat-ro-note .icon { width: 16px; height: 16px; }
@media (max-width: 900px) { .fb-wrap { grid-template-columns: 1fr; } }
/* Phân công công ty (admin) – bản dựng lại: ô tổng, cột nhân viên, bảng công ty có lọc, lịch sử dạng dòng thời gian */
.as-kpis { margin-bottom: 18px; }
.as-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.as-col { display: grid; gap: 14px; min-width: 0; }
.as-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 800; margin: 0; }
.as-staff { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; }
.as-staff.locked { opacity: .7; background: #fafbfc; }
.as-staff header { display: flex; align-items: center; gap: 12px; }
.as-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--navy));
  color: #fff; font: 700 1.1rem var(--head); }
.as-who { flex: 1; min-width: 0; display: grid; }
.as-who b { color: var(--navy); font-size: 1rem; }
.as-who small { color: var(--muted); font-size: .8rem; }
.as-count { flex: none; display: grid; justify-items: center; padding: 6px 12px; border: 1px solid var(--brand-100); border-radius: 10px; background: var(--brand-50); cursor: pointer; font: inherit; }
.as-count b { font: 800 1.3rem/1.1 var(--head); color: var(--brand); }
.as-count small { font-size: .7rem; color: var(--muted); }
.as-count:hover { border-color: var(--brand); }
.as-load { height: 6px; border-radius: 99px; background: #eef3f9; overflow: hidden; }
.as-load i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f7fd1, var(--navy)); }
.as-meta { margin: 0; display: grid; gap: 4px; }
.as-meta div { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; }
.as-meta dt { color: var(--muted); }
.as-meta dd { margin: 0; color: var(--text-2); font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-cos { display: flex; flex-wrap: wrap; gap: 6px; }
.as-cos span { padding: 3px 9px; border-radius: 999px; background: #f1f4f8; color: var(--navy); font-size: .74rem; font-weight: 600; }
.as-staff footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.as-staff footer form { margin: 0; }
.as-lock { color: #b42318; font-weight: 600; font-size: .82rem; }
.as-empty { text-align: center; padding: 22px; }
.as-cos-card { margin: 0; }
.as-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.as-tools input { width: min(320px, 100%); height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; }
.as-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.as-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font: 600 .82rem var(--body); color: var(--text-2); cursor: pointer; }
.as-filters button span { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #eef3f9; font-size: .72rem; line-height: 18px; text-align: center; }
.as-filters button.warn span { background: var(--red-50); color: #b42318; }
.as-filters button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.as-filters button.on span { background: rgba(255, 255, 255, .2); color: #fff; }
select.as-sel-none { border-color: #f5b5b0; background: #fff8f7; color: #b42318; }
.as-empty-filter { padding: 14px 0 0; text-align: center; }
.as-hist { margin: 0; }
.as-hist .as-h { margin-bottom: 12px; }
.as-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.as-timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #edf1f6; position: relative; }
.as-timeline li:first-child { border-top: 0; }
.as-timeline li[hidden] { display: none; }
.as-timeline time { font-weight: 700; color: var(--navy); font-size: .88rem; display: grid; }
.as-timeline time small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.as-timeline li > div { display: grid; gap: 2px; font-size: .86rem; }
.as-timeline b { color: var(--navy); }
.as-move em { font-style: normal; color: var(--brand); font-weight: 800; margin: 0 4px; }
.as-move i { color: var(--muted); }
.as-move strong { color: #18794e; }
@media (max-width: 1100px) { .as-layout { grid-template-columns: 1fr; } }
/* (bản cũ) */
.as-table td.c, .as-table th.c { width: 36px; text-align: center; }
.as-one { display: flex; align-items: center; gap: 8px; margin: 0; }
.as-one select, .as-bulkbar select { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .86rem; background: #fff; max-width: 280px; }
.as-table tr.as-none td { background: #fff8f7; }
.as-locked td { color: #8a99ad; }
.as-bulkbar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--navy); color: #fff; box-shadow: 0 8px 22px rgba(10, 42, 82, .3); width: max-content; }
.as-bulkbar[hidden] { display: none; }
.card.as-sec { margin-bottom: 16px; }
/* Quản trị hệ thống – bản dựng lại: 4 ô tổng, nhóm dữ liệu dạng danh sách, cột phải Cần xử lý + lịch sử */
.adm-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 18px; align-items: start; }
.adm-col { display: grid; gap: 14px; min-width: 0; }
.adm-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.adm-ghead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: #f6f9fc; border-bottom: 1px solid var(--line); }
.adm-ghead small { font-size: .8rem; }
.adm-rows { list-style: none; margin: 0; padding: 0; }
.adm-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px auto; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid #edf1f6; }
.adm-row:first-child { border-top: 0; }
.adm-row:hover { background: #fafcfe; }
.adm-ic.side-ic { --c: #2665a6; width: 44px; height: 44px; border-radius: 12px; }
.adm-ic.side-ic img { width: 32px; height: 32px; }
.adm-ic.side-ic.sm { width: 36px; height: 36px; border-radius: 10px; }
.adm-ic.side-ic.sm img { width: 26px; height: 26px; }
.adm-main { min-width: 0; display: grid; gap: 2px; }
.adm-title { color: var(--navy); font-weight: 700; font-size: .96rem; text-decoration: none; width: max-content; max-width: 100%; }
.adm-title:hover { color: var(--brand); text-decoration: underline; }
.adm-main p { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.adm-stat { display: grid; justify-items: end; gap: 2px; text-align: right; }
.adm-stat b { font: 800 1.25rem/1.1 var(--head); color: var(--navy); }
.adm-stat small { font-size: .74rem; color: var(--muted); }
.adm-stat .wb-chip { text-decoration: none; font-size: .72rem; padding: 2px 8px; }
.adm-act { display: flex; align-items: center; gap: 6px; }
.adm-add { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--brand-100); background: var(--brand-50);
  color: var(--brand); font: 700 1.1rem/1 var(--body); text-decoration: none; }
.adm-add:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.card.adm-todo { margin: 0; display: grid; gap: 8px; }
.adm-todo .as-h { margin-bottom: 4px; }
.adm-todo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); }
.adm-todo-row:hover { border-color: var(--brand); background: #f8fafd; }
.adm-todo-row > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.adm-todo-row b { color: var(--navy); font-size: .9rem; }
.adm-todo-row small { color: var(--muted); font-size: .78rem; }
.adm-todo-row em { font-style: normal; min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font: 700 .76rem/22px var(--body); text-align: center; }
.adm-todo-row.hot { border-color: #f3c8c4; background: #fff8f7; }
.adm-log a { text-decoration: none; }
.adm-log a:hover b { color: var(--brand); text-decoration: underline; }
.adm-foot { margin: 0; }
/* Duyệt đăng ký – bản dựng lại: hồ sơ dạng thẻ (thông tin bên trái, các bước duyệt bên phải), lọc theo nhóm, lịch sử */
.su-filters { margin-bottom: 14px; }
.su-list { display: grid; gap: 14px; margin-bottom: 18px; }
.su-list > [hidden] { display: none; }
.su-clear { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; border-left: 4px solid #18a058; }
.su-clear b { color: var(--navy); }
.su-clear p { margin: 2px 0 0; }
.su-clear-ic.side-ic { --c: #18a058; width: 48px; height: 48px; border-radius: 12px; }
.su-clear-ic.side-ic img { width: 34px; height: 34px; }
.su-app { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.su-app.staff { border-left-color: #7a45c4; }
.su-app-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #edf1f6; }
.su-app.staff .as-av { background: linear-gradient(135deg, #9b6ad8, #5a2d9c); }
.su-type-co { background: #fff4dc; color: #8a5a00; }
.su-type-st { background: #f1e9fb; color: #5a2d9c; }
.su-when { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.su-app-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.su-facts { padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.su-facts .as-meta { margin-bottom: 4px; }
.su-facts .as-meta code { font-size: .82rem; }
.su-panel { margin: 0; padding: 16px 18px; background: #f6f9fc; border-left: 1px solid #edf1f6; display: grid; gap: 14px; align-content: start; }
.su-steps2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.su-steps2 > li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.su-steps2 > li > div { display: grid; gap: 6px; min-width: 0; }
.su-steps2 > li > div > b { color: var(--navy); font-size: .9rem; }
.su-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font: 700 .78rem var(--head); }
.su-panel select, .su-panel .su-new input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; background: #fff; }
.su-panel .su-new { margin-top: 0; }
.su-panel .su-hint { margin: 0; font-size: .82rem; }
.su-panel .su-check { font-size: .88rem; }
.su-panel .su-actions { padding-top: 12px; border-top: 1px dashed var(--line); gap: 16px; }
.su-perm { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .86rem; color: var(--text-2); }
.su-perm li { position: relative; padding-left: 22px; }
.su-perm li::before { content: '✓'; position: absolute; left: 0; color: #18a058; font-weight: 800; }
.card.su-reqs { margin: 0; }
.su-reqs .as-h { margin-bottom: 12px; }
.su-hist { margin: 0; }
.su-hrow { display: grid; gap: 3px; }
.su-hrow > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.su-kind { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
/* Đầu trang kế toán: 2 biểu tượng (Duyệt đăng ký, Tin nhắn) có số đỏ thay cho thanh chữ */
.nav-ico { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--navy);
  border: 1px solid var(--line); background: #fff; text-decoration: none; transition: background .15s, color .15s; }
.nav-ico .icon { width: 20px; height: 20px; }
.nav-ico + .nav-ico { margin-left: 8px; }
.nav-ico:hover, .nav-ico.active { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.nav-ico .nav-badge { position: absolute; top: -5px; right: -6px; margin: 0; }
.nav-ico .nav-badge[hidden] { display: none; }
button.side-link { width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
/* Khu kế toán: danh sách công ty ở menu trái */
.side-co { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--navy); }
.side-co > span, .side-co > img { flex: none; width: 34px; height: 34px; border-radius: 9px; }
.side-co > span { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; font: 700 .74rem var(--head); }
.side-co > img { object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; box-sizing: border-box; }
.side-co div { min-width: 0; display: grid; }
.side-co b { font-size: .8rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-co small { font-size: .7rem; color: var(--muted); }
.side-co:hover { background: #eef3f9; }
.side-co.on { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.side-none { padding: 4px 10px; }
.app-main .sc-page { padding-top: 0; }
.staff-page .app-tools .btn .icon { width: 16px; height: 16px; }

.app-main { padding: 24px 32px 48px; min-width: 0; }
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.app-title { font-family: var(--body); font-size: 1.45rem; font-weight: 700; color: var(--navy); margin: 0; letter-spacing: -.01em; }
.app-sub { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.app-sub b { color: var(--warn); font-weight: 500; }
.app-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period-bar { display: flex; gap: 8px; align-items: center; margin: 0; }
.period-bar select, .period-bar input { font: inherit; font-size: .86rem; height: 36px; padding: 0 10px; border: 1px solid #d3dce8; border-radius: 8px; background: #fff; color: var(--text); }
.period-bar select:focus, .period-bar input:focus { outline: none; border-color: var(--brand); }
.period-bar [hidden] { display: none; }
.app-tools .btn-sm { height: 36px; padding: 0 12px; font-family: var(--body); font-weight: 500; font-size: .86rem; box-shadow: none; }
.app-tools .btn-sm .icon { width: 16px; height: 16px; }
.app-tools .btn:hover { transform: none; }

/* Giọng giao diện gọn hơn trong khu vực số liệu */
.app .dash { gap: 18px; }
.app .card { border-radius: 12px; padding: 20px 22px; box-shadow: none; border-color: #e3e8ef; }
.app .card-title { margin-bottom: 14px; }
.app .card-title h2, .app h2 { font-family: var(--body); font-weight: 600; font-size: 1.02rem; color: var(--navy); }
.app h3 { font-family: var(--body); font-weight: 600; }
.app .alert { padding: 12px 14px; font-size: .9rem; border-radius: 10px; }
.app .kpi-grid { gap: 14px; }
.app .kpi { border-top: 0; border-radius: 12px; padding: 16px 18px; box-shadow: none; border: 1px solid #e3e8ef; gap: 2px; }
.app .kpi .label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.app .kpi .value { font-family: var(--body); font-weight: 700; font-size: 1.5rem; color: var(--navy); letter-spacing: -.01em; }
.app .kpi.is-neg .value { color: #b42318; }
.app .kpi .sub { font-size: .76rem; }
.app .kpi-link:hover { transform: none; border-color: var(--brand-100); }
.app .fin-table th { font-family: var(--body); }
.app .fin-table tfoot td, .app .fin-table tr.total td, .app .fin-table.fs tr.lv0 td, .app .fin-table.fs tr.sect td { font-family: var(--body); }
.app .tag-check, .app .chip { font-family: var(--body); }
.app .ledger-summary b, .app .cash-total b, .app .vat-flow b { font-family: var(--body); font-weight: 700; }
.app .fs-card { padding: 28px 32px; }
.app .btn { font-family: var(--body); }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .app-side { position: static; height: auto; }
  .app-main { padding: 18px 16px 40px; }
}
@media print { .app { display: block; background: #fff; } .app-side, .app-tools { display: none !important; } .app-main { padding: 0; } }
.co-avatar .icon { width: 20px; height: 20px; }
.tiny { font-size: .74rem; }
.nowrap { white-space: nowrap; }
.month-table .file-link { font-size: .86rem; }
.upload-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; align-items: start; }
@media (max-width: 1100px) { .upload-grid { grid-template-columns: 1fr 1fr; } }

/* Nút tài khoản (hiện MST) + nút đăng xuất dạng biểu tượng */
.acct { display: inline-flex; align-items: stretch; margin-left: 8px; border: 1px solid var(--brand); border-radius: 8px; overflow: hidden; }
.acct form { display: flex; }
.acct-btn { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; height: 38px; background: var(--brand); color: #fff; text-decoration: none;
            font-family: var(--body); font-weight: 600; font-size: .9rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.acct-btn:hover { background: var(--brand-600); color: #fff; }
.acct-btn .icon { width: 17px; height: 17px; }
.acct-out { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-left: 1px solid rgba(255, 255, 255, .25); background: var(--brand); color: #fff; cursor: pointer; }
.acct-out:hover { background: var(--red); }
.acct-out .icon { width: 17px; height: 17px; }
@media (max-width: 1020px) { .acct { margin: 8px 0 0; } .acct-btn { flex: 1; justify-content: center; } }
.app .messages { margin: 0; }
.upload-card .field { margin-bottom: 12px; }
.upload-card .form-foot p { font-size: .84rem; max-width: 760px; }

/* Khu vực số liệu: thanh trên trải toàn màn hình, logo thẳng hàng với menu dọc */
.app-page .site-header .container { max-width: none; padding: 0 28px 0 22px; min-height: 64px; }
.app-page .site-header { box-shadow: none; border-bottom: 1px solid var(--line); }
.app-page .brand img { height: 40px; }
.app-page .brand-name { font-size: 1.05rem; }
.app-page .brand-tag { font-size: .6rem; }
.app-page .nav .link { font-size: .82rem; padding: 8px 12px; }
.app-page .acct-btn, .app-page .acct-out { height: 36px; }
.app-page .acct-out { width: 36px; }
.app-page .app { min-height: calc(100vh - 65px); }
.app-page .app-side { top: 65px; height: calc(100vh - 65px); padding-top: 10px; padding-bottom: 10px; }
.app-page .co-block { padding-left: 10px; }
/* màn hình thấp: thu nhỏ icon + khoảng cách menu trái để thấy hết (menu nhân viên ~16 mục), không phải cuộn */
@media (min-width: 961px) and (max-height: 1040px) {
  .app-page .app-side { padding-top: 6px; padding-bottom: 6px; }
  .app-page .app-side .side-back { padding-top: 0; padding-bottom: 4px; }
  .app-page .app-side .co-block { padding-top: 5px; padding-bottom: 5px; }
  .app-page .app-side .side-group { padding: 6px 10px 1px; }
  .app-page .app-side .side-link { padding-top: 2px; padding-bottom: 2px; }
  .app-page .app-side .side-ic { width: 28px; height: 28px; border-radius: 8px; }
  .app-page .app-side .side-ic img { width: 22px; height: 22px; }
  .app-page .app-side .side-foot { padding-top: 6px; line-height: 1.4; }
}
@media (min-width: 961px) and (max-height: 840px) {
  .app-page .app-side .side-group { padding: 3px 10px 0; }
  .app-page .app-side .side-link { padding-top: 1px; padding-bottom: 1px; font-size: .84rem; }
  .app-page .app-side .side-ic { width: 24px; height: 24px; border-radius: 7px; }
  .app-page .app-side .side-ic img { width: 19px; height: 19px; }
}

/* ======================================================================
   Toàn bộ web trải hết màn hình: một lề chung cho header, nội dung, footer
   ====================================================================== */
:root { --gutter: clamp(16px, 3vw, 56px); }
.container, .app-page .site-header .container { max-width: none; padding-left: var(--gutter); padding-right: var(--gutter); }
.app-page .site-header .container { padding-left: 22px; padding-right: 28px; }
/* Chữ dài giữ độ rộng dễ đọc */
.hero-content { max-width: 720px; }
.about-grid { gap: clamp(40px, 5vw, 96px); }
.about-text, .about-list { max-width: 680px; }
.page-head .sub { max-width: 820px; }
.cta-band-inner { gap: clamp(40px, 6vw, 120px); }
@media (min-width: 1600px) {
  .services-grid { gap: 28px; }
  .news-cards { gap: 32px; }
}
.section-head { max-width: 960px; }

/* Trang đọc bài: 3 cột trên màn hình rộng (chuyên mục | bài viết | tư vấn) */
.article-layout { display: grid; gap: 28px; align-items: start;
                  grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main left" "main right"; }
.article-layout .article-main { grid-area: main; }
.article-layout .side-left { grid-area: left; }
.article-layout .side-right { grid-area: right; }
.article-layout > aside { display: grid; gap: 20px; min-width: 0; }
@media (min-width: 1440px) {
  .article-layout { grid-template-columns: 280px minmax(0, 1fr) 300px; grid-template-areas: "left main right"; }
  .article-layout > aside { position: sticky; top: 96px; }
}
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; grid-template-areas: "main" "right" "left"; } }
.article-page > .container.article-layout > .stack { background: #fff; border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 48px); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.article-main > * { width: 100%; max-width: 960px; margin-left: auto; margin-right: auto; }
.side-cta h3 { font-size: 1.05rem; }

/* Danh sách kiến thức: 2 cột trên màn hình rộng để không bị dàn mỏng */
@media (min-width: 1500px) {
  .article-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .article-rows .article-row { margin: 0; }
}

/* Tài khoản khách doanh nghiệp (trong cổng công ty) */
.acct-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.6fr); align-items: center; gap: 18px 28px; }
.acct-avatar { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; display: grid; place-items: center; }
.acct-avatar .icon { width: 30px; height: 30px; }
.acct-name { font-family: var(--head); font-weight: 800; font-size: 1.15rem; color: var(--navy); line-height: 1.35; }
.acct-meta { margin-top: 6px; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-left: 1px solid var(--line); }
.acct-facts div { padding: 4px 20px; border-right: 1px solid var(--line); min-width: 0; }
.acct-facts div:last-child { border-right: 0; }
.acct-facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.acct-facts dd { margin: 4px 0 0; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.acct-support { display: grid; gap: 14px; }
.acct-support .card-title { margin-bottom: 0; }
.acct-support p { margin: 0; }
.acct-svc { display: grid; gap: 12px; }
.list-table + .acct-svc, .table-scroll + .acct-svc { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.acct-svc .mini-title { margin: 0; }
.acct-svc-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.acct-svc-foot .field { margin-bottom: 0; }
.acct-svc-foot textarea { min-height: 46px; height: 46px; }
@media (max-width: 1280px) {
  .acct-hero { grid-template-columns: auto minmax(0, 1fr); }
  .acct-facts { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .acct-facts div:first-child { padding-left: 0; }
}
.pw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
/* 5 ô: người liên hệ · tên đăng nhập · email nhận OTP · điện thoại · ngày tạo – email không xuống dòng giữa chữ */
.acct-facts { grid-template-columns: minmax(0, 1.1fr) minmax(0, .85fr) minmax(0, 1.6fr) minmax(0, .85fr) minmax(0, .85fr); }
.acct-facts dd { overflow-wrap: normal; word-break: normal; }
.acct-facts dd.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-facts dt { white-space: nowrap; }
.acct-acc-av { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; font: 700 1.1rem var(--head); }
.acct-facts-act { grid-column: 1 / -1; text-align: right; margin-top: -4px; }
.acct-facts-act .link-btn { font-size: .86rem; }
.acct-hero { grid-template-columns: auto minmax(0, 1fr); }
.acct-facts { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.acct-facts div:first-child { padding-left: 0; }
@media (max-width: 1500px) {
  .acct-hero { grid-template-columns: auto minmax(0, 1fr); }
  .acct-facts { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .acct-facts div:first-child { padding-left: 0; }
}

/* Menu tài khoản (rê chuột vào MST) + cửa sổ đổi mật khẩu */
.acct-wrap { position: relative; margin-left: 8px; }
.acct-wrap .acct { margin-left: 0; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; min-width: 270px; background: #fff; border: 1px solid var(--line);
             border-radius: 12px; box-shadow: 0 18px 40px rgba(10, 42, 82, .18); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
             transition: opacity .15s, transform .15s, visibility .15s; }
.acct-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.acct-menu::after { content: ""; position: absolute; top: -6px; right: 56px; width: 10px; height: 10px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.acct-wrap:hover .acct-menu, .acct-wrap:focus-within .acct-menu { opacity: 1; visibility: visible; transform: none; }
.acct-menu-head { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.acct-menu-head strong { font-family: var(--head); font-size: .86rem; color: var(--navy); line-height: 1.35; }
.acct-menu-head small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none;
                                  font: 500 .92rem var(--body); color: var(--ink, #1d2939); text-decoration: none; text-transform: none; letter-spacing: 0; cursor: pointer; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: var(--brand-50); color: var(--brand); }
.acct-menu .icon { width: 17px; height: 17px; color: var(--brand); flex: none; }
.acct-menu form { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.acct-menu .acct-menu-out:hover { background: #fdecec; color: var(--red); }
.acct-menu .acct-menu-out .icon { color: var(--red); }
.modal-panel.modal-sm { max-width: 460px; margin-top: 6vh; }
.pw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-right: 36px; }
.pw-head h2 { font-size: 1.25rem; margin: 0; }
.pw-head p { margin: 2px 0 0; }
.pw-form .field { margin-bottom: 14px; }
.pw-form > p { margin: 0 0 18px; }
.pw-actions { display: flex; justify-content: flex-end; gap: 10px; }
.pw-done { text-align: center; padding: 18px 0 6px; display: grid; justify-items: center; gap: 8px; }
.pw-done h2 { margin: 6px 0 0; font-size: 1.3rem; }
.pw-ok .icon { width: 56px; height: 56px; color: var(--ok); }
.pw-page { max-width: 460px; margin: 0 auto; }
.acct-support .btn-outline { margin-top: 4px; }

/* Đơn vị tính: tách riêng sát lề phải, ngay trên bảng */
.fs-sub { margin-bottom: 6px; }
.fs-unit { text-align: right; font-style: italic; color: var(--muted); font-size: .9rem; margin: 0 0 8px; }

/* Chọn báo cáo tài chính: B01a / B02 / F01 */
.rpt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.rpt-tab { display: grid; gap: 2px; padding: 12px 18px; border-radius: 10px; text-decoration: none; color: var(--navy); border: 1px solid transparent; transition: background .15s; }
.rpt-tab span { font-family: var(--head); font-weight: 700; font-size: .95rem; }
.rpt-tab small { color: var(--muted); font-size: .78rem; }
.rpt-tab:hover { background: var(--brand-50); }
.rpt-tab.on { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(38, 101, 166, .28); }
.rpt-tab.on small { color: rgba(255, 255, 255, .8); }
.fin-table.tb { font-size: .88rem; }
.fin-table.tb th { text-align: center; padding: 8px; }
.fin-table.tb td { padding: 8px; }
.fin-table.tb td.code { width: 90px; }
.fin-table.tb td.name { min-width: 240px; }
.fin-table.tb td:nth-child(n+3) { width: 12%; }
.fin-table.tb tr.lv1 td { font-weight: 700; color: var(--navy); }
.fin-table.tb tr.lv2 td.code { padding-left: 20px; }
.fin-table.tb tr.lv2 td.name { padding-left: 20px; }
.fin-table.tb tr.lv3 td.code, .fin-table.tb tr.lv3 td.name { padding-left: 34px; font-style: italic; color: var(--muted); }
.fin-table.tb tr.lv2 td.code a, .fin-table.tb tr.lv3 td.code a { font-weight: 400; }
@media print { .rpt-tabs { display: none; } }

/* Sổ chi tiết tài khoản (cửa sổ nổi + trang riêng) */
.lg-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; margin-bottom: 20px; padding-right: 44px; }
.lg-ico { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; display: grid; place-items: center; }
.lg-ico .icon { width: 24px; height: 24px; }
.lg-kicker { margin: 0; font-size: .82rem; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; font-weight: 600; color: var(--brand); background: var(--brand-50); border: 1px solid #d6e4f3; border-radius: 6px; padding: 1px 8px; }
.lg-head h2 { margin: 4px 0 6px; font-size: 1.3rem; color: var(--navy); line-height: 1.3; }
.lg-meta { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.lg-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #f2f5f9; }
.lg-meta .icon { width: 13px; height: 13px; }
.lg-head .ledger-actions { align-self: center; }
.modal .ledger-detail .lg-head { padding-right: 48px; }

.lg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.lg-stat { position: relative; display: grid; gap: 3px; padding: 14px 16px 14px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.lg-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #9fb3c8; }
.lg-stat.dr::before { background: var(--brand); }
.lg-stat.cr::before { background: #e8a33d; }
.lg-stat span { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.lg-stat b { font-size: 1.3rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.25; }
.lg-side { font-style: normal; font-size: .76rem; font-weight: 600; color: var(--brand); }
.lg-side.cr { color: #b76e00; }
.lg-side.zero { color: var(--muted); font-weight: 500; }
.lg-stat.hl { background: linear-gradient(135deg, var(--navy), #13427a); border-color: transparent; }
.lg-stat.hl::before { background: var(--gold, #ffc233); }
.lg-stat.hl span { color: #b9cbe0; }
.lg-stat.hl b { color: #fff; }
.lg-stat.hl .lg-side { color: var(--gold, #ffc233); }

.lg-wrap { border: 1px solid var(--line); border-radius: 12px; }
.lg-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .87rem; font-variant-numeric: tabular-nums; }
.lg-table col.c-date { width: 98px; } .lg-table col.c-doc { width: 92px; } .lg-table col.c-acc { width: 128px; } .lg-table col.c-amt { width: 128px; }
.lg-table th { background: #eef3f9; color: #4a5d75; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 9px 10px; text-align: center; border-bottom: 1px solid #dbe4ef; white-space: nowrap; }
.lg-table tr.grp th { border-bottom: 1px solid #dbe4ef; }
.lg-table thead tr:first-child th:first-child { border-top-left-radius: 12px; }
.lg-table thead tr:first-child th:last-child { border-top-right-radius: 12px; }
.lg-table th.l, .lg-table td.l { text-align: left; }
.lg-table .g { border-left: 1px solid #dbe4ef; }
.lg-table td { padding: 10px; text-align: right; border-bottom: 1px solid #edf1f6; white-space: nowrap; color: #24364d; }
.lg-table td.dt, .lg-table td.doc { text-align: center; }
.lg-table td.doc { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; color: #4a5d75; }
.lg-table td.desc { white-space: normal; min-width: 240px; color: var(--navy); }
.lg-table td.acc { text-align: center; }
.lg-table td.acc span { display: inline-block; max-width: 116px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem;
                        padding: 2px 8px; border-radius: 6px; background: #f2f5f9; color: #4a5d75; }
.lg-table td.bal { color: var(--navy); font-weight: 600; background: #fafcfe; }
.lg-table tbody tr:not(.band):hover td { background: #f5f9fe; }
.lg-table tr.band td { background: #f6f9fc; font-weight: 700; color: var(--navy); }
.lg-table tr.band td:first-child { text-align: left; }
.lg-table tfoot td { font-weight: 700; color: var(--navy); border-bottom: 0; }
.lg-table tfoot td:first-child { text-align: left; }
.lg-table tfoot tr.tot td { background: #eef3f9; border-top: 2px solid var(--navy); }
.lg-table tfoot tr.close td { background: var(--navy); color: #fff; border-left-color: rgba(255, 255, 255, .15); font-size: .92rem; }
.lg-table tfoot tr.close td:first-child { border-bottom-left-radius: 11px; }
.lg-table tfoot tr.close td:last-child { border-bottom-right-radius: 11px; }
.lg-table td.empty { text-align: center; color: var(--muted); padding: 28px; }
.ledger-detail .table-filter { margin-bottom: 12px; }
@media (max-width: 900px) { .lg-stats { grid-template-columns: 1fr 1fr; } .lg-head { grid-template-columns: auto minmax(0, 1fr); } .lg-head .ledger-actions { grid-column: 1 / -1; } }

/* Menu nằm sát logo, nút tài khoản/đăng nhập đẩy sang phải (máy tính) */
@media (min-width: 1021px) {
  .brand { margin-right: 0; padding-right: 26px; border-right: 1px solid var(--line); }
  .site-header .container { gap: 14px; }
  .nav { flex: 1; min-width: 0; }
  .nav .sep { margin-left: auto; width: 0; background: none; }
}

/* ===== Chat trực tiếp với kế toán ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-float { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
/* Khi chưa mở chat: chỉ là biểu tượng tròn (chữ ẩn, tên nút đọc qua aria-label / title) – không che nội dung */
.chat-fab { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 7px; border: 0; border-radius: 999px; cursor: pointer;
            background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; box-shadow: 0 12px 30px rgba(10, 42, 82, .35); text-align: left;
            transition: transform .15s, box-shadow .15s; }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(10, 42, 82, .42); }
.chat-fab-ico { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.chat-fab-ico .icon { width: 23px; height: 23px; }
.chat-fab-text { display: none; line-height: 1.25; }
.chat-fab-text b { font-family: var(--head); font-size: .92rem; }
.chat-fab-text small { font-size: .74rem; opacity: .8; }
.chat-badge { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff;
              font: 700 .74rem/22px var(--body); text-align: center; border: 2px solid #fff; }
.chat-fab.has-new .chat-fab-ico { animation: chatPulse 1.6s ease-out infinite; }
@keyframes chatPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 194, 51, .7); } 100% { box-shadow: 0 0 0 14px rgba(255, 194, 51, 0); } }
.chat-float.is-open .chat-fab { display: none; }

.chat-panel { display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.chat-float .chat-panel { width: 390px; height: min(600px, calc(100vh - 110px)); border-radius: 18px; box-shadow: 0 24px 60px rgba(10, 42, 82, .28); border: 1px solid var(--line);
                          animation: chatIn .18s ease-out; transform-origin: bottom right; }
.chat-panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, var(--navy), #13427a); color: #fff; }
.chat-avatar { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--gold, #ffc233); color: var(--navy); display: grid; place-items: center;
               font: 800 .95rem var(--head); }
.chat-avatar i { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--navy); }
.chat-who { display: grid; min-width: 0; flex: 1; }
.chat-who strong { font-family: var(--head); font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who small { font-size: .76rem; color: #b9cbe0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-min { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-min:hover { background: rgba(255, 255, 255, .24); }
.chat-min .icon { width: 20px; height: 20px; }

.chat-body { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: #f4f7fb; display: flex; flex-direction: column; }
.chat-day { align-self: center; margin: 10px 0 8px; padding: 3px 12px; border-radius: 999px; background: #e3eaf3; color: #5b6b80; font-size: .72rem; font-weight: 600; }
.chat-msg { display: flex; flex-direction: column; max-width: 82%; margin-top: 10px; }
.chat-msg.cont { margin-top: 3px; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; align-items: flex-start; }
.chat-from { font-size: .72rem; font-weight: 600; color: var(--brand); margin: 0 0 3px 4px; }
.chat-bubble { padding: 9px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.45; box-shadow: 0 1px 2px rgba(10, 42, 82, .08); }
.chat-msg.me .chat-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.them .chat-bubble { background: #fff; color: #1d2939; border: 1px solid #e3eaf3; border-bottom-left-radius: 5px; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-text + .chat-file { margin-top: 8px; }
.chat-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; min-width: 200px; max-width: 280px; }
.chat-msg.me .chat-file { background: rgba(255, 255, 255, .16); color: #fff; }
.chat-msg.them .chat-file { background: #f2f6fb; color: var(--navy); }
.chat-file-ico { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--brand); }
.chat-msg.them .chat-file-ico { background: var(--brand); color: #fff; }
.chat-file-ico .icon { width: 18px; height: 18px; }
.chat-file-info { display: grid; min-width: 0; }
.chat-file-info b { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-file-info small { font-size: .72rem; opacity: .75; }
.chat-meta { font-size: .68rem; color: #8a99ad; margin: 3px 6px 0; display: flex; gap: 6px; }
.chat-tick.seen { color: var(--brand); font-weight: 600; }

.chat-empty { margin: auto 0; text-align: center; padding: 10px 6px 16px; }
.chat-empty-ico { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.chat-empty-ico .icon { width: 28px; height: 28px; }
.chat-empty p { margin: 0 auto 14px; max-width: 290px; font-size: .88rem; color: #5b6b80; line-height: 1.5; }
.chat-empty p b { display: block; color: var(--navy); font-family: var(--head); font-size: 1rem; margin-bottom: 4px; }
.chat-chips { display: grid; gap: 8px; }
.chat-chips button { border: 1px solid #cfdcec; background: #fff; color: var(--brand); border-radius: 999px; padding: 8px 14px; font: 500 .84rem var(--body); cursor: pointer; text-align: left; }
.chat-chips button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.chat-compose { border-top: 1px solid var(--line); padding: 10px 12px 8px; background: #fff; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 14px; border: 1.5px solid #d3dce8; border-radius: 21px; font: inherit; font-size: .92rem; line-height: 1.4; background: #f8fafc; }
.chat-row textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.chat-attach { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #6b7c93; cursor: pointer; }
.chat-attach:hover { background: var(--brand-50); color: var(--brand); }
.chat-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat-attach:focus-within { outline: 2px solid var(--brand); }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(224, 16, 32, .3); }
.chat-send:hover { filter: brightness(1.08); }
.chat-send:disabled { opacity: .55; cursor: wait; }
.chat-send .icon { width: 19px; height: 19px; margin-left: -2px; }
.chat-filechip { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--brand-50); color: var(--navy); font-size: .82rem; }
.chat-filechip[hidden] { display: none; }
.chat-filechip .icon { width: 15px; height: 15px; color: var(--brand); }
.chat-filechip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-filechip button { border: 0; background: none; font-size: 1.1rem; color: #6b7c93; cursor: pointer; line-height: 1; }
.chat-hint { margin: 5px 0 0; font-size: .68rem; color: #9aa8ba; text-align: center; }
.chat-err { margin: 6px 0 0; font-size: .8rem; color: #b42318; text-align: center; }
.chat-err[hidden] { display: none; }

/* Hộp thư kế toán */
.inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 65px); border-bottom: 1px solid var(--line); }
/* Trang Tin nhắn nằm trong khung khu kế toán (menu trái giữ nguyên): hộp thư phủ kín khung chính */
.inbox-page .app-main { padding: 0; }
.inbox-page .inbox { grid-template-columns: 320px minmax(0, 1fr); border-bottom: 0; }
.inbox-list { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-list-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.inbox-list-head h1 { font-size: 1.3rem; margin: 0; }
.inbox-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.inbox-back { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--navy); text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.inbox-back svg { width: 18px; height: 18px; }
.inbox-back:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.inbox-list-head input { width: 100%; font: inherit; font-size: .9rem; padding: 9px 12px; border: 1.5px solid #d3dce8; border-radius: 8px; }
.inbox-list-head input:focus { outline: none; border-color: var(--brand); }
.inbox-items { overflow-y: auto; flex: 1; padding: 6px; }
.inbox-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: inherit; }
.inbox-item[hidden] { display: none; }
.inbox-item:hover { background: #f4f7fb; }
.inbox-item.on { background: var(--brand-50); }
.inbox-av { flex: none; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; display: grid; place-items: center; font: 700 1rem var(--head); }
.inbox-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inbox-top { display: flex; gap: 8px; align-items: baseline; }
.inbox-top b { flex: 1; min-width: 0; font-size: .86rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.inbox-top time { font-size: .72rem; color: #8a99ad; flex: none; }
.inbox-prev { font-size: .8rem; color: #6b7c93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item.unread .inbox-top b { font-weight: 800; }
.inbox-item.unread .inbox-prev { color: var(--navy); font-weight: 600; }
.inbox-badge { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 700 .74rem/22px var(--body); text-align: center; }
.inbox-main-pane { display: flex; flex-direction: column; min-height: 0; background: #f4f7fb; }
.inbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.inbox-bar > div:first-child { display: grid; min-width: 0; }
.inbox-bar b { color: var(--navy); font-family: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-actions { display: flex; gap: 8px; flex: none; }
.chat-inline { flex: 1; min-height: 0; display: flex; }
.chat-inline .chat-panel { flex: 1; min-height: 0; }
.chat-inline .chat-head { display: none; }
.chat-inline .chat-body { padding: 18px max(24px, calc((100% - 860px) / 2)) 8px; }
.chat-inline .chat-compose { padding: 12px max(24px, calc((100% - 860px) / 2)) 10px; }
.nav-badge { display: inline-block; min-width: 18px; height: 18px; margin-left: 5px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 .68rem/18px var(--body); text-align: center; vertical-align: 2px; }
@media print { .chat-float { display: none !important; } }
.inbox-main > *, .inbox-top { min-width: 0; }
.inbox-av { font-size: .82rem; }
@media (min-width: 1021px) {
  .brand { border-right: 0; padding-right: 0; }
  .site-header .container:has(.nav > .link) .brand { border-right: 1px solid var(--line); padding-right: 26px; }
}

/* ===== Hóa đơn ===== */
.inv-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: center; }
.inv-upload-text { display: flex; gap: 14px; align-items: flex-start; }
.inv-upload-text h2 { font-size: 1.1rem; margin: 2px 0 4px; }
.inv-upload-text p { margin: 0; max-width: 760px; }
.inv-upload-form { display: flex; gap: 10px; align-items: center; }
/* Thanh gọn trên trang Hóa đơn (kế toán): đồng bộ cổng + tải file lên trên một dòng */
.app .card.inv-bar { padding: 12px 16px; }
.inv-bar-row { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.inv-bar-sync { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 320px; }
.inv-bar-sync .ico-box { width: 38px; height: 38px; border-radius: 10px; margin: 0; }
.inv-bar-text { display: grid; line-height: 1.35; min-width: 0; }
.inv-bar-text b { font-family: var(--head); color: var(--navy); font-size: .95rem; }
.inv-bar-upload { display: flex; align-items: center; gap: 8px; }
.inv-bar-upload .file-drop { height: 36px; min-width: 200px; max-width: 260px; font-size: .85rem; padding: 0 12px; }
.inv-bar-sync .btn, .inv-bar-upload .btn { white-space: nowrap; flex-shrink: 0; }
.inv-help-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand); font-weight: 700; cursor: pointer; }
.inv-help-btn[aria-expanded="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.inv-bar .inv-how { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); padding-left: 34px; max-width: none; }
.inv-bar .inv-how[hidden] { display: none; }
.inv-bar .sync-status { margin: 8px 0 0; }
.inv-bar .sync-problem { margin: 10px 0 0; }
.inv-covered { color: var(--navy); }
/* năm đang xem còn khoảng chưa đồng bộ từ cổng: vàng đậm – nhắc lấy tiếp, không phải lỗi */
.inv-gap { color: #a86400; background: #fff1c2; padding: 0 6px; border-radius: 4px; }
/* Logo công ty: ô trắng, ảnh vừa khung */
img.co-avatar.co-logo, img.acct-avatar.acct-logo { background: #fff; object-fit: contain; border: 1px solid var(--line); padding: 3px; box-sizing: border-box; }
.acct-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.acct-logo-form label { font-size: .78rem; cursor: pointer; }
.acct-contact { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.acct-contact-text { flex: 1; min-width: 260px; }
.acct-contact-text h2 { font-size: 1.05rem; margin: 0 0 2px; }
.acct-contact-text p { margin: 0; }
.acct-founded-row { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.acct-founded-row b { color: var(--navy); }
.acct-founded { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.acct-founded[hidden] { display: none; }
.acct-founded label { font-weight: 600; color: var(--navy); }
.acct-founded input { width: 120px; height: 34px; padding: 0 10px; border: 1px solid #d3dce8; border-radius: 8px; font: inherit; }
.acct-founded input:focus { outline: none; border-color: var(--brand); }
/* Tờ khai GTGT lập từ hóa đơn */
.vr-tabs { align-self: flex-start; }
.vr-title { font-size: 1.05rem; margin: 0; color: var(--navy); }
.vr-notes { margin: 0; padding: 10px 14px 10px 30px; border: 1px solid #f0d49a; border-radius: 10px; background: #fff9ec; color: #7a5200; font-size: .86rem; display: grid; gap: 3px; }
.vr-override { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.vr-override label { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); }
.vr-override input { width: 130px; height: 32px; padding: 0 8px; border: 1px solid #d3dce8; border-radius: 6px; font: inherit; text-align: right; }
.sync-note { margin: 10px 0 0; }
/* Kê khai hóa đơn mua vào: không kê khai / chuyển kỳ */
.bk-decl { border: 1px solid #d3dce8; background: #fff; border-radius: 6px; padding: 2px 8px; font: inherit; font-size: .74rem; font-weight: 600; color: var(--brand); cursor: pointer; white-space: nowrap; }
.bk-decl:hover { background: #eaf2fc; border-color: var(--brand); }
.inv-status.decl { background: #fff3dc; color: #8a5a00; }
.bk-table th.sel, .bk-table td.sel { width: 34px; text-align: center; padding-left: 4px; padding-right: 4px; }
.bk-table th.sel input, .bk-table td.sel input { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
.bk-table tr:has(td.sel input:checked) td { background: #eef5fd; }
.bk-selbar { position: sticky; bottom: 12px; z-index: 5; margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(16, 42, 84, .25); width: max-content; max-width: 100%; }
.bk-selbar .link-btn { color: #cfe0f5; }
.bk-selbar[hidden] { display: none; }
.bk-skip { margin-top: 18px; border: 1px solid #f0d49a; border-radius: 10px; background: #fffaf0; padding: 12px 14px; }
.bk-skip h3 { margin: 0 0 8px; font-size: .95rem; color: #7a5200; }
.bk-skip h3 span { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 8px; }
.bk-skip .bk-table th { position: static; }
.decl-form { display: grid; gap: 10px; }
.decl-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #d3dce8; border-radius: 8px; padding: 9px 12px; cursor: pointer; }
.decl-opt:has(input:checked) { border-color: var(--brand); background: #f3f8fe; }
.decl-opt input { margin-top: 4px; }
.decl-opt span { display: grid; gap: 3px; flex: 1; }
.decl-opt small { color: var(--muted); font-size: .78rem; }
.decl-opt select { height: 32px; border: 1px solid #d3dce8; border-radius: 6px; padding: 0 8px; font: inherit; max-width: 200px; }
/* Tab con trong Tờ khai từ hóa đơn */
.vr-subtabs { display: flex; gap: 4px; border-bottom: 2px solid #dfe6ef; }
.vr-subtabs button { border: 0; background: none; padding: 10px 18px; font: inherit; font-weight: 700; font-size: .92rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 8px; }
.vr-subtabs button:hover { color: var(--navy); }
.vr-subtabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.vr-subtabs button span { font-size: .74rem; font-weight: 700; background: #eef3f9; color: var(--navy); border-radius: 999px; padding: 1px 8px; }
.vr-subtabs button.on span { background: var(--brand); color: #fff; }
/* nút "Lưu ý" cuối hàng tab: bấm mới hiện danh sách */
.vr-notes-pop { margin-left: auto; position: relative; align-self: center; }
.vr-notes-pop summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 9px; border-radius: 999px; cursor: pointer;
  background: #fff4dc; border: 1px solid #f0d49a; color: #8a5a00; font-weight: 700; font-size: .84rem; user-select: none; }
.vr-notes-pop summary::-webkit-details-marker { display: none; }
.vr-notes-pop summary .icon { width: 16px; height: 16px; }
.vr-notes-pop summary b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e08a00; color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }
.vr-notes-pop summary:hover, .vr-notes-pop[open] summary { background: #ffe9b8; }
.vr-notes-pop .vr-notes { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(560px, 80vw); box-shadow: 0 12px 28px rgba(10, 42, 82, .18); line-height: 1.5; }
.vr-panel { display: grid; gap: 16px; }
.vr-panel[hidden] { display: none; }
/* Bảng kê hóa đơn bán ra / mua vào */
.bk-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bk-chip { text-align: left; border: 1px solid #d3dce8; border-left: 4px solid #9aa8ba; border-radius: 10px; background: #fff; padding: 9px 12px; cursor: pointer; display: grid; gap: 2px; font: inherit; }
.bk-chip em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.bk-chip b { font-size: 1.02rem; color: var(--navy); }
.bk-chip span { font-size: .78rem; color: var(--text-2); }
.bk-chip.k5 { border-left-color: #2f7fd1; } .bk-chip.k8 { border-left-color: #7b4fd0; } .bk-chip.k10 { border-left-color: #c2410c; }
.bk-chip.k0, .bk-chip.kkct, .bk-chip.kkkknt { border-left-color: #18794e; } .bk-chip.kkhac { border-left-color: #b42318; }
.bk-chip:hover { background: #f6f9fd; }
.bk-chip.on { background: #eaf2fc; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.bk-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bk-tools input { width: 340px; max-width: 100%; height: 34px; padding: 0 12px; border: 1px solid #d3dce8; border-radius: 8px; font: inherit; font-size: .86rem; }
.bk-hint { margin-left: auto; font-style: italic; }
.bk-tools [hidden] { display: none; }
.vr-panel > * { min-width: 0; }  /* bảng kê rộng: cuộn ngang trong khung, không đẩy cả trang rộng ra */
.bk-tools .bk-xls { height: 34px; }
/* dòng lọc cột của bảng kê: không dính đầu như dòng tiêu đề (tránh chồng lên nhau) */
.bk-table .bk-colfilter th { position: static; }
.bk-table .bk-colfilter input { min-width: 0; }
.bk-table .bk-colfilter select { width: auto; max-width: 110px; }  /* .bk-table: thắng luật .inv-colfilter của màn hình nhỏ */
.bk-table .bk-colfilter input[data-bkf=date] { width: 84px; }
.bk-table .bk-colfilter input[data-bkf=so] { width: 76px; }
.bk-table .bk-colfilter input[data-bkf=mst] { width: 100px; }
.bk-table td.name { min-width: 250px; }
.bk-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.bk-table th { background: #eef3f9; color: var(--navy); font-size: .74rem; font-weight: 700; padding: 8px 9px; text-align: center; border-bottom: 1px solid #d3dce8; position: sticky; top: 0; }
.bk-table th.l, .bk-table td.l { text-align: left; }
.bk-table th.n, .bk-table td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-table td { padding: 6px 9px; border-bottom: 1px solid #edf1f6; }
.bk-table td.c { text-align: center; white-space: nowrap; }
.bk-table td.stt { text-align: center; color: #8a99ad; width: 46px; }
.bk-table td.doc, .bk-table td.mst { font-size: .8rem; color: var(--text-2); }
.bk-table td.name { max-width: 360px; }
.bk-table td.note .inv-status { font-size: .68rem; padding: 1px 7px; margin-right: 4px; }
.bk-table tr.bk-head td { background: #f6f8fb; font-weight: 700; color: var(--navy); padding: 9px; border-top: 2px solid #dfe6ef; }
.bk-table tr.bk-head small { margin-left: 10px; font-weight: 500; color: var(--muted); }
.bk-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; font-size: .74rem; margin-right: 8px; }
.bk-table tr.bk-sub td { font-weight: 700; color: var(--navy); background: #fbfcfe; text-align: right; }
.bk-table tr.bk-sub td:first-child { text-align: right; font-style: italic; }
.bk-table tr.bk-goods > td { padding: 4px 9px 10px; }
.bk-table details summary { cursor: pointer; color: #6b3fb5; font-size: .8rem; font-weight: 700; padding: 4px 0; }
.bk-sub-table { margin-top: 6px; border: 1px solid #e3d7f7; }
.bk-sub-table th { background: #f4effc; color: #4b2a85; position: static; }
.bk-table tfoot td { font-weight: 800; color: #fff; background: var(--navy); padding: 10px 9px; text-align: right; }
.bk-table tfoot td:first-child { text-align: right; letter-spacing: .04em; }
/* Phụ lục giảm thuế GTGT (bấm để mở) */
.vr-pl-box { margin-top: 14px; border: 1px solid #c9d3e0; border-radius: 10px; background: #f8fafd; }
.vr-pl-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 12px 16px; }
.vr-pl-box > summary::-webkit-details-marker { display: none; }
.vr-pl-title { font-weight: 700; color: var(--navy); }
.vr-pl-sum { flex: 1; font-size: .84rem; color: var(--text-2); }
.vr-pl-toggle::after { content: 'Xem phụ lục ▾'; font-size: .82rem; font-weight: 700; color: var(--brand); }
.vr-pl-box[open] .vr-pl-toggle::after { content: 'Thu gọn ▴'; }
.vr-pl-box[open] > summary { border-bottom: 1px solid #c9d3e0; }
.vr-pl-doc { border: 0; border-radius: 0 0 10px 10px; }
.vr-pl-h { margin: 14px 0 6px; font-size: .9rem; color: var(--navy); }
.vr-pl-table { table-layout: fixed; }
.vr-pl-table thead th { font-size: .74rem; white-space: normal; text-transform: none; letter-spacing: 0; line-height: 1.3; }
.vr-pl-table th.stt { width: 50px; }
.vr-pl-table th.n { width: 190px; }
.vr-pl-table th.r { width: 100px; }
.vr-pl-table td.c { text-align: center; width: 90px; }
.vr-pl-table td.val { border-left: 1px solid #c9d3e0; }
/* Trang tờ khai từ hóa đơn: bảng kê nạp sau, đổi kỳ thì làm mờ số cũ */
.vr-bk-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.vr-spin { width: 18px; height: 18px; border: 2px solid #c9d3e0; border-top-color: var(--brand); border-radius: 50%; animation: vrSpin .8s linear infinite; }
@keyframes vrSpin { to { transform: rotate(360deg); } }
.dash.vr-loading > *:not(.vr-tabs):not(.inv-toolbar) { opacity: .4; transition: opacity .15s; pointer-events: none; }
/* Đối chiếu tờ khai từ hóa đơn với tờ khai đã nộp */
.vr-cmp-badge { font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.vr-cmp-badge.match, .vr-cmp-badge.rounding { background: #e3f5ea; color: #17733f; }
.vr-cmp-badge.diff { background: #fde8e8; color: #b42318; }
.vr-cmp-src { margin: -4px 0 10px; }
.vr-cmp-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vr-cmp-table td { padding: 5px 10px; font-size: .84rem; }
.vr-cmp-table td.l .code { display: inline-block; min-width: 42px; color: #8a99ad; font-size: .76rem; }
.vr-cmp-table tr.vr-pl td.l { padding-left: 52px; color: var(--text-2); font-style: italic; }
.vr-cmp-table tr.off td { background: #fff6f5; }
.vr-cmp-table tr.off td.d { color: #b42318; font-weight: 700; }
.vr-cmp-table .ok { color: #17733f; font-weight: 700; }
.vr-cmp-table tr.rnd td.d { color: #8a6d1f; }
.vr-cmp-table td.d small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.vr-cmp-hints { border: 1px solid #f0d49a; background: #fffaf0; border-radius: 10px; padding: 12px 14px; }
.vr-cmp-hints h3 { margin: 0 0 6px; font-size: .92rem; color: var(--navy); }
.vr-cmp-hints ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: .84rem; line-height: 1.45; }
.vr-cmp-hints li.warn::marker { color: #c2410c; }
.vr-cmp-hints li.info { color: var(--text-2); }
@media (max-width: 1100px) { .vr-cmp-body { grid-template-columns: 1fr; } }
.vr-cmp-body.one { grid-template-columns: 1fr; }  /* khớp hết: chỉ còn bảng */
.vr-cmp-table td.vr-cmp-zero { text-align: left; color: #18794e; font-weight: 600; background: #f3fbf6; }
.vr-blank-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
  background: #eef5fd; border: 1px solid #cfe0f5; color: var(--navy); font-size: .86rem; line-height: 1.5; }
.vr-blank-note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #2f7fd1; }
/* Tờ khai 01/GTGT trình bày như mẫu HTKK */
.vr-doc { border: 1px solid #c9d3e0; border-radius: 10px; padding: 22px 26px 20px; background: #fff; color: #1d2939; }
.vr-doc-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.vr-doc-nation { grid-column: 1; text-align: center; display: grid; gap: 2px; font-size: .9rem; }
.vr-doc-nation span { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.vr-doc-form { text-align: center; border: 1px solid #c9d3e0; padding: 6px 10px; display: grid; gap: 2px; font-size: .78rem; justify-self: end; max-width: 330px; }
.vr-doc-form b { font-size: .9rem; }
.vr-doc-form span { color: var(--muted); font-style: italic; }
.vr-doc-title { text-align: center; margin: 16px 0 2px; font-size: 1.15rem; color: var(--navy); letter-spacing: .02em; }
.vr-doc-sub { text-align: center; margin: 0 0 12px; font-style: italic; color: var(--muted); font-size: .84rem; }
.vr-doc-info { margin: 0; display: grid; gap: 5px; font-size: .88rem; }
.vr-doc-info > div { display: flex; gap: 8px; align-items: baseline; }
.vr-doc-info dt, .vr-code { font-weight: 700; color: var(--navy); min-width: 44px; }
.vr-doc-info dd { margin: 0; flex: 1; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.vr-box { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid #7c8ba1; font-size: .75rem; font-weight: 700; line-height: 1; vertical-align: middle; }
.vr-gap { width: 40px; }
.vr-mst { display: inline-flex; }
.vr-mst span { width: 22px; height: 24px; display: grid; place-items: center; border: 1px solid #7c8ba1; margin-left: -1px; font-weight: 700; font-size: .88rem; }
.vr-dots { flex: 1; min-width: 160px; border-bottom: 1px dotted #9aa8ba; height: 1em; }
.vr-dots.short { flex: 0 0 120px; min-width: 120px; }
.vr-doc-unit { text-align: right; font-style: italic; font-size: .82rem; margin: 6px 0 6px; color: var(--muted); }
.vr-form { width: 100%; border-collapse: collapse; font-size: .86rem; }
.vr-form th, .vr-form td { border: 1px solid #c9d3e0; padding: 6px 9px; }
.vr-form thead th { background: #eef3f9; color: var(--navy); font-size: .8rem; font-weight: 700; text-align: center; }
.vr-form tr.vr-colno th { font-weight: 500; font-size: .74rem; padding: 2px; color: var(--muted); }
.vr-form td.stt { text-align: center; font-weight: 700; width: 46px; color: var(--navy); }
.vr-form td.desc.sub { padding-left: 28px; font-style: italic; }
.vr-form td.code { color: #6b7c93; font-size: .76rem; text-align: center; width: 52px; white-space: nowrap; border-right: 0; }
.vr-form td.val { text-align: right; width: 170px; font-variant-numeric: tabular-nums; border-left: 0; white-space: nowrap; }
.vr-form tr.sec td, .vr-form tr.band td { font-weight: 700; }
.vr-form tr.sec td { background: #f6f8fb; }
.vr-form tr.key td { background: #eef3f9; font-weight: 700; color: var(--navy); }
.vr-form td.val.edit { background: #fff8db; padding: 2px 4px; }
.vr-form td.val.edit input { width: 100%; height: 30px; border: 1px solid #e6cf7a; border-radius: 4px; background: #fffdf2; text-align: right; font: inherit; font-weight: 700; padding: 0 6px; font-variant-numeric: tabular-nums; }
.vr-form td.val.edit input::placeholder { color: #1d2939; opacity: 1; font-weight: 400; }
.vr-form td.val.edit input:focus { outline: 2px solid var(--brand); background: #fff; }
.vr-edit-hint { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.vr-edit-hint i { width: 14px; height: 14px; background: #fff8db; border: 1px solid #e6cf7a; border-radius: 3px; }
.vr-doc-foot { margin-top: 14px; display: grid; gap: 10px; font-size: .86rem; }
.vr-doc-foot p { margin: 0; font-style: italic; }
.vr-sign { justify-self: end; text-align: center; display: grid; gap: 3px; min-width: 320px; }
.vr-appendix { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #f1e9fd; color: #4b2a85; font-size: .88rem; }
.vr-bk { display: grid; gap: 16px; }
.vr-groups td { padding: 7px 10px; font-size: .86rem; }
.vr-groups tr.vr-detail > td { padding: 0 10px 8px; text-align: left; background: #fff; }
.vr-groups details summary { cursor: pointer; color: var(--brand); font-size: .8rem; font-weight: 600; padding: 2px 0; }
.vr-groups details table { margin-top: 6px; }
.vr-groups details td { padding: 4px 8px; font-size: .8rem; }
.vr-groups td.stt { color: #8a99ad; text-align: center; }
.vr-groups td.rate, .vr-groups td.mst { text-align: center; font-size: .78rem; color: #4a5d75; }
/* Nút Xuất Excel: chọn Bảng kê tổng hợp / Chi tiết hàng hóa */
.xl-menu { position: relative; }
.xl-menu > summary { list-style: none; cursor: pointer; }
.xl-menu > summary::-webkit-details-marker { display: none; }
.xl-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(10, 42, 82, .18); }
.xl-menu-list a { display: grid; gap: 2px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--navy); }
.xl-menu-list a:hover { background: var(--brand-50); }
.xl-menu-list a small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.xl-menu-list p { margin: 4px 10px 6px; }
.sync-history { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); overflow-x: auto; }
.sync-history[hidden] { display: none; }
.sync-history .lg-table td { padding: 6px 8px; font-size: .82rem; }
.sync-history td.note { min-width: 280px; max-width: 520px; font-size: .78rem; color: #4a5d75; }
.sync-history .inv-status { font-size: .68rem; padding: 1px 7px; }
/* Doanh nghiệp: dòng "hóa đơn đã cập nhật đến ngày…" */
.inv-updated { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid #cfe0f3; border-radius: 10px; background: #f3f8fe;
  color: var(--navy); font-size: .9rem; }
.inv-updated .icon { width: 18px; height: 18px; color: var(--brand); flex: none; }
.inv-updated .muted { font-size: .82rem; }
.inv-bar [data-sync-panel] { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.file-drop { position: relative; display: flex; align-items: center; min-width: 260px; max-width: 340px; height: 44px; padding: 0 16px; border: 1.5px dashed #b9c9dc;
             border-radius: 10px; background: #f8fbff; color: var(--brand); font-weight: 500; font-size: .9rem; cursor: pointer; overflow: hidden; }
.file-drop:hover { border-color: var(--brand); background: var(--brand-50); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-ledger { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px dashed var(--line); }
.inv-ledger select, .inv-filter select, .inv-filter input { font: inherit; font-size: .9rem; height: 38px; padding: 0 10px; border: 1.5px solid #d3dce8; border-radius: 8px; background: #fff; }
.inv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.seg-item { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 9px; font-family: var(--head); font-weight: 700; font-size: .92rem; color: var(--navy); text-decoration: none; }
.seg-item span { min-width: 26px; padding: 1px 8px; border-radius: 999px; background: #eef3f9; color: #4a5d75; font: 600 .76rem/1.6 var(--body); text-align: center; }
.seg-item:hover { background: var(--brand-50); }
.seg-item.on { background: var(--brand); color: #fff; }
.seg-item.on span { background: rgba(255, 255, 255, .2); color: #fff; }
.inv-filter { display: flex; gap: 8px; align-items: center; }
.inv-filter input[type=search] { width: 280px; }
.inv-filter select:focus, .inv-filter input:focus { outline: none; border-color: var(--brand); }
.inv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.inv-table td.chk, .inv-table th.chk { width: 36px; text-align: center; }
.inv-party { font-weight: 500; }
.inv-table td.desc small { font-size: .74rem; }
.inv-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: #e7f6ec; color: #18794e; white-space: nowrap; }
.inv-status.book { background: #eef3f9; color: #4a5d75; }
.inv-status.void { background: #fdeceb; color: #b42318; }
.inv-status.replace { background: #e6f0fc; color: #1d5a99; }
.inv-status.adjust { background: #f1e9fd; color: #6b3fb5; }
.inv-status.replaced { background: #eef1f5; color: #5d6b7c; }
.inv-status.has-note { cursor: help; text-decoration: underline dotted; text-underline-offset: 2px; }
.inv-changed { display: block; margin-top: 2px; font-size: .66rem; font-weight: 700; color: #b45309; cursor: help; white-space: nowrap; }
/* Tờ khai GTGT: hóa đơn đổi trạng thái sau khi nộp tờ khai */
.vr-changed { border: 1px solid #f3d19e; background: #fffaf0; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.vr-changed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.vr-changed-head b { color: #8a5a00; }
.vr-changed-head p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.vr-changed table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .82rem; }
.vr-changed th, .vr-changed td { text-align: left; padding: 6px 8px; border-top: 1px solid #f3e2c2; }
.vr-changed th { font-size: .72rem; color: var(--muted); font-weight: 600; }
.vr-changed td.n { text-align: right; white-space: nowrap; }
.lg-table td.st { text-align: center; }
.lg-table td.ck { text-align: center; width: 54px; }
.lg-table td.ck .ok { color: #18794e; font-weight: 800; }
.lg-table td.ck .miss { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff3e0; color: #b76e00; font-weight: 800; font-size: .78rem; }
.lg-table td.ck a { color: var(--brand); }
.lg-table td.ck .icon { width: 17px; height: 17px; }
.lg-table tr.is-void td { color: #9aa8ba; text-decoration: line-through; text-decoration-color: rgba(180, 35, 24, .4); }
.lg-table tr.is-void td.st, .lg-table tr.is-void td.ck { text-decoration: none; }
.inv-bulk { margin-top: 12px; }
/* Dòng lọc theo cột + phân trang (100 hóa đơn/trang) */
.inv-colfilter th { padding: 6px 4px !important; background: #f6f9fc !important; }
.inv-colfilter select, .inv-colfilter input { width: 100%; min-width: 0; height: 30px; padding: 0 6px; font: inherit; font-size: .78rem; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--ink, #1b2430); border: 1px solid #d3dce8; border-radius: 6px; background: #fff; }
.inv-colfilter select:focus, .inv-colfilter input:focus { outline: none; border-color: var(--brand); }
.inv-colfilter th.l input { min-width: 0; }
.inv-colfilter select { min-width: 64px; }
/* Bảng hóa đơn: gộp Ký hiệu + Số, Tên + MST (ô lọc đôi) để vừa một màn hình */
.cf-pair { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(56px, .8fr); gap: 4px; }
.cf-pair.wide { grid-template-columns: minmax(110px, 1.6fr) minmax(80px, 1fr); }
.inv-table td.doc .inv-kh { color: #6b7c93; font-size: .74rem; margin-right: 2px; }
.inv-table td.doc { white-space: nowrap; }
.inv-party-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.inv-party-row .inv-party { flex: 1 1 auto; min-width: 0; }
.inv-party-row .inv-mst { flex: none; font-size: .74rem; color: #6b7c93; white-space: nowrap; }
.inv-colfilter .date-box { display: block; }
.inv-colfilter input[data-day-filter] { min-width: 96px; cursor: pointer; }
/* Trang Hóa đơn – bản gọn: ô tổng thấp, bảng dày dòng (tên 1 dòng, rê chuột xem đủ), nhãn nhỏ */
.inv-toolbar .seg-item { padding: 7px 16px; font-size: .88rem; }
.inv-toolbar .inv-filter select, .inv-toolbar .inv-filter input { height: 36px; font-size: .86rem; }
.inv-toolbar .inv-filter .btn { height: 36px; }
.inv-stats { gap: 10px; }
.inv-stats .lg-stat { padding: 10px 14px 10px 18px; gap: 1px; border-radius: 10px; }
.inv-stats .lg-stat span { font-size: .68rem; }
.inv-stats .lg-stat b { font-size: 1.12rem; }
.inv-stats .lg-side { font-size: .72rem; }
.inv-stats + .card .card-title { margin-bottom: 12px; }
.inv-stats + .card .card-title h2 { font-size: 1.02rem; }
.inv-table th { padding: 8px 8px; font-size: .68rem; }
.inv-table td { padding: 6px 8px; font-size: .84rem; }
.inv-table td.doc { font-size: .78rem; }
.inv-table td.desc { min-width: 200px; }
.inv-table .inv-party-row { max-width: 235px; }
.inv-colfilter input[data-day-filter] { min-width: 84px; }
.inv-table thead tr:first-child th { white-space: normal; line-height: 1.25; }
/* ô lọc dạng chọn: không giãn theo lựa chọn dài nhất (vd "Hóa đơn đã bị điều chỉnh") */
.inv-colfilter select { width: 100%; max-width: 108px; }
.inv-colfilter .cf-pair select { max-width: none; }
.inv-table th, .inv-table td { padding-left: 6px; padding-right: 6px; }
.inv-table .inv-party { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.inv-table .inv-status, .inv-table .inv-kind { font-size: .68rem; padding: 1px 7px; }
.inv-table .fbadge { padding: 1px 7px; font-size: .68rem; }
.inv-table th.stt, .inv-table td.stt { width: 44px; text-align: center; color: #8a99ad; font-size: .76rem; }
.inv-table tbody tr:nth-child(even):not(:hover) td { background: #fbfcfe; }
.inv-table tbody tr:nth-child(even):not(:hover) td.bal { background: #f6f9fc; }
/* Độ rộng cột cố định (colgroup): ô lọc không làm giãn cột, tên đối tác lấy phần còn lại */
.inv-table { table-layout: fixed; min-width: 1150px; }
.inv-table col.w-stt { width: 40px; } .inv-table col.w-date { width: 92px; } .inv-table col.w-doc { width: 128px; }
.inv-table col.w-kind { width: 84px; } .inv-table col.w-amt { width: 108px; } .inv-table col.w-rate { width: 72px; }
.inv-table col.w-vat { width: 98px; } .inv-table col.w-st { width: 96px; } .inv-table col.w-ck { width: 50px; } .inv-table col.w-files { width: 132px; }
.inv-table col.w-mst { width: 100px; }
.inv-table col.w-kh { width: 92px; } .inv-table col.w-no { width: 86px; }  /* ký hiệu, số HĐ: hai cột riêng */
.inv-table td.doc .inv-kh { margin-right: 0; font-size: .78rem; }
/* mọi tiêu đề một dòng: cột hẹp đủ chỗ cho chữ + phễu, lấy bớt từ cột tên đối tác (cột co giãn) */
.inv-table col.w-rate { width: 96px; } .inv-table col.w-kind { width: 92px; } .inv-table col.w-amt { width: 138px; }
.inv-table col.w-date { width: 104px; } .inv-table col.w-vat { width: 108px; } .inv-table col.w-st { width: 108px; }
.inv-table col.w-files { width: 150px; }  /* 👁 / 🔎 / ⋯ / + – căn trái để các nút thẳng cột */
.lg-table.inv-table td.files-cell { text-align: left; }
.inv-table { min-width: 1474px; }
.inv-table thead th, .inv-table thead tr:first-child th { vertical-align: middle; white-space: nowrap; letter-spacing: .02em; }  /* cột tên đối tác giữ tối thiểu ~240px; màn hẹp thì bảng cuộn ngang */
/* tên đối tác và MST: hai cột riêng (tiêu đề nằm đúng trên từng cột); tên dài cắt "…", rê chuột xem đủ */
.inv-table td.desc .inv-party { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-table td.mst-cell { text-align: center; white-space: nowrap; }
.inv-table td.mst-cell .inv-mst { font-size: .78rem; color: #6b7c93; }
/* tiêu đề cột: luôn căn giữa phía trên cột (kể cả cột chữ căn trái như tên đối tác, ghi chú) */
.inv-table thead th, .inv-table thead th.l, .bk-table thead th, .bk-table thead th.l { text-align: center; }
/* cột tiền: số căn phải → tiêu đề cũng căn phải, nằm ngay trên các số */
.inv-table thead th.num, .bk-table thead th.n { text-align: right; }
/* phễu nằm trong ô tiêu đề, sát mép phải (cột tiền: sát mép trái); ô chừa đều hai bên nên chữ vẫn đúng giữa cột
   (cột tiền: chữ căn phải, thẳng mép phải các số) và phễu các cột không chồng nhau */
/* tiêu đề + phễu là một khối chữ: phễu đứng ngay sau chữ cuối (xuống dòng thì theo chữ), khối căn giữa cột
   (cột tiền: căn phải, thẳng các số) */
.inv-table thead .cf-h, .bk-table thead .cf-h { display: inline; }
.cf-glue { white-space: nowrap; }
.bk-table thead th { white-space: nowrap; letter-spacing: .02em; vertical-align: middle; }
.inv-table thead .cf-h > .cf-btn, .bk-table thead .cf-h > .cf-btn { display: inline-grid; vertical-align: -5px; margin-left: 3px; width: 18px; height: 18px; }
.cf-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.cf-range span { color: var(--muted); }
.cf-pop input[data-money] { text-align: right; }
.inv-table td.desc { min-width: 0; }
.inv-table .inv-party-row { max-width: none; }
.inv-table td.doc, .inv-table td.files-cell { overflow: hidden; text-overflow: ellipsis; }
.inv-colfilter select, .inv-colfilter .cf-pair select { max-width: 100%; }
.inv-colfilter input[data-day-filter] { min-width: 0; }
.inv-colfilter .cf-pair { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.inv-colfilter .cf-pair.wide { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
.inv-title-actions { display: flex; align-items: center; gap: 8px 12px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.inv-title-actions .inv-pages { margin-left: 0; }
.inv-table td.mst { white-space: nowrap; font-size: .82rem; color: #4a5d75; }
.inv-table td.kind { text-align: center; }
.inv-table td.rate { text-align: center; font-size: .8rem; color: #4a5d75; }
.inv-kind { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; background: #eef3f9; color: #4a5d75; }
.inv-kind.co-ma { background: #e7f6ec; color: #18794e; }
.inv-kind.khong-ma { background: #fff4e0; color: #9a5b00; }
.inv-kind.mtt { background: #eef0ff; color: #3b45b5; }
.inv-kind.tkhq { background: #e3f4f4; color: #0f6b6b; }
.bk-table .inv-kind { font-size: .68rem; padding: 1px 7px; }
.inv-none { text-align: center !important; padding: 28px !important; color: var(--muted); }
.inv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.inv-pages { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.inv-pages .muted { margin-right: 8px; }
.inv-pages a, .inv-pages span.on, .inv-pages span.off, .inv-pages span.gap { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center;
  border-radius: 8px; font-weight: 600; font-size: .88rem; text-decoration: none; }
.inv-pages a { border: 1px solid var(--line); color: var(--navy); background: #fff; }
.inv-pages a:hover { border-color: var(--brand); color: var(--brand); }
.inv-pages span.on { background: var(--brand); color: #fff; }
.inv-pages span.off { color: #b8c2cf; }
.inv-month td:first-child { font-weight: 600; color: var(--navy); }
.inv-month .neg { color: #b42318; }

/* ===== Tờ khai thuế ===== */
.tk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tk-grid.by-month { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tk-cell { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; border-top: 4px solid #c3cfdd; display: grid; gap: 10px; align-content: start; }
.tk-cell header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk-cell header b { font-family: var(--head); color: var(--navy); font-size: 1.02rem; }
.tk-chip { padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: #eef3f9; color: #4a5d75; white-space: nowrap; }
.tk-cell.ok { border-top-color: #22a05b; } .tk-cell.ok .tk-chip { background: #e7f6ec; color: #18794e; }
.tk-cell.late { border-top-color: #e8a33d; } .tk-cell.late .tk-chip { background: #fff3e0; color: #b76e00; }
.tk-cell.missing { border-top-color: var(--red); background: #fffafa; } .tk-cell.missing .tk-chip { background: #fdeceb; color: #b42318; }
.tk-cell.before { opacity: .55; } .tk-cell.before .tk-chip { background: #eef1f5; color: #5d6b7c; }
.tk-cell.open { border-top-color: #e8a33d; background: #fffcf5; } .tk-cell.open .tk-chip { background: #fff3e0; color: #b76e00; }  /* kỳ đang trong hạn nộp */
.tk-cell.none { border-top-color: #c3cfdd; background: #fafbfc; } .tk-cell.none .tk-chip { background: #eef1f5; color: #5d6b7c; }  /* TNCN quý không khấu trừ */
.tk-cell dl { margin: 0; display: grid; gap: 6px; }
.tk-cell dl div { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; }
.tk-cell dt { color: var(--muted); }
.tk-cell dd { margin: 0; font-weight: 600; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }
.tk-cell dd.pay { color: #b42318; }
.tk-check { margin: 0; padding: 6px 10px; border-radius: 8px; font-size: .78rem; font-weight: 600; background: #e7f6ec; color: #18794e; }
.tk-check.bad { background: #fdeceb; color: #b42318; }
.tk-table-wrap + .mini-title { margin-top: 22px; }
/* ===== Tab Tờ khai đã nộp: tổng quan -> chi tiết ===== */
.trx-tools { display: grid; gap: 12px; }
.trx-tools-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.trx-status { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trx-status > div { display: grid; gap: 2px; }
.trx-status b { font-family: var(--head); color: var(--navy); font-size: 1rem; }
.trx-warn { color: #b76e00; font-weight: 700; }
.trx-ok { color: #18794e; font-weight: 700; }
.trx-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trx-actions .btn .icon { width: 16px; height: 16px; }
.trx-actions .on { background: var(--brand-50); }
.trx-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fdeceb; color: #b42318; font-size: .72rem; font-weight: 800; margin-left: 4px; }
.trx-box { border-top: 1px dashed var(--line); padding-top: 12px; margin: 0; }
.trx-box[hidden] { display: none; }
.trx-box-title { margin: 0 0 8px; font-weight: 700; color: var(--navy); font-size: .9rem; }
.trx-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* dải năm */
.trx-years { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.trx-year { position: relative; flex: 0 0 auto; display: grid; gap: 1px; justify-items: center; min-width: 86px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--text); }
.trx-year b { font-family: var(--head); font-size: 1.05rem; color: var(--navy); }
.trx-year span { font-size: .72rem; color: var(--muted); }
.trx-year:hover { border-color: var(--brand); }
.trx-year.on { background: var(--navy); border-color: var(--navy); }
.trx-year.on b, .trx-year.on span { color: #fff; }
.trx-year i { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #e8a33d; }
.trx-year.bad i { background: var(--red); }
/* tóm tắt năm */
.trx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.trx-kpi { background: #fff; border: 1px solid var(--line); border-left: 4px solid #2f7fd1; border-radius: 12px; padding: 12px 16px; display: grid; gap: 3px; }
.trx-kpi span { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.trx-kpi b { font-family: var(--head); font-size: 1.45rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.trx-kpi b small { font-size: .82rem; font-weight: 600; color: var(--muted); margin-left: 3px; }
.trx-kpi em { font-style: normal; font-size: .8rem; color: var(--text-2); }
.trx-kpi.hl { background: var(--navy); border-color: var(--navy); border-left-color: #f5b301; }
.trx-kpi.hl span, .trx-kpi.hl em { color: #cfe0f5; } .trx-kpi.hl b { color: #fff; }
.trx-kpi.bad { border-left-color: var(--red); } .trx-kpi.bad em { color: #b42318; font-weight: 700; }
.trx-kpi.warn { border-left-color: #e8a33d; } .trx-kpi.warn em { color: #b76e00; font-weight: 700; }
/* GTGT theo kỳ + quyết toán năm */
.trx-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.trx-two .tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trx-two .tk-grid.by-month { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-cell dl div.big dt { font-weight: 700; color: var(--text-2); }
.tk-cell dl div.big dd { font-size: 1rem; }
.trx-annual { display: grid; gap: 10px; }
.trx-ann { border: 1px solid var(--line); border-left: 4px solid #c3cfdd; border-radius: 10px; padding: 10px 14px; display: grid; gap: 4px; }
.trx-ann-name { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.trx-ann-name b { color: var(--navy); font-size: .92rem; }
.trx-ann-meta { font-size: .8rem; color: var(--muted); }
.trx-ann-files { display: flex; gap: 6px; margin-top: 2px; }
.trx-ann.ok { border-left-color: #22a05b; } .trx-ann.ok .tk-chip { background: #e7f6ec; color: #18794e; }
.trx-ann.late { border-left-color: #e8a33d; } .trx-ann.late .tk-chip { background: #fff3e0; color: #b76e00; }
.trx-ann.missing { border-left-color: var(--red); background: #fffafa; } .trx-ann.missing .tk-chip { background: #fdeceb; color: #b42318; }
.trx-ann.none .tk-chip, .trx-ann.before .tk-chip { background: #eef1f5; color: #5d6b7c; }
.fbadge.missing-file { background: #fff3e0; color: #b76e00; border: 0; }
/* danh sách hồ sơ */
.trx-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.trx-filter button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.trx-filter button span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.trx-filter button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.trx-filter button.on span { color: #cfe0f5; }
.trx-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.trx-table th { background: #eef3f9; color: var(--navy); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 9px 10px; text-align: center; border-bottom: 1px solid #d3dce8; }
.trx-table th.l, .trx-table td.l { text-align: left; }
.trx-table th.n, .trx-table td.n { text-align: right; }
.trx-table td { padding: 8px 10px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.trx-table td.c { text-align: center; white-space: nowrap; }
.trx-table td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.trx-table td.n b { display: block; color: var(--navy); }
.trx-table td.n b.pay { color: #b42318; }
.trx-table td.n small, .trx-due { display: block; font-size: .72rem; color: var(--muted); }
.trx-due.late { color: #b76e00; font-weight: 700; }
.trx-table tr.supp td { background: #fffcf5; }
.trx-table tbody tr:hover td { background: #f6f9fd; }
.trx-type { font-weight: 600; color: var(--text); }
.trx-type::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; background: #9aa8ba; vertical-align: 1px; }
.trx-type.gtgt::before { background: #2f7fd1; } .trx-type.tncn::before { background: #7b4fd0; } .trx-type.tndn::before { background: #c2410c; }
.trx-type.bctc::before { background: #18794e; }
.trx-note { display: block; margin-left: 15px; font-size: .72rem; }
.trx-del { border: 0; background: none; color: #b8c2cf; font-size: 1.15rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.trx-del:hover { color: #b42318; background: #fdeceb; }
.trx-foot { margin: 12px 0 0; }
@media (max-width: 1100px) { .trx-two, .trx-kpis { grid-template-columns: 1fr 1fr; } .trx-two { grid-template-columns: 1fr; } }
.tk-kind { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--brand-50); color: var(--brand); white-space: nowrap; }
.tk-kind.b { background: #fff3e0; color: #b76e00; }
.lg-table tr.supp td { background: #fffdf8; }
.lg-table td small.late { color: #b76e00; font-weight: 600; }
.lg-table td.files { text-align: center; white-space: nowrap; }
.lg-table td.files a { display: inline-block; margin: 0 3px; font-size: .8rem; font-weight: 600; color: var(--brand); }
.link-btn { border: 0; background: none; padding: 0; color: #b42318; font: 600 .82rem var(--body); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.tk-add .card-title .link-btn { color: var(--muted); }
.tk-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-form > .field:nth-child(2), .tk-form > .field:nth-child(3) { grid-column: span 2; }
.tk-figs { padding: 14px 16px 2px; border-radius: 12px; background: #f6f9fc; margin-bottom: 14px; }
.tk-figs .mini-title { margin: 0 0 10px; }
.tk-figs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 1400px) { .tk-grid.by-month { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Nút MST một khối (đăng xuất nằm trong menu thả xuống) */
.acct-btn { padding: 0 16px; }
.acct-btn::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .8; transition: transform .15s; }
.acct-wrap:hover .acct-btn::after, .acct-wrap:focus-within .acct-btn::after { transform: translateY(1px) rotate(225deg); }
/* Tóm tắt bài trên trang chủ: giữ đúng 2 dòng (flex:1 làm khung giãn, lộ dòng thứ 3); "Đọc tiếp" dồn xuống đáy thẻ */
.news-card p.clamp-2 { flex: 0 0 auto; line-height: 1.6; max-height: 3.2em; }
.news-card .more { margin-top: auto; }
/* Không còn mục menu cạnh logo cho khách: bỏ vạch ngăn, chỉ giữ khi có menu quản lý */
@media (min-width: 1021px) {
  .site-header .container:has(.nav > .link) .brand { border-right: 0; padding-right: 0; }
  .site-header .container:has(.nav > a.link[href^="/quan-ly"]) .brand { border-right: 1px solid var(--line); padding-right: 26px; }
}
/* Thanh tiến trình khi đang chờ máy chủ (đăng nhập / đăng xuất) */
.busy-bar { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--red), var(--gold, #ffc233)); opacity: 0; }
.is-busy .busy-bar { opacity: 1; animation: busyGrow 2.4s cubic-bezier(.1, .7, .3, 1) forwards; }
.is-busy, .is-busy * { cursor: progress !important; }
@keyframes busyGrow { from { width: 0; } to { width: 88%; } }
button[disabled].btn { opacity: .75; }

/* ================= TRANG CHỦ: banner + cổng số liệu, lịch thuế, hỏi đáp ================= */
.home .gold { color: var(--gold); }
.section-sub { margin: 16px auto 0; color: var(--muted); font-size: 1.02rem; max-width: 720px; }

/* --- Mẫu 1: banner + khung mô phỏng cổng số liệu --- */
.hero-v1 { padding: 96px 0 150px; background: linear-gradient(90deg, rgba(8, 32, 66, .96) 0%, rgba(8, 32, 66, .88) 45%, rgba(8, 32, 66, .62) 100%), var(--hero-img) center / cover no-repeat; }
.hero-v1-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); align-items: center; }
.hero-v1 .hero-content { max-width: 680px; }
.hero-v1-visual { position: relative; padding: 24px 0 24px 24px; }
.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--navy); padding: 12px 16px; border-radius: 12px;
              box-shadow: 0 16px 36px rgba(0, 0, 0, .28); font-size: .8rem; line-height: 1.35; }
.float-chip b { display: block; font-family: var(--head); font-size: .9rem; }
.float-chip span { color: var(--muted); }
.float-chip b { color: var(--navy); }
.float-chip > .icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; flex: none; }
.float-chip.chip-a { left: -18px; bottom: -6px; }
.float-chip.chip-a > .icon { background: #e7f6ec; color: #18794e; }
.float-chip.chip-b { right: -10px; top: -4px; }
.float-chip.chip-b > .icon { background: var(--red); color: #fff; }

/* Khung mô phỏng cổng khách hàng */
.mock { position: relative; background: #fff; border-radius: 14px; overflow: hidden; color: var(--text); text-align: left;
        box-shadow: 0 30px 70px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .08); font-size: 13px; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #eef2f7; border-bottom: 1px solid #dde4ee; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #f26b5b; }
.mock-bar i:nth-child(2) { background: #f5b83d; } .mock-bar i:nth-child(3) { background: #3ec26b; }
.mock-bar span { margin-left: 12px; flex: 1; max-width: 260px; padding: 3px 12px; border-radius: 6px; background: #fff; color: #7b8aa0; font-size: 11px; }
.mock-body { display: flex; }
.mock-side { width: 168px; flex: none; padding: 14px 10px; border-right: 1px solid #e6ecf3; display: flex; flex-direction: column; gap: 4px; background: #fbfcfe; }
.mock-co { padding: 4px 8px 12px; margin-bottom: 6px; border-bottom: 1px solid #e6ecf3; }
.mock-co b { display: block; font-size: 11px; color: var(--navy); font-family: var(--head); }
.mock-co small { color: #8a99ad; font-size: 10px; }
.mock-side span { padding: 7px 10px; border-radius: 7px; color: #4a5d75; font-size: 12px; }
.mock-side span.on { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.mock-main { flex: 1; min-width: 0; padding: 16px 18px 18px; display: grid; gap: 14px; }
.mock-head { display: flex; justify-content: space-between; align-items: center; }
.mock-head b { font-family: var(--head); font-size: 16px; color: var(--navy); }
.mock-head span { padding: 3px 10px; border: 1px solid #d3dce8; border-radius: 6px; font-size: 11px; color: #4a5d75; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mock-kpis div { border: 1px solid #e3e9f1; border-top: 3px solid var(--brand); border-radius: 9px; padding: 9px 11px; display: grid; gap: 2px; }
.mock-kpis div:nth-child(3) { border-top-color: var(--gold); }
.mock-kpis small { color: #7b8aa0; font-size: 10.5px; }
.mock-kpis b { font-family: var(--head); font-size: 17px; color: var(--navy); }
.mock-kpis em { font-style: normal; font-size: 10.5px; color: #7b8aa0; }
.mock-kpis em.up { color: #18794e; font-weight: 600; }
.mock-chart { height: 110px; display: flex; align-items: flex-end; gap: 10px; padding: 8px 6px 0; border-bottom: 1px solid #e3e9f1;
              background: repeating-linear-gradient(0deg, transparent 0 26px, #f0f3f8 26px 27px); }
.mock-chart span { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 3px; }
.mock-chart i { flex: 1; height: var(--a); background: var(--brand); border-radius: 3px 3px 0 0; }
.mock-chart i + i { height: var(--b); background: #f08a4b; }
.mock-rows { display: grid; gap: 6px; }
.mock-rows div { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #f6f9fc; color: #4a5d75; font-size: 11.5px; }
.mock-rows b { margin-left: auto; color: #18794e; font-size: 11px; white-space: nowrap; }
.mock-rows div:nth-child(3) b { color: var(--red); }
.mock-rows .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.mock-rows .dot.ok { background: #22a05b; } .mock-rows .dot.warn { background: var(--gold); }
.mock-tag { position: absolute; right: 12px; bottom: 10px; font-size: 10px; color: #9aa8ba; letter-spacing: .04em; }
.mock-compact .mock-rows div { font-size: 11px; }

/* --- Lịch nộp thuế sắp tới --- */
.deadlines { padding-top: 96px; }
.dl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dl-card { display: flex; gap: 18px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
           border-left: 5px solid var(--brand); transition: transform .15s, box-shadow .15s; }
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dl-card.near { border-left-color: var(--gold); }
.dl-card.soon { border-left-color: var(--red); }
.dl-date { flex: none; width: 78px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 6px; text-align: center; }
.dl-date b { font-family: var(--head); font-size: 2rem; line-height: 1; }
.dl-date span { font-size: .78rem; font-weight: 600; margin-top: 4px; color: var(--gold); }
.dl-date small { font-size: .7rem; color: #b9cbe0; }
.dl-card.soon .dl-date { background: var(--red); } .dl-card.soon .dl-date span { color: #fff; }
.dl-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dl-info h3 { font-size: 1rem; margin: 0; line-height: 1.4; color: var(--navy); }
.dl-info p { margin: 0; font-size: .86rem; color: var(--muted); }
.dl-left { align-self: flex-start; margin-top: 6px; padding: 3px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: .78rem; font-weight: 700; }
.dl-card.near .dl-left { background: #fff3e0; color: #b76e00; }
.dl-card.soon .dl-left { background: var(--red-50); color: var(--red); }
.dl-shift { font-size: .74rem; color: #8a99ad; }
.dl-note { margin: 22px 0 0; text-align: center; font-size: .82rem; color: var(--muted); }

/* --- Giới thiệu cổng khách hàng --- */
.portal-sec { padding: 100px 0; color: #fff; background: radial-gradient(900px 500px at 90% 10%, #164a86 0%, transparent 60%), linear-gradient(135deg, #071f3f, #0a2a52); }
.portal-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(40px, 5vw, 96px); align-items: center; }
.portal-sec .kicker { color: var(--gold); }
.portal-sec h2 { color: #fff; margin-bottom: 16px; }
.portal-lead { color: #c9d6e6; font-size: 1.05rem; margin: 0 0 28px; max-width: 640px; }
.portal-feats { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.portal-feats li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; font-size: .88rem; color: #b9cbe0; line-height: 1.5; }
.portal-feats li > span { grid-row: span 2; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 194, 51, .14); color: var(--gold); }
.portal-feats li > span .icon { width: 21px; height: 21px; }
.portal-feats b { color: #fff; font-family: var(--head); font-size: .95rem; }
.portal-visual .mock { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transition: transform .4s; }
.portal-visual .mock:hover { transform: none; }

/* --- Câu hỏi thường gặp --- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(40px, 5vw, 96px); align-items: start; }
.faq-side { position: sticky; top: 110px; }
.faq-side h2 { margin-bottom: 14px; }
.faq-lead { color: var(--muted); margin: 0 0 24px; }
.faq-contact { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.faq-contact small { display: block; color: var(--muted); font-size: .78rem; }
.faq-contact a { font-family: var(--head); font-weight: 700; color: var(--navy); text-decoration: none; font-size: 1.05rem; overflow-wrap: anywhere; }
.faq-contact a:hover { color: var(--red); }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--brand-100); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 22px; font-family: var(--head); font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-n { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: .85rem; }
.faq-item[open] .faq-n { background: var(--red); color: #fff; }
.faq-item summary i { margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); position: relative; }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; background: var(--brand); transform: translate(-50%, -50%); }
.faq-item summary i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s; }
.faq-item[open] summary i::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item p { margin: 0; padding: 0 22px 22px 76px; color: var(--text-2); line-height: 1.7; }
/* Mẫu 1: nhãn nổi không che khung số liệu */
.hero-v1-visual { padding-bottom: 48px; }
.float-chip.chip-a { left: -22px; bottom: -4px; }
.mock-tag { top: 9px; bottom: auto; right: 14px; }

/* --- Về chúng tôi (bản mới): ảnh khác banner, thẻ thông tin thật, dải điểm nổi bật --- */
.about2 { align-items: center; }
.about2 .about-media { padding: 0 0 46px; }
.about2 .about-media::before { display: none; }
.about2 .about-media::after { content: ""; position: absolute; top: -18px; left: -18px; width: 140px; height: 140px; border-top: 4px solid var(--gold); border-left: 4px solid var(--gold); border-radius: 22px 0 0 0; }
.about2 .about-media img { aspect-ratio: 5 / 4; object-fit: cover; border-radius: 20px; }
.about-card { position: absolute; left: 28px; right: 28px; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--navy); color: #fff;
              border-radius: 14px; box-shadow: 0 18px 40px rgba(10, 42, 82, .3); }
.about-card .ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 194, 51, .15); color: var(--gold); }
.about-card .ico .icon { width: 20px; height: 20px; }
.about-card small { display: block; font-size: .74rem; color: #9fb4cc; text-transform: uppercase; letter-spacing: .05em; }
.about-card b { font-family: var(--head); font-size: .95rem; }
.about-card .sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .15); margin: 0 6px; }
.about2 h2 { text-wrap: balance; }
.about-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 30px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.about-facts div { padding: 16px 18px; display: grid; gap: 2px; border-top: 3px solid var(--red); }
.about-facts div + div { border-left: 1px solid var(--line); }
.about-facts div:nth-child(2) { border-top-color: var(--brand); }
.about-facts div:nth-child(3) { border-top-color: var(--gold); }
.about-facts b { font-family: var(--head); font-size: 1.15rem; color: var(--navy); }
.about-facts span { font-size: .86rem; color: var(--muted); }
.about2 .about-list { margin: 22px 0 26px; }
.about-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.about-call { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.about-call .ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--red-50); color: var(--red); transition: background .2s, color .2s; }
.about-call .ico .icon { width: 20px; height: 20px; }
.about-call small { display: block; font-size: .78rem; color: var(--muted); }
.about-call b { font-family: var(--head); font-size: 1.1rem; color: var(--navy); }
.about-call:hover .ico { background: var(--red); color: #fff; }
.nowrap { white-space: nowrap; }
.about2 .about-media::after { top: -14px; left: -14px; }

/* --- Dịch vụ (bản mới): tiêu đề 2 cột, thẻ có số thứ tự, gạch màu, danh sách việc chính, hover nền xanh đậm --- */
.svc-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(40px, 6vw, 120px); align-items: end; margin-bottom: 44px; }
.svc-head h2 { margin-bottom: 16px; text-wrap: balance; }
.svc-head .title-bar { margin: 0; }
.svc-head-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-left: 28px; border-left: 3px solid var(--gold); }
.svc-head-side p { margin: 0; color: var(--text-2); font-size: 1.04rem; max-width: 560px; }
.svc2 { gap: 24px; }
.svc2 .service-card { position: relative; overflow: hidden; padding: 30px 30px 28px; border: 1px solid var(--line); border-bottom: 0; border-top: 4px solid var(--red);
                      box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, background .3s, color .3s; isolation: isolate; }
.svc2 .service-card:nth-child(3n+2) { border-top-color: var(--brand); }
.svc2 .service-card:nth-child(3n+3) { border-top-color: var(--gold); }
.svc2 .service-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, #0a2a52 0%, #123f75 100%); opacity: 0; transition: opacity .3s; }
.svc-num { position: absolute; top: 18px; right: 24px; font-family: var(--head); font-weight: 800; font-size: 3rem; line-height: 1; color: #e9eff7; transition: color .3s; }
.svc2 .s-ico { border-radius: 14px; box-shadow: 0 10px 20px rgba(38, 101, 166, .25); transition: background .3s, color .3s; }
.svc2 .service-card h3 { font-size: 1.18rem; margin-bottom: 8px; transition: color .3s; }
.svc2 .service-card p { flex: none; margin-bottom: 16px; transition: color .3s; }
.svc-points { list-style: none; margin: 0 0 22px; padding: 16px 0 0; border-top: 1px dashed #d6e0ec; display: grid; gap: 9px; flex: 1; align-content: start; transition: border-color .3s; }
.svc-points li { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; color: var(--text-2); transition: color .3s; }
.svc-points .icon { width: 17px; height: 17px; flex: none; margin-top: 2px; padding: 2px; border-radius: 50%; background: var(--ok-50); color: var(--ok); transition: background .3s, color .3s; }
.svc2 .service-card .more { transition: color .3s; }
.svc2 .service-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(10, 42, 82, .25); color: #fff; }
.svc2 .service-card:hover::before { opacity: 1; }
.svc2 .service-card:hover .svc-num { color: rgba(255, 194, 51, .22); }
.svc2 .service-card:hover h3 { color: #fff; }
.svc2 .service-card:hover p, .svc2 .service-card:hover .svc-points li { color: #c9d6e6; }
.svc2 .service-card:hover .svc-points { border-top-color: rgba(255, 255, 255, .18); }
.svc2 .service-card:hover .svc-points .icon { background: rgba(255, 194, 51, .18); color: var(--gold); }
.svc2 .service-card:hover .s-ico { background: var(--gold); color: var(--navy); }
.svc2 .service-card:hover .more { color: var(--gold); }

/* --- Quy trình (bản mới): dòng thời gian 4 bước, ghi rõ ai làm --- */
.process { padding: 100px 0; background: linear-gradient(180deg, rgba(7, 31, 63, .94), rgba(10, 42, 82, .9)), var(--bg-img) center / cover no-repeat; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 40px; left: 12.5%; right: 12.5%; height: 2px;
                    background: repeating-linear-gradient(90deg, rgba(255, 194, 51, .7) 0 10px, transparent 10px 18px); }
.tl-step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tl-dot { position: relative; z-index: 1; width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 22px;
          background: var(--navy); border: 2px solid rgba(255, 194, 51, .7); box-shadow: 0 0 0 8px rgba(255, 194, 51, .08); transition: transform .25s, background .25s; }
.tl-ico .icon { width: 32px; height: 32px; color: var(--gold); transition: color .25s; }
.tl-dot b { position: absolute; top: -6px; right: -8px; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 16px; display: grid; place-items: center;
            background: var(--red); color: #fff; font-family: var(--head); font-size: .82rem; box-shadow: 0 6px 14px rgba(224, 16, 32, .4); }
.tl-card { flex: 1; width: 100%; padding: 24px 22px 26px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .13);
           backdrop-filter: blur(4px); transition: background .25s, border-color .25s, transform .25s; }
.tl-who { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 12px; }
.tl-who.you { background: rgba(255, 194, 51, .16); color: var(--gold); }
.tl-who.us { background: rgba(255, 255, 255, .12); color: #fff; }
.tl-card h3 { color: #fff; font-size: 1.12rem; margin: 0 0 10px; }
.tl-card p { color: #c9d6e6; font-size: .95rem; margin: 0; line-height: 1.6; }
.tl-step:hover .tl-dot { transform: translateY(-4px); background: var(--gold); }
.tl-step:hover .tl-ico .icon { color: var(--navy); }
.tl-step:hover .tl-card { background: rgba(255, 255, 255, .1); border-color: rgba(255, 194, 51, .45); transform: translateY(-4px); }
.tl-cta { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 36px; border-top: 1px solid rgba(255, 255, 255, .12); }
.tl-cta p { margin: 0; color: #dbe6f3; font-size: 1.08rem; }
/* Chat phía khách: logo Kế toán Hà Thành thay chữ viết tắt */
.chat-avatar.logo { background: #fff; box-shadow: 0 0 0 2px rgba(255, 194, 51, .85); }
.chat-avatar.logo img { width: 26px; height: auto; }
/* logo công ty khách trong danh sách tin nhắn / bong bóng chat (thay chữ viết tắt) */
img.inbox-av.inbox-logo { background: #fff; object-fit: contain; padding: 3px; box-sizing: border-box; border: 1px solid var(--line); }
.chat-avatar.co-logo img { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; }
.chat-float .chat-msg.them .chat-from { display: flex; align-items: center; gap: 6px; }
.chat-float .chat-msg.them .chat-from::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1px solid #e3e9f1;
                                                 background: #fff url("img/logo-icon.e82bd9070ed2.png") center / 11px auto no-repeat; }
.chat-float .chat-msg.has-av .chat-from::before { display: none; }  /* đã có ảnh đại diện cạnh tin */
/* Ảnh người gửi cạnh tin nhắn (khách: logo công ty; kế toán: chữ viết tắt; quản lý: logo KTHT) */
.chat-msg.has-av { flex-direction: row; align-items: flex-start; gap: 8px; max-width: 88%; }
.chat-msg.has-av.me { flex-direction: row-reverse; }
.chat-col { display: flex; flex-direction: column; min-width: 0; }
.chat-msg.me .chat-col { align-items: flex-end; }
.chat-msg.them .chat-col { align-items: flex-start; }
.chat-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; font: 700 .7rem var(--head); }
.chat-msg.them .chat-av:not(.blank) { margin-top: 18px; }  /* ngang với bong bóng (dưới tên người gửi) */
.chat-av.staff { background: linear-gradient(135deg, #2f7fd1, #1d4f91); }
.chat-av.co, .chat-av.kt { background: #fff; border: 1px solid #e3e9f1; }
.chat-av.co { color: var(--navy); }
.chat-av img { width: 100%; height: 100%; object-fit: contain; padding: 3px; box-sizing: border-box; }
.chat-av.kt img { padding: 5px 6px; }
.chat-av.blank { visibility: hidden; height: 0; }
/* "đang soạn tin…" của bên kia: ba chấm nhấp nháy cuối khung chat */
.chat-typing { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px;
  border-radius: 16px; border-bottom-left-radius: 5px; background: #fff; border: 1px solid #e3eaf3; color: #8a99ad; font-size: .78rem; }
.chat-typing-dots { display: inline-flex; gap: 3px; }
.chat-typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9fb0c6; animation: chat-typing 1.2s infinite ease-in-out; }
.chat-typing-dots i:nth-child(2) { animation-delay: .15s; }
.chat-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ===== Bong bóng "Tin nhắn khách hàng" cho kế toán ===== */
.chat-dock .chat-fab { background: linear-gradient(135deg, var(--red), #b80d1a); box-shadow: 0 12px 30px rgba(224, 16, 32, .35); }
.chat-dock .chat-badge { background: var(--gold); color: var(--navy); }
.chat-dock .chat-panel { width: 400px; }
.chat-dock .chat-head { gap: 8px; }
.chat-dock .chat-avatar:not(.logo) { font-size: .8rem; }
.chat-dock a.chat-min { text-decoration: none; }
.chat-dock .chat-min .icon { width: 18px; height: 18px; }
.dock-back[hidden] { display: none; }
.dock-list { flex: 1; overflow-y: auto; padding: 8px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.dock-list[hidden], .dock-conv[hidden] { display: none; }
.dock-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.dock-item:hover { background: #f4f7fb; }
.dock-item.unread { background: #fff7f7; }
.dock-item.unread .inbox-top b { font-weight: 800; }
.dock-item.unread .inbox-prev { color: var(--navy); font-weight: 600; }
/* Hồ sơ hằng tháng: bảng tiến độ cả năm + 4 ô tài liệu của tháng đang chọn */
.card.mo-detail { margin: 0; }
.mo-yr { display: inline-flex; align-items: center; gap: 6px; }
.mo-yr b { font-family: var(--head); color: var(--navy); font-size: 1.05rem; }
.mo-yr a { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--brand); text-decoration: none; font-weight: 700; }
.mo-yr a:hover { background: #eef3f9; }
/* ô trạng thái dùng chung */
.mo-c { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; font-size: .86rem; text-decoration: none;
  background: #f1f4f8; color: #b5c0ce; }
.mo-c.ok { background: #e7f6ec; color: #18794e; }
.mo-c.warn { background: #fff4dc; color: #b76e00; }
.mo-c.bad { background: #fdeceb; color: #b42318; }
.mo-c.info { background: #e8f1fc; color: #1d5fae; }
.mo-c.fut { background: repeating-linear-gradient(45deg, #f4f6f9, #f4f6f9 4px, #fff 4px, #fff 8px); }
a.mo-c:hover { box-shadow: 0 0 0 2px var(--brand); }
.mo-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
.mo-legend .mo-c { width: 20px; height: 20px; font-size: .7rem; margin-left: 8px; }
/* bảng tiến độ cả năm (loại tài liệu × T1–T12) */
.card.mo-grid-card { margin: 0 0 16px; padding: 14px 18px; }
.mo-grid { width: 100%; border-collapse: separate; border-spacing: 0; }
.mo-grid th, .mo-grid td { text-align: center; padding: 5px 2px; }
.mo-grid th.l { text-align: left; padding-right: 14px; white-space: nowrap; font-size: .86rem; color: var(--navy); font-weight: 600; }
.mo-grid tbody th.l { text-transform: none; letter-spacing: 0; background: none; border-bottom: 0; }
.mo-grid thead th { background: none; text-transform: none; letter-spacing: 0; border-bottom: 1px solid #edf1f6; }
.mo-grid td { border-bottom: 0; }
.mo-grid thead th { font-size: .82rem; color: var(--muted); font-weight: 700; padding-bottom: 8px; }
.mo-grid thead th a { color: var(--navy); text-decoration: none; display: inline-block; padding: 3px 8px; border-radius: 6px; }
.mo-grid thead th a:hover { background: #eef3f9; }
.mo-grid thead th.fut { color: #c3cfdd; }
.mo-grid .sel { background: #eef4fb; }
.mo-grid thead th.sel { border-radius: 10px 10px 0 0; }
.mo-grid thead th.sel a { color: #fff; background: var(--navy); }
.mo-grid tr:last-child td.sel { border-radius: 0 0 10px 10px; }
.mo-grid tr.mo-bctc th, .mo-grid tr.mo-bctc td { border-top: 1px dashed var(--line); padding-top: 9px; }
.mo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.mo-head h2 { margin: 0; }
.mo-head p { margin: 0; }
.mo-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mo-status form { margin: 0; display: flex; align-items: center; gap: 8px; }
.mo-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1250px) { .mo-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mo-slot { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-top: 4px solid #c3cfdd;
  border-radius: 12px; background: #fff; min-width: 0; }
.mo-slot.has { border-top-color: #22a05b; }
.mo-slot.need { border-top-color: #e8a33d; background: #fffdf7; }
.mo-slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mo-slot-head b { color: var(--navy); font-size: .98rem; }
.mo-slot-desc { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.mo-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mo-files li { display: grid; gap: 1px; padding: 7px 9px; border-radius: 8px; background: #f4f7fb; position: relative; }
.mo-files a { display: flex; align-items: center; gap: 6px; color: var(--navy); font-weight: 600; font-size: .84rem; text-decoration: none; min-width: 0; }
.mo-files a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-files a svg { flex: none; width: 15px; height: 15px; color: var(--brand); }
.mo-files a:hover span { text-decoration: underline; }
.mo-files small { font-size: .72rem; color: var(--muted); }
.mo-files .new-tag { position: absolute; top: 6px; right: 8px; }
.mo-up { margin: auto 0 0; display: grid; gap: 8px; }
.mo-pick { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border: 1.5px dashed #b9c8da; border-radius: 10px;
  color: var(--brand); font-weight: 600; font-size: .84rem; cursor: pointer; text-align: center; background: #f8fafd; min-width: 0; }
.mo-pick:hover { border-color: var(--brand); background: #eef4fb; }
.mo-pick input { display: none; }
.mo-pick svg { flex: none; width: 16px; height: 16px; }
.mo-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-up.picked .mo-pick { border-style: solid; color: var(--navy); }
.mo-up-more { display: flex; gap: 6px; }
.mo-up-more[hidden] { display: none; }
.mo-up-more input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .82rem; }
.mo-foot { margin: 14px 0 0; }
/* File gộp nhiều tháng / nhiều loại */
.mo-bundle { margin: 0 0 16px; padding: 16px 18px; border: 1px solid #cfe0f5; border-radius: 12px; background: #f5f9fe; display: grid; gap: 14px; }
.mo-bundle[hidden] { display: none; }
.mo-b-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #dbe7f5; }
.mo-b-title b { color: var(--navy); font-size: 1rem; }
.mo-b-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.mo-b-step > div { display: grid; gap: 8px; min-width: 0; }
.mo-b-step b { color: var(--navy); font-size: .92rem; }
.mo-b-step .mo-pick { justify-content: flex-start; max-width: 460px; background: #fff; }
.mo-bundle.picked .mo-pick { border-style: solid; color: var(--navy); }
.mo-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.mo-checks label { cursor: pointer; position: relative; }
.mo-checks input { position: absolute; opacity: 0; pointer-events: none; }
.mo-checks span { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.mo-checks input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.mo-checks input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.mo-b-foot { display: flex; gap: 8px; align-items: center; padding-left: 36px; }
.mo-b-foot input { flex: 1; max-width: 420px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .84rem; }
.mo-b-hint { margin: 0; padding-left: 36px; }
.mo-gop { display: inline-block; padding: 0 6px; border-radius: 999px; background: #e8f1fc; color: #1d5fae; font-weight: 700; font-size: .66rem; line-height: 16px; }
.mo-gop-of { color: #1d5fae !important; }
/* Tờ khai: chấm ở ô "Hồ sơ năm" khi có tờ khai TNCN cần bổ sung file – bấm hiện lưu ý */
.trx-kpi.has-note { position: relative; cursor: pointer; }
.trx-kpi.has-note:hover { border-color: #e8a33d; }
.trx-kpi-dot { position: absolute; top: 10px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #e8a33d;
  box-shadow: 0 0 0 3px rgba(232, 163, 61, .25); }
.trx-note { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: #fff8e6; border: 1px solid #f5d48a;
  font-size: .84rem; color: #7a5c20; line-height: 1.55; }
.trx-note b { color: #7a4b00; }
/* Tài khoản cổng thuế: "chưa có tài khoản hóa đơn điện tử" */
.cred-noacc { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 12px; padding: 10px 12px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f5d48a; font-size: .86rem; color: #7a4b00; cursor: pointer; }
.cred-noacc[hidden], [data-acc-fields][hidden] { display: none; }
.cred-noacc input { margin-top: 3px; }
.cred-noacc.one-line { align-items: center; white-space: nowrap; }
.cred-noacc.one-line input { margin-top: 0; }
.cred-line.cred-none { background: #fffaf0; }
.coinfo-hint { display: block; margin-top: 4px; }
#coinfo-modal input:disabled { background: #f1f4f8; color: var(--muted); }
/* Thùng rác (admin) */
.card.tr-card { margin: 0; }
.tr-tools { min-height: 36px; }
.tr-acts { display: flex; align-items: center; gap: 14px; }
.tr-acts[hidden] { display: none; }
.tr-label { font-size: .86rem; color: var(--text-2); }
.tr-one { text-align: right; }
.tr-one .btn, .tr-card td.small { white-space: nowrap; }
.wb-kpis.sync-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.side-badge[hidden], .nav-badge[hidden] { display: none !important; }
/* Thông báo trượt "đăng ký mới" (bong bóng tin nhắn) */
.dock-toast.signup { text-decoration: none; color: inherit; }
.dock-toast.signup .inbox-av { background: linear-gradient(135deg, #e8a33d, #b76e00); }
.hs-staff td:nth-child(2) { text-align: center; }
.card.empty.book-empty { padding: 44px 24px; display: grid; justify-items: center; gap: 8px; }
.book-empty b { color: var(--navy); font-size: 1.05rem; }
.book-empty p { margin: 0; max-width: 560px; color: var(--text-2); }
/* Tổng quan: bảng công ty gọn hơn (gộp TNCN vào cột tờ khai), lọc theo ô rủi ro */
.hs-cos .wb-co { min-width: 190px; }
.hs-cos small.hs-tncn { display: block; margin-top: 3px; font-size: .72rem; color: var(--muted); }
.hs-unassigned { color: #b42318; font-weight: 700; }
.wb-kpi.on { box-shadow: 0 0 0 2px var(--navy); }
.hs-nores { text-align: center; padding: 12px 0 0; margin: 0; }
.wb-table-card .card-title .link-btn { margin-left: 8px; }
/* Tổng quan của admin: bảng Nhân viên hôm nay */
.hs-staff td { vertical-align: middle; }
.hs-who { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.hs-who .as-av { width: 38px; height: 38px; font-size: .9rem; }
.hs-who div { display: grid; }
.hs-who b { color: var(--navy); }
.hs-who small { color: var(--muted); font-size: .76rem; }
.hs-n { font: 800 1.1rem var(--head); color: var(--navy); }
.hs-staff .wb-under { display: block; max-width: 220px; white-space: normal; }
.hs-chat { white-space: nowrap; }
.hs-chat span { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; line-height: 17px; text-align: center; }
.hs-staff tr.hs-none td { background: #fff8f7; }
.hs-none-av.as-av { background: linear-gradient(135deg, #e01020, #8c0a14); }
.dock-tag { flex: none; font-style: normal; padding: 0 7px; border-radius: 999px; background: #f1e9fb; color: #5a2d9c; font: 700 .64rem/17px var(--body); text-transform: uppercase; letter-spacing: .03em; }
.chat-avatar.av-ql { background: linear-gradient(135deg, #e01020, #8c0a14); color: #fff; }
.chat-avatar.av-nv { background: linear-gradient(135deg, #9b6ad8, #5a2d9c); color: #fff; }
.dock-notify { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 6px; padding: 10px 12px; border: 1px dashed #b9c9dc; border-radius: 10px;
               background: var(--brand-50); color: var(--brand); font: 600 .82rem var(--body); cursor: pointer; text-align: left; }
.dock-notify[hidden] { display: none; }
.dock-notify .icon { width: 17px; height: 17px; flex: none; }
.dock-notify:hover { background: #e2eefb; }
.dock-empty { margin: auto; padding: 30px 20px; text-align: center; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.dock-empty[hidden] { display: none; }
.dock-conv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dock-toasts { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.dock-toast { display: flex; align-items: center; gap: 12px; width: 340px; padding: 12px 14px; border: 0; border-left: 4px solid var(--red); border-radius: 12px; background: #fff;
              box-shadow: 0 16px 40px rgba(10, 42, 82, .28); cursor: pointer; text-align: left; font: inherit; color: inherit; animation: toastIn .35s ease-out; transition: opacity .35s, transform .35s; }
.dock-toast.out { opacity: 0; transform: translateX(30px); }
.dock-toast:hover { background: #fffafa; }
.dock-toast-body { display: grid; min-width: 0; gap: 1px; }
.dock-toast-body small { font-size: .72rem; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dock-toast-body b { font-family: var(--head); font-size: .86rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-toast-body span { font-size: .84rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.chat-dock.is-open .dock-toasts { display: none; }

/* ===== Trang quản lý một công ty (kế toán) ===== */
.sc-page { padding-top: 34px; }
.sc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 32px; flex-wrap: wrap; padding: 26px 30px; margin-bottom: 30px;
           background: linear-gradient(135deg, #071f3f, #0d3466); border-radius: var(--radius-lg); color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.sc-head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 2px solid rgba(255, 194, 51, .25); }
.sc-id { min-width: 0; position: relative; z-index: 1; }
.crumbs.dark, .crumbs.dark a { color: #b9cbe0; }
.crumbs.dark a:hover { color: #fff; }
.sc-head h1 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 8px 0 10px; line-height: 1.25; }
.sc-head p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: #c9d6e6; font-size: .9rem; }
.sc-head p span { display: inline-flex; align-items: center; gap: 7px; }
.sc-head p .icon { width: 15px; height: 15px; color: var(--gold); }
.sc-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.sc-actions .btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.sc-actions .btn-primary:hover { background: #ffd060; }
.sc-actions .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .45); background: transparent; }
.sc-actions .btn-outline:hover { background: rgba(255, 255, 255, .1); }
.sc-section-title { font-size: 1.05rem; margin: 0 0 14px; color: var(--navy); }
.sc-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 34px; }
.sc-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
           border-top: 4px solid #c3cfdd; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.sc-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.sc-tile.ok { border-top-color: #22a05b; } .sc-tile.warn { border-top-color: var(--gold); } .sc-tile.bad { border-top-color: var(--red); }
.sc-tile.bad { background: #fffafa; }
.sc-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 8px; }
.sc-tile.bad .sc-ico { background: var(--red-50); color: var(--red); }
.sc-ico .icon { width: 20px; height: 20px; }
.sc-tile b { font-family: var(--head); font-size: .98rem; color: var(--navy); }
.sc-tile span { font-size: .86rem; color: var(--text-2); line-height: 1.45; }
.sc-tile strong { color: var(--navy); }
.sc-tile.bad strong { color: var(--red); }
.sc-tile small { margin-top: auto; padding-top: 6px; font-size: .76rem; color: var(--muted); }
.sc-tabs { display: flex; gap: 6px; padding: 6px; margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); width: fit-content; max-width: 100%; }
.sc-tabs button { display: inline-flex; align-items: center; gap: 9px; padding: 11px 22px; border: 0; border-radius: 10px; background: none; cursor: pointer;
                  font: 700 .95rem var(--head); color: var(--navy); }
.sc-tabs button .icon { width: 18px; height: 18px; color: var(--brand); }
.sc-tabs button:hover { background: var(--brand-50); }
.sc-tabs button.on { background: var(--brand); color: #fff; }
.sc-tabs button.on .icon { color: #fff; }
.sc-panel[hidden] { display: none; }
.sc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
#bao-cao .sc-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.sc-intro { margin: 0 0 18px; color: var(--text-2); max-width: 900px; }
.sc-steps { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 12px; }
.sc-steps li { counter-increment: st; position: relative; padding-left: 42px; color: var(--text-2); line-height: 1.55; }
.sc-steps li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
                       background: var(--navy); color: var(--gold); font: 800 .85rem var(--head); }
.sc-upload { display: grid; gap: 12px; }
.sc-drop { max-width: none; height: 64px; justify-content: center; font-size: .95rem; }
.sc-drop span { display: inline-flex; align-items: center; gap: 8px; }
.sc-drop .icon { width: 20px; height: 20px; }
.sc-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sc-member:last-child { border-bottom: 0; }
.sc-member div { display: grid; }
.sc-member small { color: var(--muted); font-size: .82rem; }
.sc-member > small { grid-column: 2 / -1; }
@media (max-width: 1400px) { .sc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nav-badge[hidden] { display: none; }

/* Hóa đơn: hướng dẫn tải từ cổng + nhãn file gốc */
.inv-how { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); font-size: .88rem; line-height: 1.5; max-width: 900px; }
.inv-how a { font-weight: 600; }
.lg-table td.files-cell { text-align: center; white-space: nowrap; }
.fbadge { display: inline-block; margin: 1px 2px; padding: 2px 8px; border-radius: 6px; font: 700 .72rem/1.5 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.fbadge.pdf { background: #fdecee; color: #b4232c; }
.fbadge.xml { background: #eef5fc; color: var(--brand); }
.fbadge.view { background: var(--brand); color: #fff; }
.fbadge.noxml { background: #f1f4f8; color: #7a8899; font-weight: 600; cursor: help; }
.fbadge.add { background: #fff; border-color: #d3dce8; color: var(--muted); }
.fbadge.add:hover { border-color: var(--brand); color: var(--brand); }
.fbadge.add.missing { border-style: dashed; border-color: var(--gold); color: #b76e00; background: #fffaf0; }
/* Danh sách hóa đơn – cột File gốc: nút có chữ Xem / PDF / Gốc (tra cứu tại nhà cung cấp) + ⋯ (tải XML) + đính kèm;
   ô trống (fb-gap) giữ chỗ để các nút thẳng cột */
.fb-row { display: inline-flex; align-items: center; gap: 4px; }
.fb { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 13px;
  border: 1px solid transparent; font: 700 .74rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.fb svg { width: 15px; height: 15px; flex: none; }
.fb.view, .fb.pdf, .fb.goc { width: 32px; padding: 0; }  /* chỉ icon, chữ ở title */
.fb.view { background: #e6f0fb; color: var(--brand); }
.fb.pdf { background: #fde8ea; color: #b4232c; }
.fb.goc { background: #fff3cf; color: #8a5a00; border-color: #f3cf6a; }
.fb.view:hover { background: #d6e6f8; } .fb.pdf:hover { background: #fbd9dd; } .fb.goc:hover { background: #ffe9a8; }
.fb-gap { display: inline-block; width: 32px; }
.fb-gap.sm { width: 24px; }
.fb.more { width: 24px; padding: 0; color: #8a99ad; }
.fb.more:hover, .fmore[open] > .fb.more { background: #eef3f9; color: var(--brand); }
.inv-table .fb-row .fbadge { margin: 0; height: 24px; display: inline-flex; align-items: center; border-radius: 13px; padding: 0 9px; }
.inv-table .fb-row .fbadge.add { min-width: 24px; justify-content: center; padding: 0 7px; }
.fmore { display: inline-block; }
.fmore > summary { list-style: none; }
.fmore > summary::-webkit-details-marker { display: none; }
.fbadge.more:hover, .fmore[open] > .fbadge.more { border-color: var(--brand); color: var(--brand); }
.fmore-pop { position: fixed; z-index: 1000; min-width: 190px; padding: 4px; background: #fff; border: 1px solid #d3dce8;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(20,40,70,.18); }
.fmore-pop a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: .82rem; font-weight: 600;
  text-align: left; text-decoration: none; white-space: nowrap; }
.fmore-pop a:hover { background: #eef5fc; color: var(--brand); }
/* dòng nổi báo đã chép mã tra cứu (nút Gốc của trang không tự điền mã) */
#fb-toast { position: fixed; left: 50%; bottom: 28px; z-index: 1100; max-width: min(640px, calc(100% - 32px)); transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 10px; background: #1b2a3d; color: #fff; font-weight: 600; font-size: .88rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#fb-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Tài khoản ủy quyền cho kế toán (hoadondientu / thuedientu / trang khác) */
.cred-lock { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #e7f6ec; color: #18794e; font-size: .76rem; font-weight: 700; }
.cred-lock .icon { width: 14px; height: 14px; }
.cred-intro { margin: -6px 0 18px; max-width: 900px; }
.cred-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cred-card { border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 14px; padding: 18px 20px; background: #fff; display: grid; gap: 4px; }
.cred-card.saved { border-top-color: #22a05b; }
.cred-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cred-card header > div { flex: 1; min-width: 0; display: grid; }
.cred-card header b { font-family: var(--head); color: var(--navy); }
.cred-card header a { font-size: .8rem; }
.cred-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.cred-ico .icon { width: 20px; height: 20px; }
.cred-card .field { margin-bottom: 10px; }
.cred-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--text-2); line-height: 1.45; margin: 2px 0 12px; }
.cred-consent input { margin-top: 2px; accent-color: var(--brand); }
.cred-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cred-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cred-row:last-child { border-bottom: 0; }
.cred-row-act { display: flex; align-items: center; gap: 12px; flex: none; }
.cred-row-act form { margin: 0; }
/* mục Tài khoản của kế toán: thông tin công ty + tài khoản ủy quyền */
.sa-info { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 18px 28px; align-items: start; margin-bottom: 24px;
  border-top: 4px solid var(--brand); }
.sa-head { display: flex; gap: 14px; align-items: center; }
.sa-facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; border-left: 1px solid var(--line); padding-left: 24px; }
.sa-facts .wide { grid-column: 1 / -1; }
.sa-facts dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sa-facts dd { margin: 3px 0 0; font-weight: 600; color: var(--navy); }
#cong-thue.card { margin-bottom: 24px; }
#cong-thue .card-title .btn { margin-left: auto; }
.sa-fail { color: #9a5b00; background: #fff4dc; border-radius: 6px; padding: 3px 8px; font-size: .84rem; width: fit-content; }
.coinfo-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
.coinfo-logo { display: flex; align-items: center; gap: 10px; }
.coinfo-logo img { border-radius: 8px; border: 1px solid var(--line); object-fit: contain; }
@media (max-width: 960px) { .sa-info { grid-template-columns: 1fr; } .sa-facts { grid-template-columns: 1fr 1fr; border-left: 0; padding-left: 0; } }
.cred-row-main { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: .9rem; }
.cred-row-main b { font-family: var(--head); color: var(--navy); font-size: .92rem; }
.cred-row-main code { padding: 1px 8px; border-radius: 6px; background: #f2f5f9; font-size: .86rem; }
.link-btn.blue { color: var(--brand); }
/* Tài khoản ủy quyền cho kế toán – bản gọn */
.cred-sec .card-title h2 { display: flex; align-items: center; gap: 10px; }
.cred-sec .cred-lock { font-size: .7rem; padding: 2px 9px; }
.cred-empty { margin: 0; }
.cred-line { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.cred-line .cred-ico { width: 36px; height: 36px; border-radius: 10px; }
/* Biểu tượng tài khoản: logo của trang (ảnh), nếu chưa có logo thì ô chữ viết tắt + màu theo loại */
.cred-logo { flex: none; width: 46px; height: 46px; border-radius: 12px; object-fit: contain; background: #fff; }
.cred-badge { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  font: 800 .68rem/1 var(--head); letter-spacing: .02em; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.cred-badge.hddt { background: linear-gradient(135deg, #e0613a, #b8321a); }
.cred-badge.tdt { background: linear-gradient(135deg, var(--brand), var(--navy)); }
.cred-badge.khac { background: linear-gradient(135deg, #7b5cd6, #4f35a3); }
.cred-line-main { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .9rem; }
.cred-line-main b { font-family: var(--head); color: var(--navy); font-size: .92rem; }
.cred-line-main a { font-size: .78rem; font-weight: 400; }
.cred-line-main span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-line-main code { padding: 1px 7px; border-radius: 6px; background: #f2f5f9; color: var(--navy); font-size: .84rem; }
.cred-line-act { display: flex; align-items: center; gap: 14px; }
.cred-line-act form { margin: 0; }
.cred-modal-title { font-size: 1.2rem; margin: 0 0 16px; padding-right: 40px; }
.cred-form .field { margin-bottom: 12px; }
.cred-form .cred-consent { margin: 4px 0 16px; }

/* ---------- Đồng bộ hóa đơn từ cổng hoadondientu (gõ captcha) ---------- */
.sync-head { display: flex; gap: 14px; align-items: flex-start; }
.sync-head > div { flex: 1; min-width: 0; }
.sync-head h2 { font-size: 1.1rem; margin: 2px 0 4px; }
.sync-head p { margin: 0; }
.sync-head .ico-box { margin-bottom: 0; }
.sync-ok { color: var(--ok); font-weight: 600; }
.sync-bad { color: var(--bad); font-weight: 600; }
.sync-problem { margin: 16px 0 0; }
.sync-card [data-sync-panel] { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sync-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0; }
.sync-cap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sync-cap img { display: block; width: 280px; height: 74px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.sync-cap-wait { display: grid; place-items: center; width: 200px; height: 56px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .85rem; }
.sync-cap-wait[hidden], .sync-cap img[hidden] { display: none; }
.sync-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--navy); }
.sync-field input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 1rem; }
.sync-field input[name=cvalue] { width: 150px; letter-spacing: .08em; }
.date-box { position: relative; display: inline-block; }
.sync-field input[data-date] { width: 150px; padding-right: 38px; }
.date-ico { position: absolute; right: 11px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); cursor: pointer;
  fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.date-box input[data-date-native] { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; padding: 0; border: 0;
  opacity: 0; pointer-events: none; }
.sync-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(38, 101, 166, .12); }
.sync-form .btn { height: 42px; }
.sync-status { margin: 12px 0 0; font-size: .9rem; min-height: 1.3em; }
.sync-status:empty { display: none; }
.sync-mode-note { margin: 12px 0 0; padding: 8px 12px; border-left: 4px solid var(--brand); background: var(--brand-50);
  border-radius: 6px; font-size: .88rem; font-weight: 600; color: var(--navy); }
.sync-mode-note[hidden] { display: none; }

/* Bảng nổi kết quả đồng bộ hóa đơn (sync.js showResult) */
.sr-back { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
  background: rgba(10, 25, 50, .45); }
.sr-modal { display: flex; flex-direction: column; width: min(1000px, 100%); max-height: calc(100vh - 48px); background: #fff;
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); overflow: hidden; }
.sr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px;
  background: linear-gradient(135deg, var(--navy), var(--brand)); color: #fff; }
.sr-head h3 { margin: 0; font-size: 1.2rem; color: #fff; }
.sr-head p { margin: 4px 0 0; font-size: .85rem; opacity: .9; }
.sr-x { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 32px; height: 32px; border-radius: 8px;
  font-size: 1.3rem; line-height: 1; cursor: pointer; }
.sr-x:hover { background: rgba(255, 255, 255, .3); }
.sr-body { padding: 16px 20px; overflow: auto; }
.sr-verdict { padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 1rem; }
.sr-verdict.ok { background: #e8f6ee; color: #15803d; border: 1px solid #b7e4c7; }
.sr-verdict.warn { background: #fff8e1; color: #b45309; border: 1px solid #f3d27a; }
.sr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.sr-stats div { padding: 10px 14px; border-radius: 10px; background: #f3f6fb; border: 1px solid #e3e9f2; }
.sr-stats b { display: block; font-size: 1.5rem; color: var(--navy); line-height: 1.15; }
.sr-stats span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.sr-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.sr-grid thead th { padding: 6px 4px; font-size: .82rem; color: var(--navy); text-align: center; white-space: normal;
  text-transform: none; letter-spacing: 0; }
.sr-grid tbody th, .sr-grid tfoot th { width: 90px; text-align: left; font-size: .9rem; color: var(--navy); }
.sr-grid td.sr-c { padding: 8px 6px; border-radius: 8px; text-align: center; vertical-align: top; }
.sr-grid td.sr-c b { display: block; font-size: 1.15rem; }
.sr-grid td.sr-c small { display: block; font-size: .75rem; line-height: 1.3; margin-top: 2px; }
.sr-grid td.sr-ok { background: #e8f6ee; color: #15803d; }
.sr-grid td.sr-bu { background: #e6f0fb; color: var(--brand); }
.sr-grid td.sr-warn { background: #fff4d6; color: #b45309; }
.sr-grid td.sr-bad { background: #fde8e8; color: #c62828; }
.sr-grid td.sr-off { background: #f1f3f6; color: #8a95a5; }
.sr-grid tfoot td { text-align: center; font-weight: 700; color: var(--navy); padding-top: 4px; }
.sr-legend { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.sr-legend span { font-weight: 700; padding: 0 5px; border-radius: 4px; }
.sr-legend .sr-ok { background: #e8f6ee; color: #15803d; } .sr-legend .sr-bu { background: #e6f0fb; color: var(--brand); }
.sr-legend .sr-warn { background: #fff4d6; color: #b45309; } .sr-legend .sr-bad { background: #fde8e8; color: #c62828; }
.sr-legend .sr-off { background: #f1f3f6; color: #8a95a5; }
.sr-body h4 { margin: 16px 0 6px; font-size: .95rem; color: var(--navy); }
.sr-list { width: 100%; border-collapse: collapse; font-size: .85rem; }
.sr-list th, .sr-list td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.sr-list .l { text-align: left; } .sr-list .r { text-align: right; }
.sr-notes { margin: 0; padding-left: 20px; font-size: .88rem; color: #6b4a00; }
.sr-notes li { margin: 3px 0; }
.sr-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: #f8fafc; }

/* Đối chiếu bảng kê Excel của cổng (trang Hóa đơn – _inv_compare.html) */
.cmp-card { border-top: 4px solid var(--brand); }
.cmp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cmp-head h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--navy); }
.cmp-head p { margin: 0; }
.cmp-scope { display: inline-block; margin: 2px 6px 2px 0; padding: 1px 8px; border-radius: 999px; background: #eef3f9;
  color: var(--navy); white-space: nowrap; }
.cmp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.cmp-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 10px; color: #fff;
  text-decoration: none; box-shadow: 0 2px 6px rgba(15, 40, 80, .12); }
.cmp-stat b { font-size: 1.7rem; line-height: 1.1; }
.cmp-stat span { font-size: .85rem; font-weight: 600; opacity: .95; }
.cmp-stat em { font-style: normal; font-size: .78rem; opacity: .9; }
.cmp-stat.ok { background: linear-gradient(135deg, #1f9d55, #15803d); }
.cmp-stat.bad { background: linear-gradient(135deg, #e5484d, #c62828); }
.cmp-stat.warn { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cmp-stat.info { background: linear-gradient(135deg, #3b82c4, #2665a6); }
.cmp-stat.zero { background: #eef1f5; color: #7a8699; box-shadow: none; }
a.cmp-stat:hover { filter: brightness(1.06); }
.cmp-fetch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 10px 14px;
  border: 1px solid #f3d27a; background: #fff8e1; border-radius: 8px; font-size: .9rem; }
.cmp-sec { margin-top: 18px; }
.cmp-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1rem; }
.cmp-h span { padding: 0 9px; border-radius: 999px; color: #fff; font-size: .8rem; line-height: 1.6; }
.cmp-h.bad { color: #c62828; } .cmp-h.bad span { background: #c62828; }
.cmp-h.warn { color: #b45309; } .cmp-h.warn span { background: #d97706; }
.cmp-h.info { color: var(--brand); } .cmp-h.info span { background: var(--brand); }
.cmp-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.cmp-table td.c { text-align: center; }
.cmp-xl { display: block; font-style: italic; color: #b45309; font-size: .85em; }
.cmp-what { color: #b45309; font-weight: 600; }
.cmp-done { color: var(--ok); font-weight: 600; white-space: nowrap; }
.cmp-miss { color: #c62828; font-weight: 600; white-space: nowrap; }
.cmp-allok { margin: 8px 0 0; padding: 10px 14px; border-radius: 8px; background: #e8f6ee; color: #15803d; font-weight: 600; }
.sync-status.run { color: var(--brand); }
.sync-status.ok { color: var(--ok); font-weight: 600; }
.sync-status.warn { color: var(--warn); }
.sync-status.err { color: var(--bad); font-weight: 600; }
.sync-status a { font-weight: 600; }
.sync-summary { margin: 0 0 18px; }
.sync-row { margin-bottom: 18px; }
.sync-row.is-today { border-color: var(--ok-line); }
.sync-row-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sync-row-head h2 { font-size: 1.1rem; margin: 0 0 2px; }
.sync-row-head p { margin: 0; }
.daily-card { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; padding: 20px 24px; border-left: 4px solid var(--red); }
.daily-card.all-done { border-left-color: var(--ok); }
.daily-card .ico-box { margin-bottom: 0; }
.daily-text { flex: 1; min-width: 0; }
.daily-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.daily-card.all-done .daily-label { color: var(--ok); }
.daily-text h2 { font-size: 1.1rem; margin: 2px 0 4px; }
.daily-text p { margin: 0; }
.signup-list { margin: 4px 0 0; padding-left: 18px; font-size: .92rem; }

/* ---------- Duyệt đăng ký (khu Quản lý) ---------- */
.su-card { margin-bottom: 20px; border-left: 4px solid var(--warn); }
.su-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.su-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; }
.su-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; align-content: start; }
.su-info dt { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.su-info dd { margin: 0; overflow-wrap: anywhere; }
.su-form { background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0; }
.su-steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 14px; }
.su-step-title { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.su-hint { margin: 0 0 8px; font-size: .88rem; color: var(--warn); }
.su-hint.ok { color: var(--ok); }
.su-form select, .su-new input { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.su-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.su-new[hidden], .su-new label[hidden] { display: none; }
.su-new.one { grid-template-columns: 1fr; }
.su-new label span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.su-check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.su-actions { display: flex; gap: 12px; align-items: center; }
.su-reqs { margin-bottom: 20px; }
.su-row-act form { display: flex; gap: 10px; align-items: center; margin: 0; }
@media (max-width: 860px) { .su-grid { grid-template-columns: 1fr; } }

/* ---------- Mục Hạch toán (khu kế toán): sổ nháp lập từ hóa đơn ---------- */
.ht-run { margin-top: 14px; }
.ht-run-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.ht-run-text h2 { font-size: 1.15rem; margin: 0 0 4px; }
.ht-run-text p { margin: 0; max-width: 720px; }
.ht-run-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ht-run-actions form { margin: 0; }
.ht-publish { display: flex; gap: 8px; align-items: center; }
.ht-warn { color: var(--warn); font-weight: 600; }
.ht-warnings { margin: 12px 0 0; padding: 10px 14px 10px 30px; background: var(--warn-50); border: 1px solid var(--warn-line); border-radius: 10px; color: var(--warn); font-size: .88rem; }
.ht-todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.ht-todo a { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text-2); font-size: .86rem; background: #fff; }
.ht-todo a b { font: 700 1.25rem/1.2 var(--head); }
.ht-todo a.ok b { color: var(--ok); }
.ht-todo a.warn { border-color: var(--warn-line); background: var(--warn-50); }
.ht-todo a.warn b { color: var(--warn); }
.ht-todo a.bad { border-color: var(--bad-line); background: var(--bad-50); }
.ht-todo a.bad b { color: var(--bad); }
.ht-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 16px 0 6px; }
.ht-kpis .lg-stat b { font-size: 1.02rem; }
.ht-note { margin: 0 0 14px; }
.ht-recon { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; }
.ht-period { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ht-period.ok { border-color: var(--ok-line); }
.ht-period.bad { border-color: var(--bad-line); }
.ht-period h3 { font-size: .98rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.ht-badge { font: 700 .72rem/1.6 var(--body); padding: 1px 9px; border-radius: 999px; }
.ht-period.ok .ht-badge { background: var(--ok-50); color: var(--ok); }
.ht-period.bad .ht-badge { background: var(--bad-50); color: var(--bad); }
.ht-rtable { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ht-rtable th { padding: 6px 8px; text-align: right; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.ht-rtable th:first-child, .ht-rtable td:first-child { text-align: left; }
.ht-rtable td { padding: 6px 8px; font-variant-numeric: tabular-nums; }
.ht-table tr.row-bad td, .ht-rtable tr.row-bad td { background: var(--bad-50); }
.ht-setting { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ht-setting select { height: 36px; margin-left: 6px; }
.ht-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ht-table th { padding: 8px 10px; background: var(--tint); color: var(--navy); font-weight: 700; font-size: .8rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.ht-table th.l, .ht-table td.l { text-align: left; }
.ht-table td { padding: 6px 10px; }
.ht-table td.c, .ht-table th.c { text-align: center; }
.ht-table td.name { min-width: 240px; white-space: normal; }
.ht-table td.small { white-space: normal; min-width: 150px; color: var(--muted); }
.ht-table tr.ht-dirty td { background: #fffbe6; }
.ht-in { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: .85rem; }
.ht-name { width: 100%; min-width: 260px; }
.ht-unit { width: 70px; text-align: center; }
.ht-f { width: 76px; text-align: right; }
.ht-sel { height: 32px; max-width: 300px; font-size: .84rem; }
.ht-acc { max-width: 250px; }
.ht-bad { color: var(--bad); }
.ht-ok { color: var(--ok); font-weight: 700; }
.ht-score { padding: 1px 8px; border-radius: 999px; background: var(--ok-50); color: var(--ok); font-weight: 700; font-size: .78rem; }
.ht-score.mid { background: var(--warn-50); color: var(--warn); }
.ht-score.low { background: var(--bad-50); color: var(--bad); }
.ht-n { background: var(--red) !important; color: #fff !important; }
.ht-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 4px 4px; background: #fff; border-top: 1px solid var(--line); margin-top: 10px; }
.ht-save .btn-outline { margin-right: auto; }
.seg-sm .seg-item { padding: 6px 14px; font-size: .84rem; }
.ht-jfilter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ht-jfilter select, .ht-jfilter input { height: 36px; font-size: .86rem; }
.ht-jfilter input[name=tk] { width: 210px; }
.ht-jfilter input[name=q] { width: 220px; }
.ht-journal td { white-space: nowrap; }
.ht-journal td.l { white-space: normal; min-width: 260px; }
.ht-flag { padding: 1px 8px; border-radius: 999px; background: var(--bad-50); color: var(--bad); font-weight: 600; font-size: .76rem; }
@media (max-width: 1100px) { .ht-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ht-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ht-off { opacity: .35; }
.seg-sm .seg-item { white-space: nowrap; }
.ht-table td.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; min-width: 0; font-size: .8rem; }
.ht-table td.name { min-width: 200px; max-width: 320px; }
.ht-acc { width: 178px; }
.ht-item { width: 250px; }
.ht-table th, .ht-table td { padding-left: 7px; padding-right: 7px; }
.ht-acc { width: 160px; }
.ht-item { width: 230px; }
.ht-f { width: 58px; }
.ht-table td.small { max-width: 150px; }
.ht-table td.name { min-width: 180px; max-width: 280px; }
#ht-items .ht-sel { width: 300px; max-width: 300px; }
.ht-hint { display: block; margin-top: 2px; color: var(--brand); font-size: .76rem; }
/* Hạch toán: thanh sheet như tab Excel */
.ht-sheets { display: flex; gap: 2px; margin: 14px 0 0; padding: 0 6px; border-bottom: 2px solid #1e7145; overflow-x: auto; }
.ht-sheet { position: relative; padding: 7px 18px 6px; border: 1px solid #c8d1dc; border-bottom: 0; border-radius: 6px 6px 0 0; background: #eef1f5; color: #3b495d; font: 600 .86rem/1.3 "Segoe UI", var(--body); text-decoration: none; white-space: nowrap; }
.ht-sheet:hover { background: #fff; color: #1e7145; }
.ht-sheet.on { background: #fff; color: #1e7145; border-color: #1e7145; border-bottom: 2px solid #fff; margin-bottom: -2px; font-weight: 700; }
.ht-dot { position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.ht-period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.ht-period-bar select, .ht-period-bar input { height: 34px; font-size: .86rem; }
.ht-period-bar label { display: flex; align-items: center; gap: 6px; }
.ht-sheet-title { color: #1e7145; font-family: var(--head); margin-right: 6px; }
.ht-tk { width: 210px; }
.ht-sheetcard { margin-top: 0; }
.ht-sheethead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 10px; }
.ht-sheethead h2 { font-size: 1.05rem; margin: 0; letter-spacing: .02em; }
.ht-sheethead p { margin: 0; color: var(--text-2); font-size: .88rem; }
.ht-sheethead .inv-pages { margin-left: auto; }
.ht-xl th { text-align: center !important; font-size: .74rem; letter-spacing: .02em; border: 1px solid #d5dde8; }
.ht-xl td { border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ht-xl tr.ht-total td { background: #f6f8fb; font-weight: 700; color: var(--navy); border-bottom: 1px solid #d5dde8; }
.ht-xl tr.ht-l1 td { font-weight: 700; color: var(--navy); }
.ht-xl tfoot tr.ht-total td { border-top: 2px solid var(--navy); }
.ht-okt { color: var(--ok); }
#ht-items .ht-name { min-width: 0; width: 230px; }
#ht-items .ht-unit { width: 52px; }
#ht-items .ht-sel { width: 230px; max-width: 230px; }
#ht-items td, #ht-items th { padding-left: 5px; padding-right: 5px; }
#ht-items { font-size: .8rem; }
#ht-items .ht-name { width: 175px; font-size: .8rem; }
#ht-items .ht-sel { width: 200px; max-width: 200px; font-size: .78rem; }
#ht-items .ht-f { width: 46px; }
/* Hạch toán: NDL chia khối, sửa tay */
.ht-xl tr.ht-sec td { background: #e8f3ec; color: #1e7145; font: 700 .82rem/1.4 var(--head); letter-spacing: .03em; padding: 8px 10px; text-align: left; border-top: 2px solid #1e7145; }
.ht-xl tr.ht-gap td { height: 10px; padding: 0; border: 0; background: #fff; }
/* NDL: giữa hai chứng từ một dòng trống thấp (tr.ht-gap, nền xám nhạt để thấy rõ), ngày + số HĐ dòng đầu in đậm */
.ht-journal tr.ht-gap td { height: 8px; background: #eef2f7; border-top: 1px solid #c5d0de; border-bottom: 1px solid #c5d0de; }
.ht-journal td.b { font-weight: 700; color: var(--navy); }
.ht-xl tr.ht-manual td { background: #fffbea; }
.ht-tag { padding: 0 7px; border-radius: 999px; background: #fff1c2; color: #8a5a07; font-weight: 600; font-size: .72rem; }
.ht-tag.ht-tag-kind { background: var(--brand-50); color: var(--brand); }  /* tên nghiệp vụ kế toán thêm (không hóa đơn) */
.ht-pen { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 28px; height: 26px; cursor: pointer; color: var(--brand); }
.ht-pen:hover { background: var(--brand-50); }
.ht-edit { margin-top: 0; padding: 12px 16px; }
.ht-edit > summary { cursor: pointer; list-style: none; }
.ht-edit > summary::-webkit-details-marker { display: none; }
.ht-edit-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 12px 0 8px; }
.ht-edit-head label { display: grid; gap: 2px; font-size: .8rem; color: var(--muted); }
.ht-edit-head input { height: 34px; }
.ht-edit-mode { color: var(--warn); font-weight: 600; }
.ht-edit-lines td { padding: 3px 4px; }
.ht-edit-lines input[name=desc] { width: 100%; min-width: 320px; }
.ht-acc-in { width: 150px; }
.ht-money { width: 140px; text-align: right; }
.ht-accname { width: 100%; min-width: 280px; }
.ht-newacc { padding: 10px 12px; margin-bottom: 12px; background: var(--tint); border: 1px dashed #b9cbe0; border-radius: 10px; }
.ht-newacc td { padding: 3px 4px; }
.ht-del { color: var(--bad); border-color: var(--bad-line); }
.ht-journal td.ht-note-col { white-space: normal; min-width: 120px; font-size: .78rem; }
.ht-journal td.l { min-width: 220px; }
.ht-journal td, .ht-journal th { padding-left: 6px; padding-right: 6px; }
/* Hạch toán: nút + và bảng nổi thêm / sửa nghiệp vụ */
.ht-add { margin-left: auto; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font: 400 1.7rem/1 var(--body); cursor: pointer; box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.ht-add:hover { background: var(--brand-600); transform: scale(1.06); }
.ht-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(10, 42, 82, .45); }
.ht-modal[hidden] { display: none; }
.ht-modal-panel { width: min(1080px, 100%); max-height: 88vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 18px 22px 14px; }
.ht-modal-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ht-modal-head h3 { margin: 0; font-size: 1.12rem; }
.ht-modal-x { margin-left: auto; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.ht-modal-x:hover { color: var(--navy); }
.ht-modal .ht-save { position: static; }
body.ht-noscroll { overflow: hidden; }
.ht-modal [hidden] { display: none !important; }
.ht-split { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.ht-split[hidden], .ht-item[hidden] { display: none !important; }
.ht-pct { width: 46px; text-align: right; }
.ht-spacc { height: 32px; font-size: .8rem; }
.ht-invs { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .74rem; color: var(--muted); }
.ht-invs a, .ht-invs span:not(.muted) { padding: 0 7px; border-radius: 999px; background: var(--brand-50); color: var(--brand); text-decoration: none; font-weight: 600; line-height: 1.6; }
.ht-invs a:hover { background: var(--brand); color: #fff; }
.ht-negcol { white-space: normal !important; min-width: 190px; }
.ht-negp { display: block; margin: 1px 0; padding: 1px 8px; border-radius: 6px; background: var(--warn-50); color: var(--warn); font-size: .76rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ht-negp.open { background: var(--bad-50); color: var(--bad); }
.ht-negp:hover { text-decoration: underline; }
/* Hạch toán: cố định dòng tiêu đề cột khi kéo trang xuống (như Freeze Panes) – chỉ một thanh cuộn của trang:
   khung bảng không tự cuộn (overflow visible) để tiêu đề dính sát mép trên màn hình */
.table-scroll:has(> .ht-table) { overflow: visible; }
.ht-table thead { position: sticky; top: 0; z-index: 3; }
/* chỉ dòng tiêu đề cột cố định – thanh đầu trang trôi theo trang (menu trái dính từ mép trên) */
.app-page:has(.ht-sheets) .site-header { position: static; }
.app-page:has(.ht-sheets) .app-side { top: 0; height: 100vh; }
.ht-journal td.l.ht-note-col { min-width: 110px; }
.ht-table thead th { background: var(--tint); box-shadow: inset 0 -1px 0 #d5dde8; }
.ht-xl thead tr.ht-total td { background: #f6f8fb; }
/* bảng sổ vừa khung (không cuộn ngang trang): chữ, lề ô gọn như Excel */
.ht-xl { font-size: .8rem; }
.ht-xl td, .ht-xl th { padding-left: 5px !important; padding-right: 5px !important; }
.ht-xl td.name, .ht-table td.name { min-width: 150px; }
.ht-negcol { min-width: 150px !important; }
#ht-items .ht-sel { width: 165px; max-width: 165px; }
.ht-mf { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; color: var(--muted); font-size: .74rem; }
#ht-items .ht-sel { width: 130px; max-width: 130px; }
.ht-negcol { min-width: 120px !important; }
.ht-negp { white-space: normal; line-height: 1.35; }
.ht-acc { width: 148px; }
.ht-item { width: 218px; }
.ht-xl tr.ht-flash td { background: #fff3c4 !important; }
.ht-eye { background: none !important; padding: 0 3px !important; font-size: .8rem; text-decoration: none; }
.ht-vlink { color: var(--brand); font-weight: 600; text-decoration: none; }
.ht-vlink:hover { text-decoration: underline; }
/* thanh tab sheet cố định trên cùng (quay lại TH kho / NDL… không phải kéo lên); tiêu đề cột bảng dính ngay dưới */
.ht-sheets { position: sticky; top: 0; z-index: 8; background: #f4f6f9; padding-top: 8px; }
.ht-table thead { top: var(--ht-tabs, 0px); }
/* dòng tên sổ (Số hiệu TK, tên hàng…) cố định dưới thanh tab; tiêu đề cột dính ngay dưới nữa */
.ht-sheethead { position: sticky; top: var(--ht-tabs, 0px); z-index: 6; background: #fff; padding: 8px 0; margin: -8px 0 4px; }
.ht-table thead { top: calc(var(--ht-tabs, 0px) + var(--ht-head, 0px)); }
/* các tầng cố định chồng mép 1px (không hở khe khi số đo lẻ pixel) */
.ht-sheethead { margin-bottom: 0; }
.ht-table thead { top: calc(var(--ht-tabs, 0px) + var(--ht-head, 0px) - 1px); }
.ht-sheethead { top: calc(var(--ht-tabs, 0px) - 1px); }
/* bảng trong cửa sổ nổi (thêm / sửa) không dính tiêu đề */
.ht-modal .ht-table thead { position: static; }
/* cố định từng ô tiêu đề (không cố định cả thead): ô gộp 2 dòng (rowspan) vẽ đủ, không lộ dòng bảng qua khe */
.ht-table thead { position: static !important; }
.ht-table thead tr:first-child th { position: sticky; z-index: 3; top: calc(var(--ht-tabs, 0px) + var(--ht-head, 0px) - 1px); }
.ht-table thead tr:nth-child(2) th { position: sticky; z-index: 3; top: calc(var(--ht-tabs, 0px) + var(--ht-head, 0px) + var(--ht-r1, 0px) - 2px); }
.ht-modal .ht-table thead th { position: static !important; }
/* tiêu đề 2 dòng không dùng rowspan: ô trống dòng 1 (ht-nb) liền với ô tên cột dòng 2 – bỏ viền giữa */
.ht-xl thead th.ht-nb { border-bottom-color: transparent; }
.ht-xl thead tr:nth-child(2) th { vertical-align: bottom; }
/* lưới ô như Excel: kẻ dọc giữa các cột ở thân bảng sổ (dóng lên tiêu đề dễ biết thuộc cột nào) */
.ht-xl tbody td { border-left: 1px solid #e1e7ef; border-right: 1px solid #e1e7ef; }
.ht-xl tr.ht-sec td, .ht-xl tr.ht-gap td { border-left-color: transparent; border-right-color: transparent; }
/* nhóm cột NHẬP / XUẤT / TỒN: không tô nền, kẻ dọc mảnh như các cột khác; phân biệt bằng màu chữ số */
.ht-xl td.gi { color: #1e7145; }
.ht-xl td.gx { color: #a3500b; }
/* cthtk – cột GHI CHÚ gõ trực tiếp như ô Excel (lưu ngay khi gõ xong) */
.ht-table td.ht-notecell { padding: 0 4px; min-width: 260px; max-width: none; overflow: visible; }
.ht-notewrap { display: flex; align-items: center; gap: 4px; }
.ht-notecell .ht-flag { flex: none; margin-left: 2px; white-space: nowrap; }
.ht-noteinp { flex: 1; width: 100%; min-width: 110px; box-sizing: border-box; border: 1px solid transparent; background: transparent; font: inherit; color: var(--navy); padding: 5px 6px; border-radius: 4px; }
.ht-noteinp:hover { border-color: #d5dde8; background: #fff; }
.ht-noteinp:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 2px rgba(31, 58, 104, .12); }
.ht-noteinp.ht-note-busy { opacity: .6; }
.ht-noteinp.ht-note-ok { border-color: #1e7145; background: #f1faf4; transition: background .3s; }
.ht-noteinp.ht-note-err { border-color: #c0392b; background: #fdf0ee; }
/* ghi chú tự động: hóa đơn ghi ĐVT khác sổ kho (web quy đổi) */
.ht-conv { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #fdf3dc; color: #8a5a00; font-weight: 600; font-size: .76rem; white-space: nowrap; margin-right: 4px; }
.ht-notecell .ht-conv { flex: none; }
/* tab Chú ý: việc doanh nghiệp cần làm */
.ht-attn-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.ht-attn-h { margin: 18px 0 8px; font-size: 1rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.ht-attn-h .ht-n, .ht-n-bad { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: .75rem; text-align: center; }
.ht-table tr.ht-done td { color: var(--muted, #5d6b7c); background: #f6fbf7; }
.ht-tasks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ht-tasks li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.ht-tasks li form { margin: 0; }
.ht-task-text { flex: 1; color: var(--navy); white-space: pre-wrap; }
.ht-tasks li.ht-done .ht-task-text { text-decoration: line-through; color: var(--muted, #5d6b7c); }
.ht-check { width: 22px; height: 22px; border: 2px solid #a9b6c6; border-radius: 5px; background: #fff; color: #fff; font-weight: 800; line-height: 1; cursor: pointer; padding: 0; }
.ht-done .ht-check { background: var(--ok, #1e7145); border-color: var(--ok, #1e7145); }
.ht-unitcheck { margin: 0; }
.ht-unitcheck select { max-width: 340px; }
.ht-inline { display: inline; margin: 0 0 0 8px; }
.ht-skipped { margin: 10px 0 4px; }
.ht-skipped summary { cursor: pointer; color: var(--muted, #5d6b7c); font-weight: 600; font-size: .88rem; }
.ht-skipped ul { list-style: none; margin: 6px 0 0; padding: 0; }
.ht-skipped li { display: flex; align-items: baseline; gap: 6px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--muted, #5d6b7c); }
.ht-skipped li span { flex: 1; }
/* NDL: phễu lọc trên tiêu đề cột (như Excel) */
.ht-funnel { display: inline-block; width: 18px; height: 18px; margin-left: 4px; vertical-align: -4px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; padding: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 3h11l-4.2 5.2V12l-2.6 1.4V8.2z' fill='none' stroke='%237a889c' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.ht-funnel:hover { border-color: #c9d2dd; background-color: #fff; }
.ht-funnel.on { background-color: var(--navy); border-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 3h11l-4.2 5.2V12l-2.6 1.4V8.2z' fill='%23fff'/%3E%3C/svg%3E"); }
.ht-fpop { position: absolute; z-index: 60; width: 300px; padding: 12px; background: #fff; border: 1px solid #c9d2dd; border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 35, 70, .18); display: flex; flex-direction: column; gap: 8px; }
.ht-fpop[hidden] { display: none; }
.ht-fpop-title { font-size: .82rem; color: var(--navy); }
.ht-fpop .ht-in { width: 100%; box-sizing: border-box; }
.ht-fpop-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ht-fclear { font-size: .82rem; font-weight: 600; color: var(--red, #b4232c); text-decoration: none; margin-left: 6px; }
.ht-fclear:hover { text-decoration: underline; }
/* Kho hàng: tiêu đề cột đậm, cột STT */
.fin-table.inv thead th { font-weight: 700; color: var(--navy); }
.fin-table.inv td.c, .fin-table.inv td:first-child.c { text-align: center; width: 44px; color: var(--muted); }
.fin-table.inv thead tr:first-child th:first-child { text-align: center; }
/* Kho hàng gọn: ô tìm + giá trị tồn cùng hàng tiêu đề, ghi chú tạm tính một dòng */
.inv-head { align-items: center; gap: 16px; flex-wrap: wrap; }
.inv-head p { margin: 2px 0 0; }
.inv-tools { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.inv-tools .table-filter { margin: 0; width: 240px; }
.inv-draft { color: #8a5a00; background: #fdf3dc; padding: 1px 8px; border-radius: 999px; font-weight: 600; cursor: help; }
/* Kho hàng: tiêu đề cột dính khi cuộn trang (khung bảng không cuộn ngang riêng – sticky theo trang) */
.table-scroll:has(> .inv-sticky) { overflow: visible; }
.inv-sticky thead tr:first-child th { position: sticky; z-index: 3; top: var(--inv-top, 0px); }
.inv-sticky thead tr:nth-child(2) th { position: sticky; z-index: 3; top: calc(var(--inv-top, 0px) + var(--inv-r1, 0px) - 1px); vertical-align: bottom; }
.inv-sticky thead th.nb { border-bottom-color: transparent; }
/* Kho hàng: thẻ kho trong cửa sổ nổi */
.inv-card h2 { margin: 0 48px 2px 0; font-size: 1.15rem; color: var(--navy); }
.inv-card > p { margin: 0 0 12px; }
.inv-card-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.inv-card-sum > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.inv-card-sum span { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.inv-card-sum b { font-size: 1.15rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.inv-card-sum small { color: var(--muted); font-variant-numeric: tabular-nums; }
.inv-card-sum .gi b { color: #1e7145; }
.inv-card-sum .gx b { color: #a3500b; }
.modal .inv-sticky thead tr:first-child th { top: 0; }
.modal .inv-sticky thead tr:nth-child(2) th { top: calc(var(--inv-r1, 0px) - 1px); }
/* Kho hàng: kẻ dọc các ô (dóng lên tiêu đề dễ biết thuộc cột nào) */
.fin-table.inv td, .fin-table.inv th { border-left: 1px solid #e1e7ef; }
.fin-table.inv td:first-child, .fin-table.inv th:first-child { border-left: 0; }
.fin-table.inv thead th.nb + th.nb { border-left-color: transparent; }
.fin-table.inv thead tr:first-child th[colspan] { border-left: 1px solid #e1e7ef; }
/* thẻ kho trong cửa sổ nổi: ô gọn để vừa khung, không cuộn ngang */
.inv-card .fin-table td, .inv-card .fin-table th { padding: 8px 7px; }
.inv-card .fin-table td.name { min-width: 170px; }
/* thẻ kho: cửa sổ nổi rộng gần hết màn hình, chữ nhỏ hơn – đủ cột, không cuộn ngang */
.modal-panel:has(.inv-card) { max-width: min(1500px, 96vw); }
.inv-card .fin-table { width: 100%; font-size: .84rem; }
.inv-card .fin-table th { font-size: .72rem; }
.inv-card .fin-table td.name { min-width: 0; }
/* Kho hàng: phễu lọc + xem hóa đơn từ thẻ kho */
.inv-sticky tr.f-out { display: none; }
.inv-fchecks { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.inv-fchecks label { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.inv-fcount a { font-weight: 600; }
.inv-card td.inv-no a { white-space: nowrap; }
.inv-card td.inv-no span { font-size: .8rem; }
#doc-modal { z-index: 120; }
.bt-suggest { color: #8a5a00; cursor: help; border-bottom: 1px dotted #c79a3a; }
/* PB 242 / PB 214: thêm khoản có từ trước */
.ht-asset-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ht-asset-form label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 600; color: var(--navy); }
.ht-asset-form .wide { grid-column: 1 / -1; }
.ht-asset-form .ht-in { width: 100%; box-sizing: border-box; }
/* PB 242 / 214 – danh mục gọn vừa khung */
.pb-reg .fin-table { font-size: .84rem; }
.pb-reg .fin-table th { font-size: .7rem; padding: 8px 6px; }
.pb-reg .fin-table td { padding: 6px; }
.pb-reg .ht-in { padding: 5px 6px; font-size: .84rem; }
.pb-reg .pb-name { width: 100%; min-width: 150px; }
.pb-reg input[type=date] { width: 128px; }
.pb-reg select.ht-in { width: 64px; }
.pb-reg .ht-f { width: 58px; text-align: center; }
.pb-reg .ht-money { width: 110px; }
/* mục Phân bổ (không có thanh sheet): thanh đầu trang trôi theo như Hạch toán, để tên bảng / tiêu đề cột dính trên cùng */
.app-page:has(.ht-sheethead) .site-header { position: static; }
/* PB: bảng phân bổ từng tháng – tháng chưa kết thúc in nghiêng, nhạt (dự kiến) */
.pb-months th a { color: inherit; text-decoration: none; }
.pb-months th a:hover { text-decoration: underline; }
.pb-months .pb-fut { font-style: italic; color: #8a96a8 !important; }
.pb-months td { font-size: .82rem; }
/* PB: bảng tổng vừa khung – tên dài xuống dòng, chữ nhỏ hơn */
.pb-sum { font-size: .84rem; }
.pb-sum th { font-size: .7rem; padding: 8px 6px; }
.pb-sum td { padding: 7px 6px; }
.pb-sum td.l { white-space: normal; min-width: 180px; max-width: 320px; }
.pb-sum thead th { white-space: normal; line-height: 1.25; }
.pb-sum td.l { max-width: 250px; }
/* tên hàng có chuỗi dài không dấu cách (mã cấu hình laptop…): ngắt cả giữa chuỗi, không tràn ô */
.pb-sum td.l, .pb-months td.l, .pb-reg td.l { overflow-wrap: anywhere; word-break: break-word; }
.ht-period-bar select.pb-ky { min-width: 120px; }
.pb-reg .pb-qty { width: 56px; text-align: right; }
.pb-reg .pb-unit { width: 62px; }
/* NDL cả năm: tiêu đề cột là bảng riêng dính trên cùng; thân chia khối, khối ngoài màn hình không vẽ (cuộn mượt) */
.ndl-wrap { position: relative; }
.ndl-headbox { position: sticky; top: calc(var(--ht-tabs, 0px) + var(--ht-head, 0px) - 1px); z-index: 5; background: #fff; }
.ndl-headbox .ht-table thead, .ndl-headbox .ht-table thead th { position: static !important; }
.ndl-grid { table-layout: fixed; width: 100%; margin: 0; }
.ndl-grid td { overflow: hidden; text-overflow: ellipsis; }
.ndl-grid td.l { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.ndl-grid td.ht-note-col { min-width: 0; }
.ndl-chunk { content-visibility: auto; }
/* Hạch toán / Phân bổ: danh sách xổ do web vẽ (thay hộp xổ của trình duyệt – không bị vẽ đen trên máy yếu) */
.dd-btn { display: inline-flex; align-items: center; gap: 10px; min-width: 120px; justify-content: space-between; padding: 7px 10px 7px 12px; border: 1px solid #c9d2dd; border-radius: 8px; background: #fff; color: var(--navy); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid #7a889c; border-bottom: 2px solid #7a889c; transform: rotate(45deg) translateY(-3px); }
.dd-btn:hover { border-color: var(--navy); }
.dd-pop { position: fixed; z-index: 200; max-width: 480px; max-height: 70vh; display: flex; flex-direction: column; background: #fff; border: 1px solid #c9d2dd; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 35, 70, .18); padding: 6px; }
.dd-find { margin: 2px 2px 6px; padding: 7px 9px; border: 1px solid #c9d2dd; border-radius: 7px; font: inherit; font-size: .88rem; }
.dd-list { overflow: auto; }
.dd-grp { padding: 8px 10px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #7a889c; }
.dd-opt { padding: 7px 12px; border-radius: 6px; cursor: pointer; font-size: .9rem; color: var(--navy); white-space: nowrap; }
.dd-opt:hover { background: #eef3f9; }
.dd-opt.on { background: var(--navy); color: #fff; font-weight: 600; }
.dd-opt[hidden] { display: none; }
/* đổi kỳ / năm / mã hàng: nội dung mờ đi + thông báo đang tải cho tới khi trang mới hiện */
body.ht-loading .ht-sheetcard, body.ht-loading .dash > section.card, body.ht-loading .ht-sheets { opacity: .35; pointer-events: none; transition: opacity .15s; }
#ht-busy { display: none; }
body.ht-loading #ht-busy { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 300; left: 50%; top: 45%; transform: translate(-50%, -50%); padding: 14px 22px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 600; box-shadow: 0 12px 32px rgba(15, 35, 70, .3); }
body.ht-loading #ht-busy::before { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: ht-spin .7s linear infinite; }
@keyframes ht-spin { to { transform: rotate(360deg); } }
.ht-period .ht-diff { margin: 8px 2px 0; font-size: .84rem; color: var(--bad, #b4232c); }
/* Cài đặt hạch toán: mỗi dòng tên + giải thích bên trái, ô chọn bên phải */
.ht-settings { display: flex; flex-direction: column; }
.ht-set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ht-set-row:first-child { padding-top: 4px; }
.ht-set-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ht-set-text b { color: var(--navy); font-size: .95rem; }
.ht-set-text span { color: var(--muted, #5d6b7c); font-size: .84rem; }
.ht-set-row .dd-btn { flex: none; width: 320px; max-width: 100%; }
.ht-set-foot { display: flex; justify-content: flex-end; padding-top: 14px; }
/* đối chiếu tờ khai: thẻ quý đủ rộng cho 3 cột số (tối đa 2 thẻ / hàng), tên chỉ tiêu được xuống dòng – không tràn thẻ */
.ht-recon { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); }
.ht-period { min-width: 0; overflow-x: auto; }
.fin-table.ht-rtable td, .fin-table.ht-rtable th { padding: 7px 8px; }
.fin-table.ht-rtable td:first-child { white-space: normal; min-width: 150px; }
.ndl-live { color: var(--bad, #b4232c); font-weight: 600; }
/* socttk của TK con: nút quay về bảng tổng hợp TK mẹ */
.ht-back { display: inline-flex; align-items: center; margin-right: 14px; padding: 5px 12px; border: 1px solid #c9d2dd; border-radius: 999px; background: #fff; color: var(--navy); font-size: .84rem; font-weight: 700; text-decoration: none; vertical-align: middle; }
.ht-back:hover { border-color: var(--navy); background: #eef3f9; }
.ht-sheethead h2 { display: inline; }
/* tiêu đề 2 tầng: ô trống tầng trên (ht-nb) liền với tên cột tầng dưới – không kẻ vạch ngang ở giữa */
.ht-table thead th.ht-nb { box-shadow: none; border-bottom-color: transparent; }
/* kỳ "Từ ngày – đến ngày": ô ngày + nút Xem chỉ hiện khi chọn */
.ht-period-bar [hidden] { display: none !important; }
.ht-period-bar .ht-range input[type=date] { height: 34px; padding: 0 8px; border: 1px solid #c9d2dd; border-radius: 8px; font: inherit; font-size: .88rem; color: var(--navy); }
/* tiêu đề 2 tầng: ô gộp 2 dòng (rowspan) – chữ giữa ô, kẻ dưới cùng hàng tên cột */
.ht-table thead th[rowspan] { vertical-align: middle; text-align: center; box-shadow: inset 0 -1px 0 #d5dde8; }

/* Kho hàng / thẻ kho: tiêu đề 2 tầng dùng rowspan – cột không chia là một ô, chữ giữa; ô đầu dòng 2 vẫn kẻ dọc */
.fin-table.inv thead th[rowspan] { vertical-align: middle; text-align: center; box-shadow: inset 0 -1px 0 #d5dde8; }
.fin-table.inv thead tr:nth-child(2) th:first-child { border-left: 1px solid #e1e7ef; }

/* ---------- Mục Lương (file Luong: Khai báo, Chấm công, Bảng lương, Hạch toán, Quyết toán) ---------- */
.pay-emp-form { grid-template-columns: repeat(4, 1fr); }
.pay-emp-form .wide2 { grid-column: span 2; }
.pay-emp-form .pay-chk { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.pay-emp-form .pay-from { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.pay-emp-form .pay-from .ht-in { width: auto; }
.pay-emp-form .pay-del { color: #b42318; margin-right: auto; }
.pay-emps tr.pay-left td { color: #8a96a8; }
.ht-sheethead .ht-attn-actions, .ht-sheethead .pay-set { margin-left: auto; }
.pay-set { display: flex; align-items: center; }
/* chấm công: ô ngày nhỏ, bấm đổi mã */
.pay-att th.pay-dh, .pay-att td.pay-d { width: 30px; min-width: 30px; padding: 6px 2px !important; text-align: center; }
.pay-att th.pay-sun { color: #b42318; }
.pay-att td.pay-d { cursor: pointer; user-select: none; font-weight: 600; }
.pay-att td.pay-d:hover { outline: 2px solid #7aa7e8; outline-offset: -2px; }
.pay-att td.pay-x { color: #1e7145; }
.pay-att td.pay-L { color: #1d4ed8; background: #eef4ff; }
.pay-att td.pay-N { color: #b42318; background: #fdecea; }
.pay-att td.pay-CN { color: #8a96a8; background: #f4f6f9; font-weight: 400; }
.pay-att td.pay-0 { background: #f4f6f9; cursor: default; }
.pay-att .pay-dept { width: 64px; padding: 2px 4px; }
.pay-mk { display: inline-block; min-width: 22px; text-align: center; border-radius: 4px; font-weight: 700; padding: 0 4px; }
.pay-mk.pay-x { color: #1e7145; background: #e9f6ee; }
.pay-mk.pay-L { color: #1d4ed8; background: #eef4ff; }
.pay-mk.pay-N { color: #b42318; background: #fdecea; }
.pay-mk.pay-CN { color: #5b6b80; background: #f0f2f5; }
/* bảng lương, quyết toán: nhiều cột – chữ nhỏ, tiêu đề xuống dòng */
.pay-sheet th, .pay-year th { white-space: normal; line-height: 1.25; }
.pay-sheet td, .pay-sheet th, .pay-year td, .pay-year th { padding-left: 6px !important; padding-right: 6px !important; }
.pay-sheet { font-size: .82rem; }
.pay-journal tr.pb-fut td { font-style: italic; color: #8a96a8; }
/* Lương: danh mục phụ cấp, ô phụ cấp ở form nhân viên */
.pay-emp-form fieldset.pay-al { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 14px; }
.pay-emp-form fieldset.pay-al legend { font-size: .84rem; font-weight: 700; color: var(--navy); padding: 0 6px; }
.pay-emp-form fieldset.pay-al label { font-weight: 500; }
.pay-allow .ht-in { width: 100%; box-sizing: border-box; }
.pay-allow td:first-child { min-width: 220px; }
.pay-allow tr.pay-off td { opacity: .55; }
.pay-emps td.pay-pc { max-width: 340px; white-space: normal; line-height: 1.35; }
/* Lương: quy định áp dụng theo năm, cảnh báo lương đóng BH dưới mức tối thiểu vùng */
.pay-rules td { white-space: normal; }
.pay-rules td.l { font-weight: 600; color: var(--navy); }
.pay-pit span { display: inline-block; margin: 0 10px 2px 0; white-space: nowrap; }
.pay-law { white-space: nowrap; color: var(--navy); font-weight: 600; }
.pay-law small { color: var(--muted); font-weight: 400; margin-left: 4px; }
td.pay-low { color: #b42318 !important; background: #fdecea; }
/* Lương – HĐLĐ */
.pay-rep { gap: 8px; }
.pay-rep .ht-in { width: 200px; }
.pay-rep .pay-rep-title { width: 110px; }
.pay-cts td.pay-ct-act { white-space: nowrap; }
.pay-cts td.pay-ct-act .btn { padding: 3px 10px; }
#ct-form textarea { resize: vertical; font: inherit; }
/* danh sách xổ của web vẽ (dd) mở trong bảng nổi: nằm trên bảng nổi */
.dd-pop { z-index: 1000; }
#ct-form textarea.ht-in { height: auto; min-height: 56px; line-height: 1.45; padding-top: 6px; padding-bottom: 6px; }
#ct-form textarea[name="job"] { min-height: 130px; }
/* HĐLĐ – soạn ngay trên hợp đồng: tờ giấy A4, ô điền nằm trong câu chữ */
.ct-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg, #f3f6fa); padding: 10px 0 12px; }
.ct-bar .muted { margin-right: auto; }
.ct-paper { background: #fff; max-width: 21cm; margin: 0 auto 40px; padding: 1.6cm 1.6cm 2cm 2.2cm; box-shadow: 0 4px 24px rgba(15, 35, 70, .12);
  border: 1px solid #dfe5ee; font-family: 'Times New Roman', Times, serif; font-size: 13pt; line-height: 1.6; color: #000; }
.ct-paper table { border-collapse: collapse; width: 100%; }
.ct-paper td { padding: 1px 0; vertical-align: top; border: 0; }
.ct-head td { text-align: center; }
.ct-paper .up { text-transform: uppercase; font-weight: bold; }
.ct-paper .rule { display: inline-block; border-top: 1px solid #000; width: 45%; margin-top: 2px; }
.ct-paper h1 { text-align: center; font-size: 15pt; margin: 22px 0 4px; color: #000; font-family: inherit; }
.ct-paper h2 { font-size: 13pt; margin: 12px 0 4px; color: #000; font-family: inherit; }
.ct-paper .sub { text-align: center; font-style: italic; margin: 0 0 14px; }
.ct-paper p { margin: 4px 0; text-align: justify; }
.ct-paper .can { font-style: italic; margin: 2px 0; }
.ct-paper .party { margin: 10px 0 2px; font-weight: bold; }
.ct-info td.k { width: 30%; }
.ct-paper ul { margin: 2px 0 4px; padding-left: 22px; }
.ct-paper li { margin: 3px 0; text-align: justify; }
.ct-sign { margin-top: 26px; } .ct-sign td { width: 50%; text-align: center; }
.ct-sign .note { font-style: italic; font-size: 12pt; } .ct-sign .name { margin-top: 70px; font-weight: bold; min-height: 1.4em; }
.ct-hint { color: #6b7a90; font-style: italic; font-size: 11.5pt; }
.ct-warn { color: #b42318; font: 600 12px/1.4 system-ui, sans-serif; background: #fdecea; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
/* ô điền */
.ct-paper .ct-f { font: inherit; color: #0b3d91; background: #eef4ff; border: 0; border-bottom: 1px dashed #7aa7e8; border-radius: 3px 3px 0 0;
  padding: 0 5px; margin: 0 1px; height: auto; min-height: 0; line-height: 1.45; box-shadow: none; vertical-align: baseline; }
.ct-paper .ct-f:focus { outline: 2px solid #7aa7e8; outline-offset: 1px; background: #fff; }
.ct-paper .ct-f::placeholder { color: #8fa3c0; font-style: italic; }
.ct-paper input[type=date].ct-f { width: 10.5em; }
.ct-paper .w-xs { width: 3.2em; } .ct-paper .w-s { width: 9.5em; } .ct-paper .w-m { width: 15em; } .ct-paper .w-m2 { width: 21em; }
.ct-paper .w-l { width: calc(100% - 12px); } .ct-paper .b { font-weight: bold; } .ct-paper .r { text-align: right; }
.ct-paper textarea.ct-area { display: block; width: calc(100% - 12px); resize: vertical; overflow: hidden; margin-top: 2px; }
.ct-paper .dd-btn { font: inherit; color: #0b3d91; background: #eef4ff; border: 0; border-bottom: 1px dashed #7aa7e8; border-radius: 3px 3px 0 0;
  padding: 0 22px 0 6px; height: auto; min-height: 0; line-height: 1.45; box-shadow: none; }
.ct-paper .ct-pick .dd-btn { font: 600 12.5px/1.4 system-ui, sans-serif; color: #1f4e8c; background: #fff; border: 1px solid #b9cbe6; border-radius: 6px; padding: 3px 24px 3px 10px; margin-left: 6px; }
.ct-al { display: inline-block; margin: 0 14px 2px 0; white-space: nowrap; }
.ct-al.empty { opacity: .55; }
.ct-paper li, .ct-paper p { text-align: left; }
.ct-als { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; margin: 2px 0 4px; }
.ct-al { display: flex; align-items: baseline; gap: 6px; margin: 0; white-space: nowrap; }
.ct-al .n { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ct-al input.ct-f { width: 8.5em; flex: none; }
.ct-al.ct-off { opacity: .5; }
.ct-al .n { min-width: 0; }
.ct-al .n { overflow: visible; white-space: normal; }
.ct-al input.ct-f { width: 7.5em; }
/* TH kho: bảng nổi thẻ kho (iframe) – rộng gần hết màn hình vì thẻ kho 13 cột */
.modal-panel.modal-card { max-width: min(1500px, 100%); }
#card-modal { padding: 24px 16px; overscroll-behavior: contain; }
#card-modal .modal-panel.modal-doc { height: calc(100vh - 48px); max-height: calc(100vh - 48px); }
#card-modal .modal-backdrop { backdrop-filter: none; background: rgba(8, 24, 48, .6); animation: none; }
#card-modal .doc-frame { background: #fff; }
/* đang tải: bảng ẩn (vẫn dựng sẵn trong nền), giữa màn hình chỉ có vòng xoay; tải xong bảng hiện ra (popIn) */
#card-modal .card-spin { display: none; }
#card-modal.is-loading .card-spin { display: flex; align-items: center; gap: 12px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  padding: 16px 24px; background: #fff; border-radius: 12px; box-shadow: 0 12px 36px rgba(0, 0, 0, .3); color: var(--navy); font-weight: 600; z-index: 2; }
#card-modal.is-loading .card-spin .spinner { width: 28px; height: 28px; border-width: 4px; }
#card-modal.is-loading .modal-panel { visibility: hidden; animation: none; }
/* trang thẻ kho nhúng trong bảng nổi (?noi=1): bỏ đầu trang, menu trái, tiêu đề, tab sheet – chỉ còn chọn kỳ / mã + thẻ kho */
body.ht-popup .skip, body.ht-popup .topbar, body.ht-popup .site-header, body.ht-popup .app-side, body.ht-popup .app-top,
body.ht-popup .inv-toolbar, body.ht-popup .ht-sheets, body.ht-popup .dash > .alert { display: none !important; }
body.ht-popup .app { display: block; min-height: 0; background: #fff; }
body.ht-popup .app-main { padding: 0 14px 14px; }
body.ht-popup .ht-period-bar { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 10px; padding-right: 200px; }
/* bảng nổi thẻ kho: không dòng tiêu đề (tên mã đã có trong ô Mã hàng) – nút Mở trang / × nổi góc phải, ngang thanh chọn kỳ */
#card-modal #card-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#card-modal .doc-bar { position: absolute; top: 20px; right: 34px; z-index: 3; padding: 0; border: 0; gap: 8px; }
#card-modal .doc-bar .doc-pdf, #card-modal .doc-bar .modal-close { box-shadow: 0 2px 8px rgba(10, 42, 82, .18); background: #fff; }
#card-modal .doc-bar .modal-close:hover { background: var(--red); }
/* ô Mã hàng giãn hết chỗ trống của thanh (tên hàng dài không bị cắt) */
body.ht-popup .ht-period-bar label:has(select[name=tk]) { flex: 1; min-width: 0; }
body.ht-popup .ht-period-bar label:has(select[name=tk]) .dd-btn { flex: 1; min-width: 0; max-width: none; }
/* thẻ kho (cthtk): 3 dòng tổng (dư đầu kỳ, phát sinh, dư cuối kỳ) nổi hẳn so với dòng nghiệp vụ – nền xanh, vạch màu đầu dòng,
   chữ đậm (cỡ chữ như dòng thường – to hơn thì bảng tràn ngang); dư cuối kỳ tô vàng; vạch đậm ngăn khối tổng với các nghiệp vụ bên dưới */
.ht-xl tr.ht-sum td { background: #e6effb; color: var(--navy); font-weight: 800; border-bottom: 1px solid #c3d3ea; }
.ht-xl tr.ht-sum td:first-child { border-left: 5px solid var(--brand); letter-spacing: .02em; }
.ht-xl tr.ht-sum td.gi { color: #1e7145; }
.ht-xl tr.ht-sum td.gx { color: #a3500b; }
.ht-xl tr.ht-sum-end td { background: #fff1c2; border-bottom: 3px solid var(--navy); }
.ht-xl tr.ht-sum-end td:first-child { border-left-color: #e0a100; }
/* thẻ kho: số HĐ + 👁 liền một khối, không tách / tràn sang cột TK đối ứng */
.ht-invs.ht-invs-in { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; margin-top: 0; vertical-align: baseline; }
/* tab Chú ý – việc khai bổ sung gắn kỳ tờ khai: nhãn kỳ, kết quả kiểm tra (vàng: chờ / xanh: đã khớp), gợi ý kỳ lệch */
.ht-task-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ht-task-main .ht-task-text { flex: none; }
.ht-kytag { display: inline-block; padding: 0 9px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .8rem; text-decoration: none; white-space: nowrap; }
.ht-kytag:hover { background: var(--brand); color: #fff; }
.ht-task-note { align-self: flex-start; font-size: .82rem; color: #8a5a00; background: #fff6d8; border-left: 3px solid #e0a100; padding: 3px 9px; border-radius: 4px; }
.ht-task-note.ok { color: var(--ok, #1e7145); background: #eef8f1; border-left-color: var(--ok, #1e7145); }
.ht-tasks li.ht-done .ht-task-note { text-decoration: none; }
.ht-tasks li.ht-wait .ht-check { background: #fff1c2; border-color: #e0a100; color: #8a5a00; font-size: .68rem; }
.ht-tasklink .dd-btn { min-width: 0; font-size: .8rem; padding: 4px 8px; }
.ht-rsug { margin: 4px 0 14px; padding: 10px 14px; border: 1px solid #f0d58a; border-left: 5px solid #e0a100; background: #fffaf0; border-radius: 10px; color: var(--navy); }
.ht-rsug ul { list-style: none; margin: 6px 0 4px; padding: 0; }
.ht-rsug li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed #f0d58a; }
.ht-rsug p { margin: 4px 0 0; }
.ht-task-ky { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--navy); font-weight: 600; }
.ht-task-ky .muted { font-weight: 400; flex-basis: 100%; }
/* Duyệt mua vào / bán ra: ĐVT hóa đơn khác ĐVT mã hàng – dòng chữ quy đổi web tự tính (thay ô "hệ số") */
.ht-conv-note { display: block; margin-top: 3px; font-size: .74rem; color: #6b3fb5; }
/* TH kho: phễu lọc – dòng bị lọc ẩn */
#ht-items tr.f-out { display: none; }
/* TH kho: tiêu đề kiểu báo cáo – tên bảng + "Từ ngày … đến ngày …" ở giữa; góc phải chọn kỳ, Cần xem / Tất cả, số mã đang lọc */
.ht-report-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; margin: 4px 0 16px; }
.ht-report-title { grid-column: 2; grid-row: 1; text-align: center; }
.ht-report-back { grid-column: 1; grid-row: 1; align-self: start; }
.ht-report-sub a { color: var(--brand); }
.ht-report-title h2 { margin: 0; font-size: 1.35rem; letter-spacing: .03em; color: var(--navy); }
.ht-report-date { margin: 6px 0 0; font-size: .98rem; color: var(--navy); font-style: italic; }
.ht-report-date b { font-style: normal; }
.ht-report-sub { margin: 4px 0 0; font-size: .84rem; color: var(--muted); }
.ht-report-tools { grid-column: 3; grid-row: 1; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ht-report-ky { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; }
.ht-report-ky [hidden] { display: none !important; }
.ht-report-ky label { display: flex; align-items: center; gap: 6px; margin: 0; }
.ht-report-ky .ht-tk { height: 34px; width: 150px; padding: 0 10px; border: 1px solid #c9d2dd; border-radius: 8px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--navy); background: #fff; }
.ht-report-ky .ht-tk:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.ht-report-ky .ht-range input[type=date] { height: 34px; padding: 0 8px; border: 1px solid #c9d2dd; border-radius: 8px; font: inherit; font-size: .88rem; color: var(--navy); }
.ht-report-tools .inv-fcount { white-space: nowrap; }
/* ô vuông góc phải: mẫu số / hệ thống TK theo Thông tư nào (như trang Báo cáo tài chính) */
.ht-form-box { padding: 6px 14px; border: 1.5px solid var(--navy); border-radius: 4px; text-align: center; font-weight: 700; font-size: .88rem; color: var(--navy); line-height: 1.35; background: #fff; }
.ht-form-box small { display: block; font-weight: 400; font-style: italic; font-size: .76rem; color: var(--text-2, #475569); }
/* số mã hàng ngay dưới chữ MÃ HÀNG (cùng ô tiêu đề) – lọc thì thành "đang hiện / tổng" */
.ht-th-n { display: block; margin-top: 2px; font-size: .72rem; font-weight: 600; color: var(--brand); text-transform: none; letter-spacing: 0; white-space: nowrap; }
/* Hạch toán: đầu trang gọn – tiêu đề + nút việc + năm một hàng, tab sổ sát ngay dưới, khoảng cách các khối nhỏ hơn */
.ht-page .app-top { margin-bottom: 8px; gap: 12px; }
.ht-page .app-title { font-size: 1.2rem; }
.ht-page .app-sub:empty { display: none; }
.ht-page .app-tools { gap: 10px; }
.ht-page .ht-worktabs { padding: 3px; border-radius: 10px; box-shadow: none; }
.ht-page .ht-worktabs .seg-item { padding: 5px 12px; font-size: .82rem; border-radius: 7px; }
.ht-page .app-tools .inv-filter .dd-btn { padding: 5px 10px; font-size: .84rem; }
.ht-page .app-tools .ht-worktabs { order: -1; }  /* nút việc trước ô chọn kỳ chung (period-bar của company_base) */
.ht-page .app-tools .inv-filter select, .ht-page .app-tools .period-bar select { height: 34px; font-size: .86rem; }
.ht-page .app-tools .inv-filter { display: flex; gap: 8px; align-items: center; margin: 0; }
.ht-page .dash { gap: 12px; }
.ht-page .ht-sheets { margin-top: 0; padding-top: 2px; }
.ht-page .ht-sheet { padding: 5px 14px 4px; font-size: .8rem; }
/* thẻ kho trong bảng nổi (TH kho): chọn kỳ / mã hàng ở góc trái, góc phải để trống cho nút Mở trang / × nổi */
body.ht-popup .ht-report-head { margin-top: 14px; grid-template-columns: 1fr; }
body.ht-popup .ht-report-tools { grid-column: 1; grid-row: 1; justify-self: stretch; align-items: flex-start; padding-right: 230px; }
body.ht-popup .ht-report-title { grid-column: 1; grid-row: 2; }
body.ht-popup .ht-report-ky { justify-content: flex-start; flex-wrap: nowrap; }
body.ht-popup .ht-report-ky label { white-space: nowrap; flex: 1; min-width: 0; }
body.ht-popup .ht-report-ky label .dd-btn { flex: 1; min-width: 0; max-width: 640px; }
@media (max-width: 1100px) { .ht-report-head { grid-template-columns: 1fr; } .ht-report-title, .ht-report-tools, .ht-report-back { grid-column: 1; grid-row: auto; } .ht-report-tools { justify-self: center; align-items: center; } }
#ht-items [data-merge-open] { color: var(--brand); }
/* TH kho: cột STT hẹp, chữ nhạt (như Kho hàng) */
.ht-xl .ht-stt { width: 44px; color: var(--muted); font-weight: 400; }
.ht-xl thead th.ht-stt { color: var(--navy); font-weight: 700; }
/* Thẻ việc cần làm (_task_cards.html) – cùng kiểu thẻ "Việc sắp đến hạn" (ov-task): viền trái vàng (chưa làm), cam đậm
   (chờ tờ khai bổ sung), xanh (đã xong); không có hạn nộp nên không đỏ */
.tk-cards { display: grid; gap: 8px; margin: 0 0 22px; }
.tk-card { padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; background: #fff; }
.tk-card.wait { border-left-color: #e08a00; background: #fffcf3; }
.tk-card.done { border-left-color: var(--ok, #1e7145); background: #f8fbf9; }
.tk-head { display: flex; align-items: flex-start; gap: 10px; }
.tk-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tk-main b { font-size: .95rem; color: var(--navy); font-weight: 700; line-height: 1.35; }
.tk-main b a { color: inherit; text-decoration: none; border-bottom: 1px dashed #9fb3c8; }
.tk-main b a:hover { color: var(--brand); }
.tk-main small { font-size: .8rem; color: #5d6b7c; }
.tk-card.done .tk-main b { color: #5d6b7c; text-decoration: line-through; }
.tk-status { flex: none; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #fff4dc; color: #8a5a00; white-space: nowrap; }
.tk-card.wait .tk-status { background: #ffe7c2; color: #8a4b00; }
.tk-card.done .tk-status { background: #e6f4ea; color: var(--ok, #1e7145); }
.tk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.tk-foot form { margin: 0; }
.tk-link .dd-btn { min-width: 0; font-size: .8rem; padding: 5px 9px; }
.tk-meta { margin-left: auto; font-size: .76rem; color: var(--muted); }
.tk-more { flex-basis: 100%; font-size: .82rem; }
.tk-more summary { cursor: pointer; color: var(--brand); font-weight: 600; width: max-content; }
.tk-more ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tk-more li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; background: #f6f8fb; border-radius: 6px; color: var(--navy); white-space: pre-wrap; }
.tk-more li > span:first-child { flex: 1; }
.tk-note-act { flex: none; display: flex; gap: 8px; white-space: nowrap; }
.tk-del { color: var(--red) !important; }
/* Việc cần làm dạng dòng gọn (_task_cards.html): một dòng tiêu đề + trạng thái + nút; bấm tiêu đề mở chi tiết */
.tk-list { display: grid; gap: 6px; margin: 0 0 22px; }
.tk-row { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; background: #fff; }
.tk-row[hidden] { display: none; }
.tk-row.wait { border-left-color: #e08a00; background: #fffcf3; }
.tk-row.done { border-left-color: var(--ok, #1e7145); background: #f8fbf9; }
.tk-line { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.tk-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: none;
  text-align: left; cursor: pointer; font: inherit; }
.tk-toggle b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; color: var(--navy); font-weight: 700; }
.tk-toggle:hover b { color: var(--brand); }
.tk-caret { flex: none; color: var(--brand); font-size: .8rem; transition: transform .15s; }
.tk-row.open .tk-caret { transform: rotate(90deg); }
.tk-row.open .tk-toggle b { white-space: normal; }
.tk-row.done .tk-toggle b { color: #5d6b7c; text-decoration: line-through; }
.tk-row .tk-status { font-size: .74rem; padding: 2px 9px; }
.tk-row.wait .tk-status { background: #ffe7c2; color: #8a4b00; }
.tk-row.done .tk-status { background: #e6f4ea; color: var(--ok, #1e7145); }
.tk-acts { flex: none; display: flex; align-items: center; gap: 10px; }
.tk-acts form { margin: 0; }
.tk-acts .btn-sm { padding: 4px 12px; font-size: .8rem; }
.tk-body { padding: 2px 12px 10px 32px; border-top: 1px dashed var(--line); }
.tk-body[hidden] { display: none; }
.tk-sub { margin: 8px 0 0; font-size: .85rem; color: #4b5a6b; }
.tk-notes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .84rem; }
.tk-notes li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; background: #f6f8fb; border-radius: 6px;
  color: var(--navy); white-space: pre-wrap; }
.tk-notes li > span:first-child { flex: 1; }
.tk-body .tk-foot { margin-top: 8px; }
/* Nút năm của mục Việc cần làm (trang Công việc kế toán) */
.tk-yhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.tk-yhead .sc-section-title { margin: 0; }
.tk-years { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-year { padding: 4px 12px; border: 1px solid #c9d6e6; border-radius: 999px; background: #fff; color: var(--navy);
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.tk-year span { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #fff1c2;
  color: #8a5a00; font-size: .75rem; }
.tk-year.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tk-year.on span { background: #fff; }
/* Công việc kế toán – Việc cần làm (từ tab Chú ý, mọi năm): không có hạn nộp nên số đếm màu vàng, không đỏ */
.sc-task-n { display: inline-block; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #fff1c2; color: #8a5a00; font-size: .8rem; text-align: center; vertical-align: middle; }
/* Nghĩa vụ thuế (company_obligation.html): banner lớn đỏ = có khoản quá hạn, vàng = còn phải nộp chưa đến hạn, xanh = không nợ */
.nvt-banner { display: flex; align-items: center; gap: 20px; padding: 20px 26px; border-radius: 16px; color: #fff; margin-bottom: 14px;
  background: linear-gradient(135deg, #1f8a4c, #2fb36a); box-shadow: 0 8px 24px rgba(20,60,40,.18); }
.nvt-banner.warn { background: linear-gradient(135deg, #c27a00, #f0a91f); box-shadow: 0 8px 24px rgba(120,80,0,.2); }
.nvt-banner.bad { background: linear-gradient(135deg, #a3151f, #e0353f); box-shadow: 0 8px 24px rgba(140,20,30,.25); }
.nvt-banner img { width: 72px; height: 72px; flex: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.nvt-banner-main { display: grid; gap: 2px; flex: 1; }
.nvt-banner-main span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.nvt-banner-main b { font-size: 2rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.nvt-banner-main em { font-style: normal; font-weight: 600; font-size: .9rem; }
.nvt-banner-time { text-align: right; font-size: .82rem; font-weight: 600; opacity: .95; }
.nvt-banner-time small { opacity: .85; font-weight: 500; }
.nvt-banner-time a { color: #fff; text-decoration: underline; }
.nvt-stats { margin-bottom: 14px; }
.lg-stat.nvt-green::before { background: #2fb36a; }
.lg-stat.nvt-blue::before { background: #3b8de0; }
.nvt-table td { text-align: right; }
.nvt-table td.l, .nvt-table th.l { text-align: left; }
.nvt-table td.c { text-align: center; }
.nvt-table td.nvt-owe { color: #b4232c; font-weight: 700; }
.nvt-table td.nvt-plus { color: #1f8a4c; font-weight: 700; }
.nvt-table td.nvt-tm { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nvt-table tr.nvt-group td { background: #eef3f9; color: var(--navy); font-weight: 700; text-align: left; font-size: .82rem; }
.nvt-table tr.nvt-late td { background: #fff1f2; }
.nvt-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: #eef3f9; color: var(--muted); white-space: nowrap; }
.nvt-tag.bad { background: #fde3e5; color: #b4232c; }
.nvt-tag.warn { background: #fff1c2; color: #8a5a00; }
.nvt-tag.wait { background: #e3f1fb; color: #1d5a99; }
.nvt-note { margin-top: 10px; }
.nvt-none { display: flex; align-items: center; gap: 20px; }
.nvt-none img { width: 64px; height: 64px; }
.nvt-tag.ok { background: #dff5e7; color: #1f7a45; }
.nvt-table td.nvt-for { font-size: .8rem; line-height: 1.45; }
.nvt-table td.c .fb { width: auto; padding: 0 10px; }
.nvt-pay td { white-space: normal; vertical-align: top; }
.nvt-pay td:nth-child(4) { max-width: 220px; }
.nvt-pay td:nth-child(5) small { word-break: break-all; }
.nvt-pay td.c { white-space: nowrap; }
.nvt-recon-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nvt-recon-sum .nvt-tag { font-size: .84rem; padding: 5px 14px; }
/* Đồng bộ hóa đơn máy tính tiền: captcha từng đợt 10 ngày hiện ngay dưới dòng tiến độ (sync.js) */
.sync-ask { margin-top: 10px; padding: 12px 14px; border: 2px solid #f0a91f; border-radius: 10px; background: #fff8e6; }
.sync-ask-label { display: block; margin-bottom: 8px; color: #8a5a00; }
.sync-ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sync-ask img { height: 70px; width: 290px; object-fit: contain; background: #fff; border: 1px solid #e3d2a8; border-radius: 6px; }
.sync-ask input { width: 120px; padding: 7px 10px; border: 1px solid #d3dce8; border-radius: 8px; font-size: 1rem; letter-spacing: .08em; }
.cap-upper { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }  /* captcha cổng hóa đơn: chữ hoa (sync.js) */
/* Thanh đồng bộ trang Hóa đơn – gọn: nhóm Đồng bộ | nhóm File (vạch ngăn), mọi nút cao 38px; khung đồng bộ xếp lưới:
   hàng 1 nhãn, hàng 2 ô nhập; ảnh captcha dính liền ô gõ mã như một ô (chỉ trong .inv-bar – trang khác giữ nguyên) */
.inv-bar .inv-bar-sync .btn, .inv-bar .inv-bar-upload .btn { height: 38px; padding: 0 16px; }
.inv-bar .inv-bar-upload { padding-left: 22px; border-left: 1px solid var(--line); }
.inv-bar .inv-bar-upload .file-drop { height: 38px; }
.inv-bar-link { border: 0; background: none; color: var(--brand); font: 600 .86rem var(--body); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; padding: 0 4px; white-space: nowrap; }
.inv-bar-link[aria-expanded="true"] { color: var(--navy); }
.inv-bar [data-sync-panel] { margin-top: 10px; padding: 8px 12px; border: 1px solid #dbe6f2; border-radius: 10px; background: #f7faff; }
:is(.inv-bar, .trx-tools) .sync-form { display: grid; grid-template-columns: 150px 96px 132px 132px auto; grid-template-rows: auto 36px;
  column-gap: 10px; row-gap: 3px; align-items: center; justify-content: start; }
:is(.inv-bar, .trx-tools) .sync-cap, :is(.inv-bar, .trx-tools) .sync-field { display: contents; }
:is(.inv-bar, .trx-tools) .sync-field > span:not(.date-box), :is(.inv-bar, .trx-tools) .sync-field > label { grid-row: 1; font-size: .74rem; font-weight: 600; color: var(--muted); align-self: end; }
:is(.inv-bar, .trx-tools) .sync-cap img, :is(.inv-bar, .trx-tools) .sync-cap-wait { grid-column: 1; grid-row: 2; width: 150px; height: 36px; border-radius: 7px 0 0 7px; font-size: .74rem; }
:is(.inv-bar, .trx-tools) .sync-cap .link-btn { grid-column: 1; grid-row: 1; justify-self: start; align-self: end; font-size: .72rem; }
:is(.inv-bar, .trx-tools) .sync-form > label.sync-field > span { grid-column: 2; }
:is(.inv-bar, .trx-tools) .sync-field input[name=cvalue] { grid-column: 2; grid-row: 2; width: calc(100% + 11px); margin-left: -11px; height: 36px;
  border-radius: 0 7px 7px 0; font-size: .95rem; padding: 0 8px; }
:is(.inv-bar, .trx-tools) .sync-form > div.sync-field:nth-of-type(2) > label { grid-column: 3; }
:is(.inv-bar, .trx-tools) .sync-form > div.sync-field:nth-of-type(2) > .date-box { grid-column: 3; grid-row: 2; }
:is(.inv-bar, .trx-tools) .sync-form > div.sync-field:nth-of-type(3) > label { grid-column: 4; }
:is(.inv-bar, .trx-tools) .sync-form > div.sync-field:nth-of-type(3) > .date-box { grid-column: 4; grid-row: 2; }
:is(.inv-bar, .trx-tools) .sync-field input[data-date] { width: 132px; height: 36px; font-size: .88rem; padding-left: 9px; }
:is(.inv-bar, .trx-tools) .sync-form > .btn { grid-column: 5; grid-row: 2; height: 36px; padding: 0 18px; }
:is(.inv-bar, .trx-tools) .sync-mode-note { margin: 0 0 8px; padding: 6px 10px; font-size: .82rem; }
.cap-upper::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
:is(.inv-bar, .trx-tools) .sync-field > label small { font-weight: 400; }
:is(.inv-bar, .trx-tools) .sync-status { margin-top: 6px; font-size: .84rem; }
.trx-tools .trx-box[data-sync-panel] { padding: 8px 12px; border: 1px solid #dbe6f2; border-radius: 10px; background: #f7faff; }
.trx-tools .trx-box-title { margin: 0 0 4px; font-size: .8rem; }
/* Captcha dịch vụ công / thuế điện tử cũ (ảnh PNG nền xám mờ): hiển thị sáng + tương phản cao cho dễ đọc */
.trx-tools .sync-cap img { filter: grayscale(1) brightness(1.18) contrast(2.1); image-rendering: auto; }

/* công tắc "Vào sổ nháp" ở đầu trang Phân bổ / Lương */
.ht-skip { display: flex; align-items: center; }
.ht-skip-btn { padding: 5px 12px; border-radius: 999px; border: 1px solid #9fd3b0; background: #e8f7ee; color: #17663a; font: 700 .8rem/1.4 var(--body); cursor: pointer; white-space: nowrap; }
.ht-skip-btn:hover { background: #d4f0de; }
.ht-skip-btn.off { border-color: #f0c96a; background: #fff6dc; color: #8a5a00; }
.ht-skip-btn.off:hover { background: #ffedb8; }

/* NDL: gắn hóa đơn phí vào tờ khai / HĐ mua hàng (chi phí mua hàng → 156) */
.ht-cp { border: 1px dashed #b9c6d8; background: #fff; color: #5b6b80; border-radius: 6px; padding: 0 6px; font-size: .74rem; line-height: 1.6; cursor: pointer; }
.ht-cp:hover { border-color: var(--brand); color: var(--brand); }
.ht-cp.on { border: 1px solid #f0c96a; background: #fff6dc; color: #8a5a00; font-weight: 600; }
.cp-panel { width: min(760px, 100%); }
.cp-help { margin: 10px 0; }
.cp-q { width: 100%; height: 36px; margin-bottom: 8px; }
.cp-list { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.cp-row { display: grid; grid-template-columns: 22px 150px 84px 1fr 110px; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #eef2f7; font-size: .84rem; cursor: pointer; }
.cp-row:hover { background: var(--brand-50); }
.cp-row:has(input:checked) { background: #fff6dc; }
.cp-row .cp-p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cp-row .cp-v { text-align: right; font-variant-numeric: tabular-nums; }

/* Cài đặt hạch toán: người bán thanh toán ngay (Có 111 / 112 thay 331) */
.ht-set-pay { flex-wrap: wrap; align-items: flex-start; }
.ht-set-pay .ht-set-text { flex: 1 1 320px; }
.ht-pay { flex: 1 1 560px; border-collapse: collapse; font-size: .84rem; }
.ht-pay th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.ht-pay td { padding: 4px 8px; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.ht-pay td.l { white-space: normal; }
.ht-pay .ht-in { width: 150px; height: 30px; }

/* ======================================================================
   Công ty / hộ kinh doanh: chọn hình thức khi đăng ký và ở Sửa thông tin
   ====================================================================== */
.reg-entity { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reg-ent { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.reg-ent input { position: absolute; opacity: 0; pointer-events: none; }
.reg-ent b { display: block; color: var(--navy); font-size: .95rem; }
.reg-ent small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 2px; }
.reg-ent-ic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--brand-50); color: var(--brand); }
.reg-ent-ic .icon { width: 24px; height: 24px; }
.reg-ent:hover { border-color: var(--brand-100); }
.reg-ent.on { border-color: var(--brand); box-shadow: 0 6px 16px rgba(10, 42, 82, .14); background: linear-gradient(135deg, var(--brand-50), #fff 70%); }
.reg-ent.on .reg-ent-ic { background: var(--brand); color: #fff; }
.reg-ent:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) { .reg-entity { grid-template-columns: 1fr; } }
.ci-entity { display: flex; gap: 8px; }
.ci-entity label { flex: 1; cursor: pointer; }
.ci-entity input { position: absolute; opacity: 0; pointer-events: none; }
.ci-entity span { display: block; text-align: center; padding: 9px 10px; border: 2px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--navy); }
.ci-entity input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.ci-entity input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.coinfo-2.one { grid-template-columns: 1fr; }
.sa-entity { display: inline-block; padding: 1px 9px; margin-right: 6px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--brand-50); color: var(--brand); }
.sa-entity.hkd { background: #fff1d6; color: #9a5b00; }
/* Tờ khai đã nộp – hộ kinh doanh: một ô lưới (không có quyết toán năm), 3 ô tóm tắt */
.trx-two.one { grid-template-columns: 1fr; }
.trx-two.one .tk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trx-type.hkd::before { background: #b7791f; }
.trx-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Tờ khai hộ kinh doanh (dự kiến từ hóa đơn) */
.hkd-form td.desc small { display: block; margin-top: 2px; }
.hkd-free { max-width: 640px; }
/* Tờ khai hộ kinh doanh: trình bày như bản PDF 01/CNKD của dịch vụ công */
.hkd-doc .vr-doc-head { align-items: flex-start; }
.hkd-mau { max-width: 230px; }
.hkd-checks { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 5px; font-size: .88rem; }
.hkd-checks li { display: flex; gap: 8px; align-items: flex-start; }
.hkd-checks .vr-box { flex: none; }
.hkd-ky { color: var(--text-2); }
.hkd-form tr.sec td { background: #f4f7fb; font-weight: 700; }
.hkd-pay td, .hkd-pay th { font-size: .82rem; }
.hkd-next { margin: 10px 0 6px; color: var(--navy); }
.hkd-bc, .hkd-free-box { margin: 10px 0; }
.hkd-bc summary, .hkd-free-box summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: .9rem; }
.hkd-form th, .hkd-pay th, .hkd-pay td { white-space: normal; }
.hkd-form thead tr:nth-child(2) th:nth-child(4) { min-width: 150px; max-width: 190px; }
.hkd-form td.val { white-space: nowrap; }
.hkd-pay { table-layout: fixed; width: 100%; }
.hkd-pay th:nth-child(1) { width: 40px; } .hkd-pay th:nth-child(2) { width: 70px; } .hkd-pay th:nth-child(4) { width: 90px; }
.hkd-pay th:nth-child(5), .hkd-pay th:nth-child(6) { width: 58px; } .hkd-pay th:nth-child(10) { width: 82px; }
.hkd-pay td.val { white-space: nowrap; }
.hkd-form thead tr:first-child th:nth-child(2) { min-width: 190px; }
.hkd-form thead tr:first-child th:nth-child(3) { min-width: 58px; }
.nvt-pending { border-left: 4px solid #f0a020; }
