*,*::before,*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body,input,select,button,textarea,table{
  font-family:"Inter",Arial,Helvetica,sans-serif!important;
}

body{
  background:#eef1f5;
  color:#061b34;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:18px 0 50px;
  overflow-x:auto;
}

body.locked #receipt,
body.locked .btns,
body.locked .appShell,
body.locked .panel,
body.locked #msg,
body.locked #progressBox{
  display:none!important;
}

body.locked.view-receipt #receipt,
body.locked.view-receipt .btns{
  display:none!important;
}

#authBox{
  width:460px;
  max-width:92vw;
  margin-top:90px;
  background:#fff;
  padding:38px;
  border-radius:22px;
  text-align:center;
  box-shadow:0 18px 60px rgba(0,0,0,.12);
}

#authBox h2{
  font-size:30px;
  font-weight:900;
}

.auth-sub{
  color:#667085;
  margin:6px 0 18px;
}

#authBox input,
#authBox button{
  width:100%;
  height:46px;
  border-radius:10px;
  font-size:18px;
  margin-top:12px;
}

#authBox input{
  border:1px solid #d0d5dd;
  padding:0 14px;
}



.appShell,
.btns,
.panel{
  width:1120px;
}

.controlPanel,
.panel{
  background:#fff;
  border:1px solid #dde3ea;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(15,35,55,.06);
}

.tab{
  display:none;
}

.tab.active{
  display:block;
}

/* Workspace dạng grid phải giữ display:grid khi active */
.tab.active.receiptWorkspace{
  display:grid!important;
}


.adminOnly{
  display:none!important;
}

body.admin-role .adminOnly{
  display:block!important;
}

.controlPanel{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  margin-top:12px;
}

.controlPanel label{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  font-weight:800;
}

.controlPanel select,
.controlPanel input,
.filters input,
.filters select{
  height:38px;
  border:1px solid #cfd8e3;
  border-radius:9px;
  padding:0 10px;
  background:#fff;
  font-size:16px;
}

.controlPanel select{
  width:230px;
}

body.view-receipt #receipt{
  display:block!important;
}

body.view-receipt .btns{
  display:flex!important;
}

body.view-lookup #receipt,
body.view-lookup .btns,
body.view-report #receipt,
body.view-report .btns,
body.view-closeout #receipt,
body.view-admin #receipt,
body.view-closeout .btns,
body.view-admin .btns{
  display:none!important;
}

.page{
  position:relative;
  width:1120px;
  height:792px;
  background:#fff;
  border:3px double #0b2444;
  overflow:hidden;
  box-shadow:0 8px 28px rgba(0,0,0,.16);
  font-family:"Inter",Arial,Helvetica,sans-serif!important;
  font-size:22px;
  line-height:1.35;
}

.page::before,
.page::after{
  content:"";
  position:absolute;
  inset:8px;
  border:2px solid #0b2444;
  pointer-events:none;
}

.biz{
  position:absolute;
  top:24px;
  left:210px;
  right:240px;
  z-index:3;
}

.biz h1{
  font-size:34px;
  font-weight:900;
  letter-spacing:.4px;
  color:#0b2444;
}

.biz p{
  font-size:18px;
  margin-top:8px;
  color:#142d4f;
}

.soBox{
  position:absolute;
  right:50px;
  top:52px;
  width:170px;
  height:86px;
  border:2px solid #53657c;
  border-radius:7px;
  text-align:center;
  padding-top:10px;
  z-index:3;
}

.soBox span{
  font-size:18px;
  font-weight:900;
}

.soBox b{
  display:block;
  margin-top:0px;
  color:#e00000;
  font-size:24px;
  letter-spacing:.5px;
}

.watermarkImg{
  position:absolute;
  left:350px;
  top:240px;
  width:420px;
  height:420px;
  object-fit:contain;
  opacity:.045;
}

.title{
  position:absolute;
  top:156px;
  left:0;
  right:0;
  text-align:center;
  font-size:64px;
  line-height:1;
  font-weight:900;
  letter-spacing:2px;
  color:#072245;
}

.divider{
  position:absolute;
  top:228px!important;
  left:360px!important;
  right:360px!important;
  height:4px;
  display:flex;
  align-items:center;
}

.divider::before,
.divider::after{
  content:"";
  flex:1;
  border-top:3px solid #061b34;
}

.divider .dLeft,
.divider .dRight{
  font-size:18px;
  color:#061b34;
  line-height:1;
  padding:0 6px!important;
  flex:0 0 auto;
}

.date{
  position:absolute;
  top:248px!important;
  left:0;
  right:0;
  text-align:center;
  font-size:26px;
  font-weight:900;
  color:#0b2444;
}


.content{
  position:absolute;
  left:48px;
  right:66px!important;
  top:312px;
  display:grid;
  grid-template-columns:1fr 360px!important;
  column-gap:32px!important;
  font-size:22px;
  z-index:5;
}

.contentLeft{
  display:grid;
  grid-template-columns:1fr;
  gap:11px;
}

.contentLeft .fieldLine{
  display:grid;
  grid-template-columns:auto 1fr;
  column-gap:8px;
  align-items:center;
}

.contentLeft .reasonLine{
  grid-template-columns:auto auto 1fr;
}

.contentRight{
  display:flex;
  flex-direction:column;
  gap:11px;
  padding-top:0;
}

.fieldLine{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  white-space:nowrap;
}

.fieldLine label{
  font-weight:900;
  color:#0b2444;
  flex:0 0 auto;
}

.fieldLine span{
  flex:0 0 auto;
}

#receipt .fieldLine select,
#receipt .fieldLine input{
  flex:1 1 auto;
  width:auto!important;
  min-width:0;
  height:34px;
  border:0;
  border-bottom:1.8px dotted #aab4c0;
  background:transparent!important;
  background-image:none!important;
  font-size:22px;
  color:#102a4c;
  outline:0;

  appearance:none!important;
  -webkit-appearance:none!important;
  -moz-appearance:none!important;

  padding:0 2px;
  font-family:"Inter",Arial,Helvetica,sans-serif!important;
}

#receipt input[list]::-webkit-calendar-picker-indicator{
  display:none!important;
  opacity:0!important;
  pointer-events:none!important;
}

#receipt select::-ms-expand{
  display:none!important;
}

#receipt .contentRight .fieldLine{
  display:grid;
  grid-template-columns:150px 1fr!important;
  column-gap:12px;
  align-items:center;
}

#receipt .contentRight .moneyLine{
  display:grid!important;
  grid-template-columns:150px minmax(155px,170px) auto!important;
  column-gap:8px!important;
  align-items:center;
}

#receipt .contentRight .fieldLine label{
  justify-self:start;
}

#receipt .contentRight .fieldLine select,
#receipt .contentRight .fieldLine input{
  width:100%!important;
  text-align:center;
}

#receipt #sotien{
  min-width:155px!important;
  width:170px!important;
  text-align:center!important;
  font-weight:900;
  color:#072245!important;
  letter-spacing:0!important;
  font-size:22px!important;
  overflow:visible!important;
  white-space:nowrap!important;
}

#receipt #buoi,
#receipt #lop{
  width:100%!important;
  text-align:center;
}

#receipt .vnd{
  font-size:20px!important;
  font-weight:900;
  color:#0b2444;
  white-space:nowrap;
  padding-left:0!important;
  margin-left:0!important;
}

.signs{
  position:absolute;
  left:140px;
  right:140px;
  top:575px;
  display:grid;
  grid-template-columns:1fr 1fr;
  text-align:center;
  z-index:4;
}

.signs b{
  display:block;
  font-size:25px;
  color:#0b2444;
}

.signs em{
  display:block;
  font-size:17px;
  color:#203a5b;
  margin-top:3px;
}

.daky{
  display:block;
  margin-top:44px;
  font-size:24px;
  font-style:italic;
}

.signImg{
  width:310px;
  height:110px;
  object-fit:contain;
  margin-top:8px;
  mix-blend-mode:multiply;
}

.bottom{
  position:absolute;
  left:76px;
  right:76px;
  bottom:32px;
  display:grid;
  grid-template-columns:1fr 1fr;
  text-align:center;
  font-size:23px;
  color:#0b2444;
  z-index:5;
}

.btns{
  display:flex;
  gap:12px;
}

.btns button{
  flex:1;
  font-size:18px;
}

.btn-secondary{
  background:#667085;
}

.btn-download{
  background:#11845b;
}

.btn-primary{
  background:#0b61c9;
}

.panel{
  padding:16px;
  margin-top:8px;
}

.panel h3{
  font-size:24px;
  margin-bottom:12px;
}

.filters{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:6px;
}

.filters label{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:14px;
  font-weight:900;
  color:#334155;
}

.filters input,
.filters select{
  width:230px;
}

.filters label input{
  width:155px;
}

.compactFilters{
  align-items:flex-end;
}

.compactFilters .legacyFilter{
  display:none!important;
}

.compactFilters .wideSearch{
  flex:1 1 360px;
  min-width:360px;
}

.detailBtn,
.kpiButton{
  border-radius:8px;
  padding:8px 12px;
  font-size:14px;
}

.kpiButton{
  width:100%;
  height:100%;
  text-align:left;
  background:#f8fafc;
  color:#061b34;
  border:1px solid #e2e8f0;
}

.kpiButton:hover{
  filter:none;
  border-color:#0b61c9;
  background:#eff6ff;
}

.receiptDetailGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 16px;
  margin-bottom:14px;
}

.receiptDetailGrid p{
  font-size:15px;
  color:#334155;
}

.receiptDetailGrid b{
  color:#061b34;
}

.receiptImageBox{
  border:1px solid #dbe4ee;
  border-radius:12px;
  overflow:auto;
  background:#f8fafc;
  max-height:58vh;
  text-align:center;
}

.receiptImageBox img{
  max-width:100%;
  height:auto;
  display:block;
  margin:0 auto;
}

.bankBreakdownList{
  display:grid;
  gap:8px;
}

.bankBreakdownList div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}

.detailImageLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:8px;
  background:#0b61c9;
  color:#fff;
  text-decoration:none;
  font-weight:800;
}

.filterNote{
  margin:0 0 12px;
  color:#64748b;
  font-size:14px;
  font-weight:700;
}

.updateDataNote{
  margin:0 0 10px;
  padding:8px 14px;
  background:#fefce8;
  border:1px solid #fde047;
  border-radius:10px;
  color:#854d0e;
  font-size:14px;
  font-weight:700;
}

#lookupTab.panel,
#reportTab.panel{
  height:78vh!important;
  max-height:78vh!important;
  overflow:hidden!important;
  display:none;
  flex-direction:column;
}

#closeoutTab.panel{
  display:none;
  flex-direction:column;
  height:auto!important;
  min-height:calc(100vh - 120px)!important;
  max-height:none!important;
  overflow:visible!important;
}

#lookupTab.active,
#reportTab.active,
#closeoutTab.active{
  display:flex!important;
}

#invoiceTable,
#reportTable{
  flex:1 1 auto;
  min-height:0!important;
  overflow:hidden!important;
}


.tableScroll{
  height:100%!important;
  max-height:none!important;
  overflow:auto!important;
  position:relative!important;
  border:1px solid #dfe7f1;
  border-radius:12px;
  background:#fff;
}

.gridTable{
  width:100%;
  min-width:920px;
  table-layout:fixed;
  border-collapse:separate!important;
  border-spacing:0!important;
}

.gridTable thead{
  display:table-header-group!important;
}

.gridTable thead th{
  position:sticky!important;
  top:0!important;
  z-index:50!important;
  background:#f3f6fa!important;
  color:#061b34!important;
  font-weight:900!important;
  border-bottom:2px solid #cbd5e1!important;
  box-shadow:0 2px 0 #dfe7f1,0 4px 10px rgba(6,27,52,.08)!important;
}

.gridTable th,
.gridTable td{
  padding:10px 12px;
  font-size:15px;
  line-height:1.25;
  background:#fff;
  word-break:break-word;
  border:1px solid #e1e7ef;
}

.gridTable th{
  background:#f3f6fa!important;
}

.gridTable td.num,
.gridTable th.num{
  text-align:right;
  white-space:nowrap;
  min-width:125px;
  width:125px;
}

#invoiceTable .gridTable th:nth-child(1),
#invoiceTable .gridTable td:nth-child(1){width:105px}

#invoiceTable .gridTable th:nth-child(2),
#invoiceTable .gridTable td:nth-child(2){width:175px}

#invoiceTable .gridTable th:nth-child(3),
#invoiceTable .gridTable td:nth-child(3){width:100px}

#invoiceTable .gridTable th:nth-child(4),
#invoiceTable .gridTable td:nth-child(4){width:160px}

#invoiceTable .gridTable th:nth-child(6),
#invoiceTable .gridTable td:nth-child(6){width:160px}

#invoiceTable .gridTable th:nth-child(7),
#invoiceTable .gridTable td:nth-child(7){width:110px}

#invoiceTable .gridTable th:nth-child(8),
#invoiceTable .gridTable td:nth-child(8){width:60px}

#invoiceTable .gridTable th:nth-child(9),
#invoiceTable .gridTable td:nth-child(9){width:120px}

#reportTable .gridTable th:nth-child(1),
#reportTable .gridTable td:nth-child(1){width:110px}

#reportTable .gridTable th:nth-child(2),
#reportTable .gridTable td:nth-child(2){width:180px}

#reportTable .gridTable th:nth-child(3),
#reportTable .gridTable td:nth-child(3){width:110px}

#reportTable .gridTable th:nth-child(5),
#reportTable .gridTable td:nth-child(5){width:130px}

#reportTable .gridTable th:nth-child(6),
#reportTable .gridTable td:nth-child(6){width:170px}

#reportTable .gridTable th:nth-child(8),
#reportTable .gridTable td:nth-child(8){width:110px}

.summaryCards{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-bottom:12px;
}

.card{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:12px;
}

.card small{
  display:block;
  color:#64748b;
}

.card b{
  display:block;
  font-size:20px;
  margin-top:5px;
}

.endDayReport{
  width:1040px;
  max-width:100%;
  margin:0 auto;
  padding:14px 18px 18px;
  color:#111;
  background:#fff;
  font-family:"Times New Roman",serif;
}

.closeoutLogo{
  height:48px;
  display:flex;
  align-items:center;
}

.closeoutLogo img{
  height:46px;
  width:auto;
  object-fit:contain;
}

.endDayReport h2,
.endDayReport h3{
  text-align:center;
  color:#111;
  margin:0;
  line-height:1.25;
  font-weight:900;
}

.endDayReport h2{
  font-size:30px;
}

.endDayReport h3{
  font-size:22px;
  margin-bottom:8px;
}

.reportMoneyLines,
.unitReportBlock{
  border:1px solid #111;
  border-bottom:0;
}

.reportLine{
  display:grid;
  grid-template-columns:1fr 28px 170px;
  min-height:34px;
  align-items:center;
  border-bottom:1px solid #111;
  font-size:22px;
  font-weight:700;
}

.reportLine span{
  padding:4px 8px;
}

.reportLine em{
  text-align:center;
  font-style:normal;
}

.reportLine b{
  padding:4px 8px;
  text-align:right;
}

.reportLine.bold{
  font-weight:900;
}

.cashCountTable{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:21px;
}

.cashCountTable th,
.cashCountTable td{
  border:1px solid #111;
  padding:5px 8px;
  text-align:center;
}

.cashCountTable th{
  background:#d9d9d9;
  font-weight:900;
}

.cashCountTable td.num{
  text-align:right;
}

.cashCountTable input{
  width:100%;
  height:28px;
  border:0;
  text-align:center;
  font:inherit;
  background:transparent;
  outline:0;
}

.cashTotalRow td:first-child{
  background:#fff200;
  font-weight:900;
}

.cashTotalRow td:last-child{
  font-weight:900;
  text-align:right;
}

.printTime{
  border-left:1px solid #111;
  border-right:1px solid #111;
  padding:4px 8px;
  text-align:center;
  font-size:18px;
  font-style:italic;
}

.unitReportBlock{
  margin-top:22px;
}

.unitReportBlock h4{
  margin:0;
  padding:6px 8px;
  text-align:center;
  background:#d9d9d9;
  border-bottom:1px solid #111;
  font-size:22px;
  font-weight:900;
}

.shiftInputLabel{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-weight:900;
  color:#203047;
}

.shiftInputLabel input{
  height:46px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0 14px;
  font-size:22px;
  text-align:right;
}

.draftActions{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top:16px;
}

.miniBtn{
  padding:7px 9px;
  font-size:13px;
  margin-right:4px;
}

#progressBox{
  position:fixed;
  left:50%;
  top:50%;
  bottom:auto;
  transform:translate(-50%,-50%);
  width:720px;
  background:#fff;
  padding:18px 20px;
  border-radius:16px;
  box-shadow:0 18px 70px rgba(0,0,0,.38);
  z-index:99999;
  font-weight:900;
}

.progressOuter{
  height:16px;
  background:#dce3ec;
  border-radius:999px;
  overflow:hidden;
  margin-top:10px;
}

.progressInner{
  height:100%;
  width:0;
  background:#0b61c9;
  transition:.2s;
}

#msg{
  width:1120px;
  min-height:26px;
  font-weight:900;
  color:#0b61c9;
}

#msg.error{
  color:#d92d20;
}

.modalOverlay{
  position:fixed;
  inset:0;
  z-index:99999;
  background:rgba(3,10,22,.74)!important;
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
}

.editModalBox,
.modalBox{
  width:720px;
  max-width:calc(100vw - 32px);
  max-height:calc(100vh - 36px);
  overflow:auto;
  background:#ffffff;
  border-radius:20px;
  padding:24px;
  color:#061b34;
  box-shadow:0 28px 90px rgba(0,0,0,.48);
  border:1px solid #dbe4ee;
}

.modalBox.smallModal{
  width:640px;
}

.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  border-bottom:1px solid #d8e0eb;
  padding-bottom:14px;
  margin-bottom:16px;
}

.modalHead h3{
  font-size:28px;
  line-height:1.15;
  color:#061b34;
  margin:0 0 4px;
  font-weight:900;
}

.modalHead p{
  font-size:15px;
  color:#5d6b7c;
}

.modalClose{
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:#edf2f7;
  font-size:30px;
  font-weight:900;
  cursor:pointer;
  flex-shrink:0;
}

.editFormGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px 16px;
}

.editFormGrid label{
  display:flex;
  flex-direction:column;
  gap:7px;
  font-weight:900;
  font-size:14px;
  color:#203047;
}

.editFormGrid label.full{
  grid-column:1/-1;
}

.editFormGrid input,
.editFormGrid select,
.editFormGrid textarea{
  width:100%;
  height:42px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0 12px;
  background:#fff;
  font-size:17px;
  color:#111;
  font-family:"Inter",Arial,Helvetica,sans-serif!important;
}

.editFormGrid textarea{
  height:auto;
  padding:10px 12px;
  resize:vertical;
}

.editPreview{
  margin-top:16px;
  background:#f8fafc;
  border:1px dashed #b8c4d6;
  border-radius:12px;
  padding:12px 14px;
  line-height:1.55;
  font-size:16px;
}

.confirmList{
  background:#ffffff;
  border:2px solid #d9e2ef;
  border-radius:12px;
  padding:12px 14px;
  line-height:1.85;
  font-size:17px;
  color:#061b34;
}

.confirmList b{
  color:#061b34;
}

.modalActions{
  display:flex;
  gap:12px;
  margin-top:18px;
  justify-content:flex-end;
}

.modalActions button{
  border:0;
  border-radius:10px;
  padding:13px 22px;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
}

.centerPopup{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:100000;
  width:460px;
  max-width:calc(100vw - 28px);
  background:#fff;
  border-radius:18px;
  padding:22px 24px 20px;
  box-shadow:0 28px 80px rgba(0,0,0,.46);
  border:2px solid #dbe4ee;
  color:#102848;
  text-align:center;
  font-family:"Inter",Arial,Helvetica,sans-serif!important;
}

.centerPopup.success{
  border-top:8px solid #11845b;
}

.centerPopup.error{
  border-top:8px solid #d92d20;
}

.centerPopup.info{
  border-top:8px solid #0b61c9;
}

.centerPopupTitle{
  font-size:24px;
  font-weight:900;
  margin:4px 28px 10px;
}

.centerPopupBody{
  font-size:17px;
  line-height:1.55;
  font-weight:700;
}

.centerPopupBody a{
  color:#0b61c9;
  font-weight:900;
}

.reportBreakdowns{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:10px 0 14px;
}

.reportMiniBox{
  border:1px solid #dde3ea;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}

.reportMiniBox h4{
  font-size:14px;
  padding:8px 10px;
  background:#f1f5f9;
  color:#0f2748;
}

.miniReportTable{
  font-size:13px;
}

.miniReportTable td{
  padding:6px 8px;
}

.centerPopupClose{
  position:absolute;
  right:10px;
  top:8px;
  width:34px;
  height:34px;
  border-radius:50%;
  padding:0;
  background:#edf2f7;
  color:#102848;
  font-size:24px;
  line-height:34px;
  font-weight:900;
}

@page{
  size:A4 landscape;
  margin:8mm;
}

@media print{
  body{
    background:#fff;
    padding:0;
    gap:0;
  }

  .appShell,
  .btns,
  .panel,
  #msg,
  #progressBox{
    display:none!important;
  }

  .page{
    box-shadow:none;
    margin:0;
  }

  body.view-report .appShell,
  body.view-report #reportTab.panel{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    border:0!important;
    box-shadow:none!important;
    padding:0!important;
    margin:0!important;
  }

  body.view-report .compactMenuBar,
  body.view-report #reportTab h3,
  body.view-report .filters,
  body.view-report .filterNote,
  body.view-report #reportSummary,
  body.view-report #reportTable{
    display:none!important;
  }

  body.view-report .endDayReport{
    width:100%!important;
    max-width:none!important;
    padding:0!important;
    transform:none!important;
  }

  body.view-report .closeoutLogo{
    height:42px!important;
  }

  body.view-report .closeoutLogo img{
    height:40px!important;
  }

  body.view-report .endDayReport h2{
    font-size:26px!important;
  }

  body.view-report .endDayReport h3{
    font-size:20px!important;
  }

  body.view-report .reportLine,
  body.view-report .cashCountTable{
    font-size:18px!important;
  }

  body.view-report .unitReportBlock{
    margin-top:12px!important;
  }
}

@media(max-width:760px){
  .reportBreakdowns{
    grid-template-columns:1fr;
  }

  .editFormGrid{
    grid-template-columns:1fr;
  }

  .modalActions{
    flex-direction:column;
  }
}

.homeMenuBox{width:1120px;min-height:620px;background:#fff;border:1px solid #dde3ea;border-radius:22px;box-shadow:0 12px 35px rgba(15,35,55,.08);text-align:center;padding:34px 24px;position:relative}.homeMenuBox h2{font-size:34px;font-weight:900;color:#061b34;margin-bottom:24px}.mainMenuRow{display:flex;justify-content:center;gap:28px;position:relative;z-index:20}.mainMenuItem{position:relative;width:190px}.mainBtn{width:190px;height:68px;border-radius:18px;font-size:26px;font-weight:900;background:#0b61c9}.subMenuPopup{display:none;position:absolute;left:50%;top:78px;transform:translateX(-50%);width:190px;background:#fff;border:1px solid #d9e2ef;border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.20);padding:10px;z-index:9999}.subMenuPopup.open{display:block}.subMenuPopup button{width:100%;margin:5px 0;background:#f1f5f9;color:#061b34;border-radius:12px;font-size:18px}.subMenuPopup button:hover{background:#0b61c9;color:#fff}.subMenuPopup button.danger{background:#fee4e2;color:#b42318}.homeLogo{display:block;width:360px;max-width:70vw;margin:90px auto 0;object-fit:contain}

body.home-view #receipt,body.home-view .btns,body.home-view #lookupTab,body.home-view #reportTab,body.home-view #closeoutTab,body.home-view #adminUsersTab,body.home-view #adminDataTab,body.home-view #receiptTab{display:none!important}body.home-view #appShell{display:block!important}

body.view-receipt .homeMenuBox,
body.view-lookup .homeMenuBox,
body.view-report .homeMenuBox,
body.view-closeout .homeMenuBox,
body.view-admin .homeMenuBox{
  display:none!important;
}
.compactMenuBar{
  width:1120px;
  display:none;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid #dde3ea;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(15,35,55,.06);
  padding:8px 10px;
  margin-top:0;
  position:relative;
  z-index:1000;
}
body.view-receipt .compactMenuBar,
body.view-lookup .compactMenuBar,
body.view-report .compactMenuBar,
body.view-closeout .compactMenuBar,
body.view-admin .compactMenuBar{
  display:flex!important;
}
body.home-view .compactMenuBar{display:none!important}
.compactHomeBtn,
.miniMainBtn{
  height:42px!important;
  min-width:92px;
  padding:0 14px!important;
  border-radius:10px!important;
  font-size:15px!important;
  line-height:1.1!important;
}
.compactHomeBtn{background:#667085!important}
.miniMenuItem{position:relative;display:inline-flex}
.miniSubMenu{
  top:48px!important;
  width:150px!important;
  border-radius:12px!important;
  padding:8px!important;
}
.miniSubMenu button{
  font-size:15px!important;
  height:36px!important;
  margin:3px 0!important;
  padding:0 8px!important;
}

.controlPanel{
  margin-top:8px!important;
  padding:8px 10px!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
}
.controlPanel label{
  font-size:16px!important;
  gap:8px!important;
}
.controlPanel select{
  width:210px!important;
  height:40px!important;
}
.controlPanel input[type="date"]{
  width:155px!important;
  height:40px!important;
  font-size:16px!important;
}
.btnGetNo,
.controlPanel button{
  height:42px!important;
  padding:0 13px!important;
  font-size:15px!important;
}

.cornerLogo{
  position:absolute!important;
  top:24px!important;
  left:15px!important;
  width:190px!important;
  height:auto!important;
  max-height:190px!important;
  object-fit:contain!important;
  object-position:center!important;
  z-index:3!important;
}
.biz{
  top:22px!important;
  left:210px!important;
  right:24px!important;
}
.biz h1{
  font-size:32px!important;
  line-height:1.12!important;
  white-space:nowrap!important;
  letter-spacing:.2px!important;
}
.biz p{
  font-size:23px!important;
  line-height:1.1!important;
  margin-top:8px!important;
}
.soBox{
  top:88px!important;
  right:48px!important;
  width:170px!important;
  height:82px!important;
}
.title{
  top:145px!important;
  font-size:62px!important;
}
.divider{top:212px!important;left:370px!important;right:370px!important}
.date{top:230px!important;font-size:26px!important}
.content{
  top:292px!important;
  left:50px!important;
  right:58px!important;
  grid-template-columns:minmax(0,1fr) 365px!important;
  column-gap:30px!important;
  font-size:21px!important;
}
.contentLeft{gap:11px!important}
.contentRight{gap:11px!important}
.fieldLine{min-height:34px!important;white-space:nowrap!important}
#receipt .fieldLine input,
#receipt .fieldLine select{font-size:21px!important;height:33px!important;line-height:33px!important}
#receipt .contentRight .fieldLine{grid-template-columns:150px 1fr!important}
#receipt .contentRight .moneyLine{grid-template-columns:150px 170px auto!important}
#receipt #sotien{width:170px!important;min-width:170px!important;font-size:21px!important}
#receipt .vnd{font-size:20px!important}
.signs{top:570px!important}
.bottom{bottom:32px!important}

body.receipt-other .soBox{display:none!important}
body.receipt-other .normalOnly{display:none!important}
body.receipt-other .content{
  top:292px!important;
  grid-template-columns:minmax(0,1fr) 365px!important;
}
body.receipt-other .contentLeft{gap:12px!important}
body.receipt-other #reasonPrefix{display:none!important}
body.receipt-other .contentLeft .reasonLine{grid-template-columns:auto 1fr!important}

/* === FIX UI 2026-04-30: mở rộng vùng báo cáo/kết ca để không mất nút và xem đủ dữ liệu === */
:root{--ntc-wide:calc(100vw - 28px);--ntc-max-wide:1780px;}
.appShell,.btns,.panel,.compactMenuBar,#msg{
  width:var(--ntc-wide)!important;
  max-width:var(--ntc-max-wide)!important;
}
.homeMenuBox{
  width:var(--ntc-wide)!important;
  max-width:var(--ntc-max-wide)!important;
}
body.view-report{
  align-items:center!important;
  overflow-x:hidden!important;
}
body.view-report #reportTab.panel{
  height:calc(100vh - 116px)!important;
  max-height:none!important;
  padding:14px 18px 18px!important;
  overflow:hidden!important;
}
body.view-report #reportSummary.summaryCards{
  grid-template-columns:repeat(4,minmax(150px,1fr))!important;
  gap:12px!important;
}
body.view-report #reportTable{
  min-height:0!important;
}
@media(max-width:1280px){
  body.view-report #reportSummary.summaryCards{grid-template-columns:repeat(3,1fr)!important;}
}
/* === FIX KẾT CA: không hiện trang chủ khi vào Kết ca === */
body.view-closeout #appShell{
  display:block!important;
}

body.view-closeout #receipt,
body.view-closeout .btns,
body.view-closeout #lookupTab,
body.view-closeout #reportTab,
body.view-closeout #receiptTab,
body.view-closeout .homeMenuBox{
  display:none!important;
}

body.view-closeout #closeoutTab.panel{
  display:flex!important;
  flex-direction:column!important;
  height:auto!important;
  min-height:calc(100vh - 120px)!important;
  max-height:none!important;
  overflow:visible!important;
  padding:14px 18px 18px!important;
}

body.view-closeout #closeoutPrintable{
  display:block!important;
  flex:1 1 auto!important;
  min-height:620px!important;
  max-height:none!important;
  overflow:auto!important;
}
/* === FIX: đưa nút TẢI PNG / LƯU lên thanh phiếu, bỏ hàng nút dưới === */
body.view-receipt .btns{
  display:none!important;
}

body.view-receipt .controlPanel{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  padding:8px 10px!important;
}

body.view-receipt .controlPanel label{
  flex:0 0 auto!important;
}

body.view-receipt .receiptTopBtn{
  height:42px!important;
  min-width:120px!important;
  padding:0 18px!important;
  font-size:16px!important;
  border-radius:12px!important;
  white-space:nowrap!important;
}

body.view-receipt .receiptTopBtn:first-of-type{
  margin-left:auto!important;
}

.adminConfigGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}
.adminConfigBox{
  border:1px solid #dbe3ef;
  border-radius:8px;
  padding:12px;
  background:#fff;
}
.adminConfigBox h4{
  margin:0 0 10px;
  color:#0f172a;
}
.adminInlineForm input,
.adminInlineForm select{
  min-width:130px;
}
.okText{color:#047857;font-weight:700}
.errorText{color:#dc2626;font-weight:700}

body.receipt-page{
  align-items:center;
  background:#fff;
}

body.receipt-page .appShell{
  max-width:1840px;
}

/* === CUSTOM STYLE OVERRIDES FOR COMPACT NAV IN RECEIPT PAGE === */
.compactNav {
  gap: 10px !important;
  padding: 8px 0 !important;
  margin: 0 0 20px 0 !important;
  display: flex !important;
  align-items: center !important;
}

.compactNav > a,
.compactNav > button,
.compactNav > .navDrop > button {
  min-width: 120px !important;
  height: 44px !important;
  border-radius: 10px !important;
  padding: 0 18px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 4px rgba(11, 97, 201, 0.08) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(11, 97, 201, 0.1) !important;
}

.compactNav > .navBack {
  min-width: 140px !important;
  background: #64748b !important; /* Elegant slate grey */
  border-color: rgba(100, 116, 139, 0.1) !important;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.08) !important;
}

.compactNav > .navBack:hover {
  background: #475569 !important;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.16) !important;
}

.compactNav > a:hover,
.compactNav > button:hover,
.compactNav > .navDrop > button:hover {
  background: #0950a2 !important;
  color: #ffffff !important;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(11, 97, 201, 0.2) !important;
}

.compactNav .navDrop {
  position: relative;
}

.compactNav .navMenu {
  top: 45px !important;
  min-width: 190px !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06) !important;
  padding: 6px !important;
  gap: 4px !important;
  background: #ffffff !important;
  transform: translateX(-50%) translateY(10px) !important;
  display: flex !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
}

.compactNav .navMenu::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: -15px !important;
  left: 0 !important;
  right: 0 !important;
  height: 15px !important;
  background: transparent !important;
}

.compactNav .navMenu a,
.compactNav .navMenu button {
  font-size: 14px !important;
  height: 38px !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  color: #334155 !important;
  width: 100% !important;
  border: none !important;
  box-shadow: none !important;
  text-align: left !important;
  justify-content: flex-start !important;
  transition: all 0.15s ease !important;
}

.compactNav .navMenu a:hover,
.compactNav .navMenu button:hover {
  background: #f1f5f9 !important;
  color: #0b61c9 !important;
}

.compactNav .navMenu button.danger {
  color: #ef4444 !important;
  background: transparent !important;
}

.compactNav .navMenu button.danger:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

/* === WORKSPACE LAYOUT & PANEL REDESIGN === */
.receiptWorkspace {
  display: grid !important;
  grid-template-columns: minmax(760px, 1.15fr) minmax(480px, 0.85fr) !important;
  gap: 36px !important;
  align-items: start;
}

.receiptPreviewPanel {
  border: 1px solid #e2e8f0 !important;
  padding: 20px !important;
  border-radius: 16px !important;
  background: #f8fafc !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

.receiptPreviewToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between !important;
  gap: 16px;
  margin: 0 0 18px 0;
  width: 100%;
}

.toolbarGroup {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbarGroup button {
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.toolbarGroup button:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08) !important;
}

.toolbarGroup button:active {
  transform: translateY(0);
}

/* Specific actions styling */
.toolbarGroup.actionGroup button {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.toolbarGroup.actionGroup button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.toolbarGroup.actionGroup button.btn-primary {
  background: #0b61c9 !important;
  color: #ffffff !important;
  border: 1px solid #0b61c9 !important;
}

.toolbarGroup.actionGroup button.btn-primary:hover {
  background: #0950a2 !important;
  border-color: #0950a2 !important;
  box-shadow: 0 4px 12px rgba(11, 97, 201, 0.22) !important;
}

.toolbarGroup.actionGroup button.btn-download {
  background: #10b981 !important;
  color: #ffffff !important;
  border: 1px solid #10b981 !important;
}

.toolbarGroup.actionGroup button.btn-download:hover {
  background: #059669 !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22) !important;
}

.toolbarGroup.actionGroup button.btn-secondary {
  background: #64748b !important;
  color: #ffffff !important;
  border: 1px solid #64748b !important;
}

.toolbarGroup.actionGroup button.btn-secondary:hover {
  background: #475569 !important;
  border-color: #475569 !important;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2) !important;
}

/* Circle zoom buttons style */
.iconBtn {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #475569 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
}

.iconBtn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0b61c9 !important;
  transform: scale(1.06);
}

/* === FORM REDESIGN === */
.receiptForm {
  position: relative;
  display: grid;
  gap: 9px !important;
  padding: 12px 16px !important;
  min-height: auto !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04) !important;
}

.receiptForm h2 {
  width: 320px !important;
  max-width: 100%;
  justify-self: center;
  height: 40px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  border: none !important;
  border-radius: 99px !important;
  background: linear-gradient(135deg, #0b61c9 0%, #024fac 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 4px 14px rgba(11, 97, 201, 0.22) !important;
}

.receiptForm label,
.receiptForm .form-label-row {
  display: grid;
  grid-template-columns: 155px 1fr !important;
  align-items: center;
  gap: 8px !important;
  font-family: "Inter", Arial, sans-serif !important;
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  color: #344054 !important;
}

.form-dashed-separator {
  border: none !important;
  border-top: 1.5px dashed #cbd5e1 !important;
  margin: 4px 0 !important;
  width: 100% !important;
}

.receiptForm input,
.receiptForm select,
.receiptNoField {
  width: 100%;
  height: 36px !important;
  min-height: 36px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-family: "Inter", Arial, sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  outline: none !important;
}

.receiptForm input:hover,
.receiptForm select:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}

.receiptForm input:focus,
.receiptForm select:focus {
  background: #ffffff !important;
  border-color: #0b61c9 !important;
  box-shadow: 0 0 0 4px rgba(11, 97, 201, 0.12) !important;
}

/* Specialized No Field badge */
.receiptNoField {
  display: flex !important;
  align-items: center !important;
  font-weight: 700 !important;
  font-family: "Inter", Arial, monospace !important;
  color: #dc2626 !important;
  background: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  box-shadow: none !important;
}

/* Get No Button inside form styling */
.receiptForm .btnGetNo {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #eff6ff !important;
  color: #0b61c9 !important;
  border: 1px solid #bfdbfe !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
}

.receiptForm .btnGetNo:hover {
  background: #dbeafe !important;
  color: #0950a2 !important;
  border-color: #93c5fd !important;
  transform: translateY(-0.5px);
}

/* Inline Voucher Row styling */
.sophieu-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
}
.sophieu-row .receiptNoField {
  flex: 1 !important;
  margin: 0 !important;
}
.sophieu-row .btnGetNo {
  flex-shrink: 0 !important;
  margin: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}


.receiptCanvasWrap{
  position:relative;
  width:100%;
  min-height:492px;
  overflow:hidden !important;
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
}

.receipt-preview{
  transform-origin:top left;
  width:1120px!important;
  height:792px!important;
  box-shadow:none;
}

.receiptValue{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  border-bottom:1.8px dotted #aab4c0;
  color:#102a4c;
  padding:0 4px;
  overflow:hidden;
  white-space:nowrap;
}

.contentLeft .fieldLine .receiptValue{
  flex:1 1 auto;
}

.contentRight .fieldLine .receiptValue{
  width:100%;
  justify-content:center;
}

.moneyText{
  width:170px!important;
  justify-content:center;
  font-weight:900;
  color:#072245;
}

.paidStampImg{
  position:absolute;
  right:240px;
  top:505px;
  width:190px;
  height:auto;
  object-fit:contain;
  opacity:.86;
  transform:rotate(-10deg);
  z-index:6;
  pointer-events:none;
}

.receipt-export-page{
  transform:none!important;
}

.subjectPicker{
  display:grid;
  gap:8px;
}

.subjectChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  align-items: center;
  padding: 8px 12px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}

.subjectChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px !important;
  border-radius: 99px !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  color: #1e40af !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}

.subjectChip button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #3b82f6 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
}

.subjectChip button:hover {
  background: #1d4ed8 !important;
}

.subjectChipHint {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.receiptZoomBox{
  width:min(1180px,96vw);
  max-height:94vh;
  overflow:auto;
  background:#fff;
  border-radius:14px;
  padding:16px;
  box-shadow:0 26px 80px rgba(2,18,36,.26);
}

.receiptZoomCanvas{
  overflow:auto;
  padding:12px;
  background:#f8fafc;
  border-radius:10px;
}

@media (max-width:980px){
  .receiptWorkspace{
    grid-template-columns:1fr;
    gap:18px;
  }
  .receiptForm{
    position:static;
  }
  .receiptPreviewToolbar{
    align-items:flex-start;
  }
}


/* === Specificity override to hide main shell when app is locked === */
html body.locked #appShell {
  display: none !important;
}

/* === A5 Landscape Print styling for receipt-page === */
@media print {
  html body.print-receipt-mode {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 210mm !important;
    height: 148mm !important;
    overflow: hidden !important;
  }
  html body.print-receipt-mode #appShell,
  html body.print-receipt-mode #receiptTab,
  html body.print-receipt-mode .receiptPreviewPanel,
  html body.print-receipt-mode .receiptCanvasWrap {
    display: block !important;
    width: 210mm !important;
    height: 148mm !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
  }
  html body.print-receipt-mode .appNav,
  html body.print-receipt-mode .receiptForm,
  html body.print-receipt-mode .receiptPreviewToolbar,
  html body.print-receipt-mode #progressBox,
  html body.print-receipt-mode #msg {
    display: none !important;
  }
  html body.print-receipt-mode #receipt {
    display: block !important;
    transform: scale(0.706) !important;
    transform-origin: top left !important;
    width: 1120px !important;
    height: 792px !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }
}

