/* u1411-ms · Kế toán – Thuế AMIS — bố cục & lưới (xem public/admin/acc.js) */
.ac { --ac-g: #0e9f6e; --ac-g2: #e7f6ef; --ac-line: #e3e8ee; --ac-head: #f1f5f4; --ac-side: #1f2a37; --ac-tx: #1f2937; --ac-mut: #6b7280;
  display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: calc(100vh - 120px); background: #f3f5f7; border-radius: 10px; overflow: hidden; border: 1px solid var(--ac-line); color: var(--ac-tx); }
.ac-side { background: var(--ac-side); padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.ac-side a { display: flex; align-items: center; gap: 10px; color: #cbd5e1; text-decoration: none; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.ac-side a svg { width: 18px; height: 18px; flex: none; }
.ac-side a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ac-side a.on { background: var(--ac-g); color: #fff; font-weight: 600; }
.ac-main { min-width: 0; display: flex; flex-direction: column; }
.ac-top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--ac-line); flex-wrap: wrap; }
.ac-logo { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; color: var(--ac-g); }
.ac-co { font-weight: 600; font-size: 13.5px; }
.ac-db { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ac-line); border-radius: 8px; padding: 2px 8px; }
.ac-db i { width: 8px; height: 8px; border-radius: 50%; background: var(--ac-g); display: inline-block; }
.ac-db select { border: 0; background: transparent; font-weight: 600; font-size: 13px; padding: 4px 0; }
.ac-sp { flex: 1; }
.ac-who { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.ac-tabs { display: flex; gap: 2px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--ac-line); overflow-x: auto; scrollbar-width: thin; }
.ac-tabs a, .ac-tabs button { padding: 11px 12px; color: var(--ac-tx); text-decoration: none; font-size: 14px; white-space: nowrap; border: 0; background: transparent; border-bottom: 2px solid transparent; cursor: pointer; }
.ac-tabs a.on, .ac-tabs button.on { color: var(--ac-g); border-bottom-color: var(--ac-g); font-weight: 600; }
.ac-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ac-card { background: #fff; border: 1px solid var(--ac-line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ac-card.empty { text-align: center; color: var(--ac-mut); padding: 30px; }
.ac-tb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ac-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ac-line); border-radius: 8px; padding: 0 8px; }
.ac-search input { border: 0; outline: 0; padding: 7px 0; min-width: 200px; background: transparent; }
.ac-per { display: inline-flex; align-items: center; gap: 6px; }
.ac-per select, .ac-per input, .ac-pg select { border: 1px solid var(--ac-line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.ac-gw { overflow: auto; max-height: 62vh; border: 1px solid var(--ac-line); border-radius: 8px; }
.ac-g { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.ac-g th { position: sticky; top: 0; z-index: 2; background: var(--ac-head); text-align: left; font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--ac-line); white-space: nowrap; }
.ac-g td { padding: 8px 10px; border-bottom: 1px solid #eef1f4; white-space: nowrap; vertical-align: middle; background: #fff; }
.ac-g td.wrap { white-space: normal; min-width: 180px; max-width: 360px; }
.ac-g .r { text-align: right; font-variant-numeric: tabular-nums; }
.ac-g tbody tr:hover td { background: #f6fbf8; }
.ac-g tbody tr.sel td { background: var(--ac-g2); }
.ac-g tfoot td { position: sticky; bottom: 0; background: #eef2f1; border-top: 1px solid var(--ac-line); z-index: 1; }
.ac-g .pinl { position: sticky; left: 0; z-index: 1; }
.ac-g th.pinl { z-index: 3; }
.ac-g .pinr { position: sticky; right: 0; z-index: 1; box-shadow: -6px 0 6px -6px rgba(0,0,0,.15); }
.ac-g th.pinr { z-index: 3; }
.ac-g td.empty { text-align: center; color: var(--ac-mut); padding: 22px; }
.ac-g .neg, .ac .neg, .ac-docm .neg { color: #dc2626; }
.ac-lnk { color: #2563eb; cursor: pointer; text-decoration: none; }
.ac-lnk:hover { text-decoration: underline; }
.ac-fn { display: inline-flex; align-items: center; gap: 4px; }
.ac-dd { border: 0; background: transparent; cursor: pointer; color: #2563eb; padding: 2px; display: inline-flex; }
.ac-dd svg { width: 16px; height: 16px; }
.ac-menu { position: fixed; z-index: 2000; background: #fff; border: 1px solid var(--ac-line, #e3e8ee); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; display: flex; flex-direction: column; min-width: 200px; }
.ac-menu button { border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.ac-menu button:hover { background: #f1f5f9; }
.ac-menu button.danger { color: #dc2626; }
.ac-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ac-pill.t-ok { background: #dcfce7; color: #166534; } .ac-pill.t-info { background: #dbeafe; color: #1e40af; } .ac-pill.t-warn { background: #fef3c7; color: #92400e; }
.ac-pill.t-crit { background: #fee2e2; color: #991b1b; } .ac-pill.t-muted { background: #f1f5f9; color: #475569; } .ac-pill.t-violet { background: #ede9fe; color: #5b21b6; }
.ac-pg { display: flex; align-items: center; gap: 8px; padding-top: 8px; flex-wrap: wrap; font-size: 13.5px; }
.ac-pn { min-width: 54px; text-align: center; }
.ac-det-h { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.ac-det .ac-gw { max-height: 34vh; }
.ac-note { font-size: 12.5px; margin: 0; }
.ac-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ac-kc { border: 1px solid var(--ac-line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.ac-kc small { color: var(--ac-mut); } .ac-kc b { font-size: 17px; font-variant-numeric: tabular-nums; } .ac-kc span { font-size: 12px; color: var(--ac-mut); }
.ac-kc.t-warn { border-color: #fcd34d; } .ac-kc.t-crit { border-color: #fca5a5; } .ac-kc.t-ok { border-color: #86efac; }
.ac-in { width: 100%; min-width: 80px; border: 1px solid #d1d5db; border-radius: 6px; padding: 4px 6px; font: inherit; }
.ac-in.r { text-align: right; }
/* form chứng từ */
.modal.xl.ac-docm { width: min(1280px, 96vw); max-width: 96vw; }
.ac-doc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.ac-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-big { text-align: right; } .ac-big small { display: block; color: #6b7280; } .ac-big b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ac-doc-h { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px 24px; }
.ac-kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px dashed #eef1f4; font-size: 13.5px; }
.ac-kv label { color: #6b7280; } .ac-kv .v { font-weight: 500; overflow-wrap: anywhere; } .ac-kv .v.r { text-align: left; }
.ac-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; padding: 8px 10px; background: #f8fafc; border-radius: 8px; }
.ac-refs label { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; }
.ac-chip { background: #e0f2fe; color: #075985; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; text-decoration: none; }
.ac-chip:hover { background: #bae6fd; }
.ac-refn { margin-left: auto; font-size: 12px; }
.ac-dtabs { padding: 0; margin-top: 4px; }
.ac-dbody { margin-top: 8px; }
.ac-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 18px; margin-top: 10px; justify-items: end; }
.ac-sums div { display: flex; gap: 12px; } .ac-sums span { color: #6b7280; } .ac-sums b { font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .ac { grid-template-columns: 1fr; }
  .ac-side { flex-direction: row; overflow-x: auto; padding: 6px; }
  .ac-side a { padding: 7px 9px; white-space: nowrap; font-size: 13px; }
  .ac-co { display: none; }
  .ac-search input { min-width: 120px; }
  .ac-doc-h { grid-template-columns: 1fr; }
  .ac-kv { grid-template-columns: 120px minmax(0, 1fr); }
  .ac-body { padding: 8px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ac { color-scheme: light; } }
/* m1911 · Công nợ thuế (acc-cnt.js) */
.ac-g tr.ct-lech td { background: #fff8f1; }
.ac-g tr.ct-lech:hover td, .ac-g tr.ct-lech.sel td { background: #ffefdc; }
.ac-g tr.ct-void td { color: #9ca3af; text-decoration: line-through; text-decoration-color: #d1d5db; }
.ac-g tr.ct-void td .ac-pill, .ac-g tr.ct-void td:last-child { text-decoration: none; }
.ac-g tr.ct-open td { background: #f3f8f6; font-weight: 600; }
.ct-upd { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ct-tile { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border: 1px solid var(--line, #dde3ea); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.ct-tile:hover, .ct-tile:focus-visible { border-color: #0e9f6e; background: #f2fbf7; outline: none; }
.ct-tile .ico { width: 22px; height: 22px; color: #0e9f6e; }
.ct-tile b { font-size: 14.5px; }
.ct-tile span { font-size: 12.5px; color: #6b7280; line-height: 1.4; }
.ct-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.ct-f label { display: grid; gap: 4px; font-size: 13px; color: #374151; min-width: 0; }
.ct-f label > span b { color: #d03b3b; }
.ct-f label.w2, .ct-f .ct-act { grid-column: 1 / -1; }
.ct-f input, .ct-f select { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; }
.ct-f input:focus, .ct-f select:focus { outline: 2px solid #0e9f6e33; border-color: #0e9f6e; }
.ct-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ct-act .btn { height: auto; min-height: 38px; white-space: normal; text-align: left; }
.ct-keep { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.ct-sum { margin: 10px 0 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
[data-err].alert { margin-top: 10px; }
@media (max-width: 760px) {
  .ct-upd, .ct-f { grid-template-columns: minmax(0, 1fr); }
}
