/* VY KHANG — giao diện điện thoại (<=600px, tối ưu Galaxy S24 360dp). Desktop không bị ảnh hưởng. */
.m-bnav{display:none}
@media (max-width:600px){
  html,body{-webkit-text-size-adjust:100%}
  body{font-size:13px}
  .topbar{position:sticky;top:0;z-index:60;padding:6px 8px!important;gap:6px!important;min-height:0!important;flex-wrap:nowrap!important;align-items:center!important}
  .topbar .label{display:none!important}
  .topbar .title{font-size:15px!important;line-height:1.15!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
  .topbar .ham{display:inline-flex!important;min-width:40px;min-height:40px;font-size:20px;align-items:center;justify-content:center}
  .topbar-actions{gap:4px!important;flex-wrap:nowrap!important;margin-left:auto}
  .topbar-actions .btn{padding:7px 9px!important;font-size:11px!important;min-height:38px;white-space:nowrap}
  .topbar-actions .btn-outline,.topbar-actions .btn-ghost{display:none!important}
  .content{padding:8px 8px 74px!important}
  .btn{min-height:36px}
  .btn-sm{min-height:32px}
  input,select,textarea{font-size:16px!important}
  input:not([type=checkbox]):not([type=radio]),select{min-height:38px}
  input[type=checkbox]{width:20px;height:20px}
  /* bảng -> thẻ */
  table.tbl.m-cards{display:block;border:0!important;background:transparent!important;min-width:0!important;width:100%!important}
  table.tbl.m-cards thead{display:none!important}
  table.tbl.m-cards tbody,table.tbl.m-cards tfoot{display:block}
  table.tbl.m-cards tr{display:grid;grid-template-columns:1fr 1fr;column-gap:12px;position:relative;background:#fff;border:1px solid #dbe2ee;border-radius:10px;margin:0 0 8px;padding:6px 10px;box-shadow:0 1px 2px rgba(15,30,60,.05)}
  table.tbl.m-cards tr.sl-tot,table.tbl.m-cards tr.tot,table.tbl.m-cards tfoot tr{background:#eef3fa;border-color:#c9d6ea}
  table.tbl.m-cards td{display:block!important;padding:3px 0!important;border:0!important;text-align:left!important;font-size:13px;white-space:normal!important;min-height:0;width:auto!important;max-width:none!important;position:static!important;background:transparent!important}
  table.tbl.m-cards td::before{content:attr(data-l);display:block;font-size:9.5px;color:#7a8496;font-weight:700;letter-spacing:.02em;line-height:1.2}
  table.tbl.m-cards td.m-first{grid-column:1/-1}
  table.tbl.m-cards td.m-act{grid-column:1/-1;display:flex!important;flex-wrap:wrap;gap:6px;border-top:1px dashed #e3e8f0!important;margin-top:4px;padding-top:6px!important}
  table.tbl.m-cards td.m-act::before{display:none}
  table.tbl.m-cards td.m-chk{position:absolute!important;right:8px;top:6px;padding:0!important}
  table.tbl.m-cards td.m-chk::before{display:none}
  table.tbl.m-cards tr.sl-tot td,table.tbl.m-cards tfoot td{font-weight:700}
  table.tbl.m-cards td[data-l=""]::before,table.tbl.m-cards td:not([data-l])::before{display:none}
  table.tbl.m-cards td:empty{display:none!important}
  table.tbl.m-cards td.m-first{font-size:14.5px;font-weight:700;border-bottom:1px dashed #e3e8f0!important;padding:2px 34px 5px 0!important;margin-bottom:3px}
  table.tbl.m-cards td .btn{min-height:34px}
  .sl-scroll,.vk-scroll,.table-wrap,.einv-tblwrap{overflow:visible!important;max-height:none!important;border:0!important;background:transparent!important;box-shadow:none!important}
  /* thanh lọc / thao tác: xuống dòng gọn */
  .sl-head,.sl-r1,.sl-r2,.sl-tb,.sl-flt,.einv-ltb,.einv-lrow2,.einv-bulk,.einv-chips,.sl-chips{flex-wrap:wrap!important}
  .einv-ltb{overflow-x:auto}
  #einv-shell .einv-lrow2 .einv-q,#einv-shell .einv-lrow2 .einv-sel{max-width:none!important;flex:1 1 100%!important}
  #einv-shell .einv-lsum2{margin-left:0!important;white-space:normal!important}
  .sl-chip,.einv-chip{min-height:32px}
  /* bộ lọc thu gọn */
  #content .sl-r1{display:grid!important;grid-template-columns:1fr 1fr;gap:6px!important;align-items:end}
  #content .sl-r1 label{width:auto!important;min-width:0!important;flex:none!important}
  #content .sl-r1 label input,#content .sl-r1 label select{width:100%!important;max-width:none!important}
  #content .sl-r1 .sl-sp{display:none}
  #content .sl-r1 .sl-act{grid-column:1/-1;display:flex;gap:6px;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:2px}
  #content .sl-r1 .sl-act .btn{flex:none}
  .m-fbtn{grid-column:1/-1;background:#eef3fa;border:1px solid #c9d6ea;border-radius:8px;color:#1e3a6e;font-weight:800;font-size:11px;min-height:34px}
  #content:not(.m-fo) .sl-r2>:not(.sl-pill):not(.sl-sp){display:none!important}
  #content:not(.m-fo) .sl-r1 label.m-hid{display:none!important}
  #content .sl-r2 .sl-pill{white-space:normal!important;font-size:11px}
  /* modal toàn màn hình */
  .modal-overlay{padding:0!important;align-items:stretch!important}
  .modal{width:100vw!important;max-width:100vw!important;max-height:100dvh!important;height:100dvh;margin:0!important;border-radius:0!important;display:flex;flex-direction:column}
  .modal .modal-body{flex:1 1 auto;overflow:auto!important;max-height:none!important;padding:10px!important}
  .modal .modal-footer{flex-wrap:wrap;gap:6px;position:sticky;bottom:0;background:#fff;padding:8px!important}
  .modal .modal-footer .btn{flex:1 1 30%;min-height:40px}
  .modal .form-row{display:block}
  /* phiếu nhập: lưới dòng hàng cuộn ngang */
  .modal table:not(.m-cards){font-size:12px}
  .modal .sl-lines,.modal .sl-ed-lines{overflow-x:auto}
  /* xem phiếu: thu nhỏ vừa màn hình (JS đặt zoom) */
  #sl-a4{overflow:hidden}
  /* trang phân hệ */
  .mod-grid{grid-template-columns:1fr!important;gap:10px!important}
  /* thanh điều hướng dưới */
  .m-bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;background:#0b1d3a;padding:4px 2px calc(4px + env(safe-area-inset-bottom));box-shadow:0 -2px 8px rgba(0,0,0,.18)}
  .m-bnav button{flex:1;background:none;border:0;color:#c9d6ea;font-size:10px;font-weight:700;padding:4px 0;display:flex;flex-direction:column;align-items:center;gap:1px;min-height:48px}
  .m-bnav button b{font-size:18px;line-height:1.1;font-weight:400}
  .m-bnav button.on{color:#fff}
  .m-bnav button.on b{color:#7ee2a8}
  .sidebar{width:min(84vw,300px)!important}
  .toast-container{bottom:70px!important}
}
