/* PP Account v21.22 — expense register and system-wide UI refinement */
.expenseHero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px;padding:26px 28px;border-radius:16px;background:linear-gradient(125deg,#123d31,#287759);color:#fff;box-shadow:0 14px 32px rgba(18,61,49,.17)}
.expenseHero .eyebrow{color:#f0d792}.expenseHero h2{margin:4px 0;font-size:29px}.expenseHero p{margin:0;color:#dceae3}.expenseHero .primary{min-height:48px;border-radius:8px;background:#fff;color:#18543e;white-space:nowrap}
.expenseMetrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.expenseMetrics article{position:relative;overflow:hidden;padding:19px 20px;border:1px solid #d9dfda;border-radius:13px;background:#fff;box-shadow:0 6px 20px rgba(26,52,41,.05)}.expenseMetrics article:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#718b7f}.expenseMetrics article.metricGood:before{background:#2d8a5c}.expenseMetrics article.metricWarning:before{background:#d49a2d}.expenseMetrics span,.expenseMetrics small{display:block;color:var(--muted)}.expenseMetrics span{font-weight:700}.expenseMetrics strong{display:block;margin:7px 0;font:26px Tahoma,Arial,sans-serif;color:#173c30}.expenseMetrics small{font-size:12px}
.expensePanel{overflow:hidden}.expensePanelHead{gap:15px}.expenseReportActions{display:flex;gap:8px}.expenseReportActions button{min-height:42px;padding:9px 13px;border:1px solid var(--green);border-radius:7px;background:#fff;color:var(--green);cursor:pointer;font-weight:700}
.expenseFilters{display:grid;grid-template-columns:minmax(260px,1.7fr) repeat(3,minmax(150px,.7fr));gap:12px;padding:16px 22px;border-top:1px solid #e4e8e4;border-bottom:1px solid #e4e8e4;background:#f7f9f7}.expenseFilters label{font-size:13px;font-weight:700;color:#42564d}.expenseFilters input,.expenseFilters select{display:block;width:100%;min-height:44px;margin-top:6px;padding:9px 11px;border:1px solid #cfd8d2;border-radius:7px;background:#fff}.expenseCustomDates{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.expenseFilterSummary{display:flex;justify-content:space-between;gap:12px;padding:11px 22px;background:#edf5f0;color:#275843}.expenseFilterSummary span{color:#63736b}
.expenseTable{min-width:1120px}.expenseTable td{vertical-align:top}.expenseTable td:nth-child(4){white-space:nowrap}.expenseTable tr.expenseVerified{background:#f0faf4}.expenseTable tr.expenseMissing{background:#fff9e9}.expenseTable tr.expenseCancelled{background:#f3f3f3;color:#8a8a8a;text-decoration-color:#aaa}.expenseStatus{display:inline-block;padding:5px 9px;border-radius:999px;font-weight:800;font-size:12px}.expenseStatus.status-pending{background:#fff0c8;color:#765800}.expenseStatus.status-missing{background:#ffe3dc;color:#913b2d}.expenseStatus.status-verified{background:#dff3e7;color:#226a45}.expenseStatus.status-cancelled{background:#e7e7e7;color:#666}.expenseEmpty{display:grid;gap:5px;place-items:center;padding:34px;color:#66746d}.expenseEmpty b{font-size:17px}
.pagination{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;padding:16px 20px;border-top:1px solid #e5e8e5}.pagination button,.pagination select{min-width:40px;min-height:40px;padding:7px 10px;border:1px solid #d1d9d4;border-radius:7px;background:#fff;color:#285b47;cursor:pointer}.pagination button.active{background:var(--green);border-color:var(--green);color:#fff}.pagination button:disabled{opacity:.4;cursor:not-allowed}.pagination label{margin-left:8px;color:var(--muted)}.pagination select{margin-left:5px}
.expenseForm{width:min(900px,100%)!important}.expenseForm .modalHead p{margin:5px 0 0;color:var(--muted)}.expenseCalculated{align-self:end;min-height:85px;margin:10px 0;padding:12px 14px;border-left:4px solid #26815e;border-radius:7px;background:#eaf6ef}.expenseCalculated span,.expenseCalculated strong,.expenseCalculated small{display:block}.expenseCalculated strong{margin:3px 0;font-size:24px;color:#126140}.expenseCalculated small{color:#66776e}.expenseFormHint{margin-top:14px;padding:11px 13px;border-radius:7px;background:#f2f5f3;color:#52645b}
.dashboardExpenseStrip{display:grid;grid-template-columns:1.1fr repeat(4,minmax(130px,1fr)) minmax(155px,1fr);gap:1px;margin:-2px 0 16px;overflow:hidden;border:1px solid #d9dfda;border-radius:13px;background:#d9dfda;box-shadow:0 6px 20px rgba(26,52,41,.05)}.dashboardExpenseStrip>div,.dashboardExpenseStrip>button{min-width:0;padding:15px 16px;border:0;background:#fff;text-align:left}.dashboardExpenseStrip span,.dashboardExpenseStrip b{display:block}.dashboardExpenseStrip span{color:var(--muted);font-size:12px}.dashboardExpenseStrip b{margin-top:4px;color:#173d31}.dashboardExpenseStrip .expenseStripTitle{background:#edf5f0}.dashboardExpenseStrip .expenseStripTitle b{font-size:17px}.dashboardExpenseStrip button{cursor:pointer;background:#fff8e8;color:#755508}.dashboardExpenseStrip button:hover{background:#fff0ca}.dashboardKpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.dashboardKpis .expenseDashMetric:before{background:#c7872f}

/* System-wide consistency: calmer panels, clearer focus, usable keyboard navigation */
button,input,select,textarea{border-radius:6px}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(37,121,89,.24);outline-offset:2px}.panel,.dashPanel{border-color:#d8ddd9!important}.panelHead h2{line-height:1.25}.tableWrap{scrollbar-width:thin;scrollbar-color:#9bac a transparent}tbody tr:hover{background:#f5f9f6}.editBtn{border-radius:7px!important}.primary,.upload{border-radius:7px}.content{padding-top:28px}header{padding-bottom:4px;border-bottom:1px solid rgba(104,119,110,.15)}

@media(max-width:1150px){.expenseMetrics{grid-template-columns:repeat(2,1fr)}.expenseFilters{grid-template-columns:1fr 1fr}.expenseSearch{grid-column:1/-1}.dashboardExpenseStrip{grid-template-columns:repeat(3,1fr)}.dashboardExpenseStrip .expenseStripTitle{grid-column:1/-1}}
@media(max-width:850px){.expenseHero{align-items:flex-start;flex-direction:column;padding:22px 19px}.expenseHero .primary{width:100%}.expenseMetrics{grid-template-columns:1fr 1fr}.expensePanelHead{align-items:flex-start;flex-direction:column}.expenseReportActions{width:100%}.expenseReportActions button{flex:1}.expenseFilters{grid-template-columns:1fr;padding:14px}.expenseSearch,.expenseCustomDates{grid-column:1}.expenseCustomDates{grid-template-columns:1fr}.expenseFilterSummary{align-items:flex-start;flex-direction:column;padding:11px 14px}.dashboardKpis{grid-template-columns:1fr 1fr!important}.dashboardExpenseStrip{grid-template-columns:1fr 1fr}.dashboardExpenseStrip .expenseStripTitle{grid-column:1/-1}.content>header{align-items:flex-start;gap:14px;flex-direction:column}.content>header label{width:100%}.content>header input{width:100%}}
@media(max-width:520px){.expenseMetrics,.dashboardKpis{grid-template-columns:1fr!important}.dashboardExpenseStrip{grid-template-columns:1fr}.dashboardExpenseStrip .expenseStripTitle{grid-column:1}.expenseReportActions{flex-direction:column}.expenseForm .formGrid{grid-template-columns:1fr}.expenseForm .full{grid-column:1}.pagination label{width:100%;text-align:center}}
.autoBackupInfo{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:17px;padding:18px 21px;border:1px solid #cfe0d6;border-radius:13px;background:#f2faf5;box-shadow:0 5px 18px rgba(27,91,65,.05)}.autoBackupInfo>div:first-child{display:flex;align-items:center;gap:12px}.autoBackupInfo b,.autoBackupInfo small{display:block}.autoBackupInfo small{margin-top:3px;color:#66776e}.autoBackupPulse{width:13px;height:13px;border:4px solid #cce8d8;border-radius:50%;background:#269260;box-shadow:0 0 0 5px #e3f4ea}.autoBackupPolicy{display:flex;gap:1px;overflow:hidden;border:1px solid #d6e3da;border-radius:9px;background:#d6e3da}.autoBackupPolicy span{min-width:105px;padding:9px 12px;background:#fff;text-align:center}.autoBackupPolicy b{color:#1e6b4e}.autoBackupPolicy small{font-size:11px}.backupType{display:inline-block;margin:5px 0 0 7px;padding:3px 7px;border-radius:12px;font-size:10px;font-weight:800;letter-spacing:.4px}.backupType.daily{background:#dff3e7;color:#236a45}.backupType.rolling{background:#e5eef9;color:#315e91}.backupType.manual{background:#fff0c9;color:#735600}@media(max-width:850px){.autoBackupInfo{align-items:flex-start;flex-direction:column}.autoBackupPolicy{width:100%}.autoBackupPolicy span{flex:1;min-width:0}}

/* ── v21.24 · กล่องแจ้งเตือนคุณภาพข้อมูลตอนนำเข้า PEAK ── */
.peakNotice{
  display:flex;flex-direction:column;gap:4px;
  margin:10px 0;padding:12px 14px;border-radius:12px;
  background:rgba(56,189,248,.08);border:1px solid rgba(56,189,248,.35);
  border-left-width:4px;font-size:13px;line-height:1.5;
}
.peakNotice.warn{background:rgba(251,191,36,.10);border-color:rgba(251,191,36,.45)}
.peakNotice b{font-size:13.5px;font-weight:700}
.peakNotice span{opacity:.9}
.peakNotice small{opacity:.72;font-size:12px}
.peakNotice span+span{margin-top:2px}

/* ── สรุปตามหมวดหมู่ (Category Breakdown Tab) ── */
.expenseTabSwitch{display:flex;gap:6px;margin-bottom:16px;padding:5px;border:1px solid #d9dfda;border-radius:11px;background:#eef2ef;width:fit-content}
.expenseTabSwitch button{min-height:40px;padding:9px 18px;border:0;border-radius:8px;background:transparent;color:#4c5c53;font-weight:700;cursor:pointer}
.expenseTabSwitch button.active{background:#fff;color:#173c30;box-shadow:0 3px 10px rgba(23,60,48,.12)}

.expenseSummaryHead{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.expenseSummaryHead p{margin:5px 0 0;color:var(--muted);max-width:60ch}
.expenseSummaryHead select{min-height:44px;padding:9px 11px;border:1px solid #cfd8d2;border-radius:7px;background:#fff}

.expenseCategoryGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.expenseCategoryTotal{grid-column:1/-1;display:flex;align-items:baseline;gap:14px;padding:16px 20px;border-radius:13px;background:linear-gradient(120deg,#123d31,#1f6b4f);color:#fff;box-shadow:0 10px 26px rgba(18,61,49,.18)}
.expenseCategoryTotal span{opacity:.85;font-size:13px}
.expenseCategoryTotal b{font-size:24px;font-family:Georgia,serif}
.expenseCategoryTotal small{opacity:.75;font-size:12px;margin-left:auto}

.expenseCategoryCard{position:relative;overflow:hidden;text-align:left;padding:18px 19px;border:1px solid #d9dfda;border-radius:13px;background:#fff;cursor:pointer;box-shadow:0 6px 20px rgba(26,52,41,.05);transition:transform .12s ease,box-shadow .12s ease}
.expenseCategoryCard:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(26,52,41,.10)}
.expenseCategoryCard:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:var(--cat-color)}
.expenseCategoryCard.active{border-color:var(--cat-color);box-shadow:0 0 0 2px var(--cat-color) inset,0 10px 24px rgba(26,52,41,.10)}
.catCardHead{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px}
.catIcon{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:9px;background:var(--cat-soft);color:var(--cat-color);font-size:17px}
.catCardTitle b{display:block;font-size:14.5px;color:#18251f}
.catCardTitle small{display:block;margin-top:2px;color:var(--muted);font-size:11.5px;line-height:1.4}
.catCardAmount{display:block;font:26px Georgia,serif;color:#173c30;margin-bottom:8px}
.catCardBar{height:7px;border-radius:99px;background:#eef1ee;overflow:hidden;margin-bottom:8px}
.catCardBar i{display:block;height:100%;background:var(--cat-color);border-radius:99px}
.catCardFoot{display:flex;justify-content:space-between;font-size:11.5px;color:var(--muted)}
.catChange{display:inline-block;margin-top:9px;padding:3px 9px;border-radius:99px;font-size:11px;font-weight:800}
.catChange.up{background:#ffe9df;color:#a1462b}
.catChange.down{background:#dff3e7;color:#226a45}
.catChange.flat{background:#eef2ef;color:#5b6b62}

.expenseCategoryDetail{padding:22px 24px}
.catDetailHead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;padding-bottom:16px;border-bottom:2px solid var(--cat-color)}
.catDetailHead h2{margin:4px 0}
.catDetailHead p{margin:0;color:var(--muted)}
.catDetailHead button{min-height:40px;padding:9px 14px;border:1px solid var(--cat-color);border-radius:7px;background:#fff;color:var(--cat-color);font-weight:700;cursor:pointer;white-space:nowrap}
.catDetailBody{display:grid;grid-template-columns:1.4fr 1fr;gap:26px}
.catListTitle{display:block;margin-bottom:10px;font-size:12.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.catBarRow{display:grid;grid-template-columns:1fr 2fr auto;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #eef1ee}
.catBarRow span{font-size:13px;color:#25352d}
.catBarRow small{display:block;color:var(--muted);font-size:11px}
.catBarTrack{height:8px;border-radius:99px;background:#eef1ee;overflow:hidden}
.catBarTrack i{display:block;height:100%;border-radius:99px}
.catBarRow b{font-size:13px;color:#173c30;white-space:nowrap}
.catVendorRow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #eef1ee}
.catVendorRow span{font-size:13px;color:#25352d}
.catVendorRow small{display:block;color:var(--muted);font-size:11px}
.catVendorRow b{font-size:13px;color:#173c30;white-space:nowrap}

@media(max-width:1150px){.expenseCategoryGrid{grid-template-columns:repeat(2,1fr)}.catDetailBody{grid-template-columns:1fr}}
@media(max-width:850px){.expenseCategoryGrid{grid-template-columns:1fr}.expenseSummaryHead{flex-direction:column;align-items:flex-start}.catDetailHead{flex-direction:column}.catDetailHead button{width:100%}}

/* ── ทะเบียนรับเช็ค (Cheque Receipt Register) ── */
.chequeCustomerRow{display:flex;gap:8px}
.chequeCustomerRow input{flex:1}
.chequeCustomerRow button{min-height:44px;padding:0 14px;border:1px solid #cfd8d2;border-radius:7px;background:#fff;font-weight:700;white-space:nowrap;cursor:pointer}
.chequeMatchHint{grid-column:1/-1;padding:12px 14px;border-radius:10px;background:rgba(56,189,248,.08);border:1px solid rgba(56,189,248,.35);border-left-width:4px;font-size:13px}
.chequeMatchHint b{display:block;font-size:13.5px}
.chequeMatchHint small{display:block;margin-top:3px;color:var(--muted)}
.chequeMatchWarnText{color:#a1462b}

.chequeBulkBar{display:flex;align-items:center;gap:12px;margin-bottom:12px;padding:10px 14px;border-radius:10px;background:#eef2ef;border:1px solid #d9dfda}
.chequeBulkBar span{font-weight:700;font-size:13px}
.chequeBulkBar button{min-height:38px;padding:0 14px;border-radius:7px;border:1px solid #173c30;background:#173c30;color:#fff;font-weight:700;cursor:pointer}
.chequeBulkBar #chequeClearSelection{background:#fff;color:#173c30}

.chequeTable td small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
.chequeStale{color:#a1462b!important;font-weight:700}
.chequeMatchBadge{color:#226a45!important}
.chequeMatchWarn{color:#a1462b!important}
.chequeUnmatched{display:inline-block;padding:2px 9px;border-radius:99px;background:#eef2ef;color:var(--muted);font-size:11.5px}
.chequeStatus.deposited{color:#226a45;font-weight:700}
.chequeStatus.pending{color:#a1462b;font-weight:700}
.chequePostDatedHint{grid-column:1/-1;padding:12px 14px;border-radius:10px;background:rgba(251,191,36,.10);border:1px solid rgba(251,191,36,.45);border-left-width:4px;font-size:13px}
.chequePostDatedHint b{display:block;font-size:13.5px;color:#a1462b}
.chequePostDatedHint small{display:block;margin-top:3px;color:var(--muted)}

/* ── คำนวณ VAT 7% อัตโนมัติในฟอร์มรายจ่าย (v21.24.23) ── */
.vatInputRow{display:flex;gap:6px;align-items:stretch}
.vatInputRow input{flex:1;min-width:0}
.vatInputRow button{flex:none;padding:0 12px;border:1px solid #cfd8d2;border-radius:7px;background:#fff;color:#1f6b4f;font:inherit;font-size:11.5px;font-weight:700;cursor:pointer;white-space:nowrap}
.vatInputRow button:hover{background:#eef7f2;border-color:#1f6b4f}
.vatHint{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.5}
.vatHint.manual{color:#8a6414}

/* ── รายงานบัญชี: หัก ณ ที่จ่าย / ค้นหาลูกค้า / ภ.พ.30 (v21.24.25) ── */
.rptBox{border:1px solid var(--line,#dedbd2);background:#fffdf8;padding:20px 22px;margin-bottom:18px}
.rptHead{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.rptHead h2{margin:4px 0;font-size:22px}
.rptHead p{margin:4px 0 0;color:var(--muted);font-size:12.5px;max-width:64ch}
.rptActions{display:flex;gap:8px}
.rptActions button{padding:8px 16px;border:1px solid #1f6b4f;background:#fff;color:#1f6b4f;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;border-radius:6px}
.rptActions button:hover{background:#eef7f2}
.rptCards{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line,#dedbd2);background:#fff;margin-bottom:14px}
.rptCard{padding:14px 16px;border-right:1px solid var(--line,#dedbd2)}
.rptCard:last-child{border-right:0}
.rptCard span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}
.rptCard strong{display:block;font:500 22px Georgia,serif;color:#18251f}
.rptCard small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.rptCard.ok strong{color:#1f6b4f}
.rptCard.warn strong{color:#8a6414}
.rptCard.bad strong{color:#9c412e}
.rptAlert{padding:12px 14px;margin:0 0 14px;background:#f7e3de;border-left:3px solid #9c412e;color:#7d3423;font-size:12.5px;line-height:1.65}
.rptEmpty{padding:26px;text-align:center;color:var(--muted);font-size:13px}
.rptNote{margin:12px 0 0;color:var(--muted);font-size:11.5px;line-height:1.6}
.rptScroll{max-height:460px;overflow:auto;border:1px solid #ebe8e0}
table.rptTable{width:100%;border-collapse:collapse;font-size:12.5px;background:#fff}
table.rptTable th{position:sticky;top:0;background:#ede9df;color:var(--muted);text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.3px;padding:9px 10px;white-space:nowrap}
table.rptTable th.r,table.rptTable td.r{text-align:right}
table.rptTable td{padding:8px 10px;border-bottom:1px solid #ebe8e0;vertical-align:top;white-space:nowrap}
table.rptTable td small{display:block;color:var(--muted);font-size:10.5px;margin-top:2px}
table.rptTable td.amt{font-family:Georgia,serif;font-weight:700}
table.rptTable tr.rowAlert td{background:#fdf4f1}
table.rptTable tfoot td{background:#f7f4ec;font-weight:700;border-top:2px solid #dedbd2}
table.pp30Table tfoot td.neg{color:#1f6b4f}
.okTag{display:inline-block;padding:2px 9px;border-radius:99px;background:#e3f1e8;color:#1f6b4f;font-size:11px;font-weight:700}
.warnTag{display:inline-block;padding:2px 9px;border-radius:99px;background:#fbf3e2;color:#8a6414;font-size:11px;font-weight:700}
.custInput{width:100%;max-width:520px;padding:11px 14px;border:1px solid #cfd8d2;background:#fff;font:inherit;font-size:13.5px;margin-bottom:12px}
.custCard{border:1px solid var(--line,#dedbd2);background:#fff;padding:14px 16px;margin-bottom:10px}
.custName{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.custName b{font-size:15px;color:#18251f}
.custFields{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #f0ede5}
.custFields>div{display:flex;align-items:baseline;gap:8px;font-size:12.5px}
.custFields>div.wide{grid-column:1/-1}
.custFields span{color:var(--muted);font-size:11.5px;min-width:88px}
.custFields b{color:#18251f;word-break:break-word}
.custFields b.muted{color:var(--muted);font-weight:400}
.custFields button{padding:3px 10px;border:1px solid #cfd8d2;background:#f7f4ec;font:inherit;font-size:11px;cursor:pointer;border-radius:5px;white-space:nowrap}
.custStats{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.custStats b{color:#18251f}
@media(max-width:900px){.rptCards{grid-template-columns:1fr 1fr}.rptCard:nth-child(2){border-right:0}.custFields{grid-template-columns:1fr}}
.waitTag{display:inline-block;padding:2px 9px;border-radius:99px;background:#eef2ef;color:#5b6b62;font-size:11px;font-weight:700}
.rptWait{padding:10px 13px;margin:0 0 14px;background:#eef2ef;border-left:3px solid #5b6b62;color:#4c5c53;font-size:12.5px;line-height:1.6}
.rptAlert u{text-decoration:underline}
.whtThresholdRow{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:12px;padding:10px 13px;background:#f4f1e9;border:1px solid var(--line,#dedbd2)}
.whtThresholdRow label{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;color:#18251f}
.whtThresholdRow select{padding:6px 10px;border:1px solid #cfd8d2;background:#fff;font:inherit;font-size:12.5px}
.whtBuckets{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.whtBuckets span b{color:#18251f}
.whtBuckets span.zero{opacity:.45}

/* ── เครื่องมือปิดเดือน (v21.24.28) ── */
.meGrid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;margin-bottom:18px}
.meBox{margin-bottom:0}
.meAlert{padding:14px 16px;margin-bottom:16px;border-left:4px solid #9c412e;background:#f7e3de;color:#7d3423;font-size:12.5px;line-height:1.7}
.meAlert b{font-size:13.5px}
.meMini{margin-top:8px;padding:6px 13px;border:1px solid #9c412e;background:#fff;color:#9c412e;font:inherit;font-size:11.5px;font-weight:700;cursor:pointer;border-radius:5px}
.meList{list-style:none;margin:0;padding:0}
.meList li{display:flex;gap:11px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #f0ede5;font-size:12.5px}
.meList li:last-child{border-bottom:0}
.meIcon{flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;margin-top:1px}
.me-ok .meIcon{background:#1f6b4f}
.me-warn .meIcon{background:#d89a2b}
.me-bad .meIcon{background:#9c412e}
.me-info .meIcon{background:#5b6b62}
.meList b{display:block;color:#18251f}
.meList small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px;line-height:1.55}
.meRed{color:#9c412e}
.meDeadlines{list-style:none;margin:0;padding:0}
.meDeadlines li{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #f0ede5}
.meDeadlines li:last-child{border-bottom:0}
.meDue{flex:none;width:46px;text-align:center;padding:5px 0;border:1px solid var(--line,#dedbd2);background:#f7f4ec;border-radius:6px}
.meDue b{display:block;font:500 18px Georgia,serif;line-height:1}
.meDue small{display:block;font-size:10px;color:var(--muted)}
.meDeadlines li>span:nth-child(2){flex:1;font-size:12.5px}
.meDeadlines li>span:nth-child(2) b{display:block;color:#18251f}
.meDeadlines li>span:nth-child(2) small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.meLeft{flex:none;font-size:11.5px;font-weight:700;color:var(--muted);white-space:nowrap}
.meDeadlines li.soon .meLeft{color:#8a6414}
.meDeadlines li.urgent .meLeft{color:#9c412e}
.meDeadlines li.urgent .meDue{border-color:#9c412e;background:#f7e3de}
.meTable tbody tr.meRevenue td{background:#f7f9f7;font-weight:700}
.meTable td.muted{color:var(--muted)}
.mePct{font-size:11.5px;font-weight:700}
.mePct.up{color:#1f6b4f}
.mePct.down{color:#9c412e}
@media(max-width:1000px){.meGrid{grid-template-columns:1fr}}

/* ── ข้อมูลการจัดส่งในฟอร์มติดตามลูกหนี้ Project (v21.24.33) ── */
.deliveryBlock{margin-top:16px;padding:16px 18px;border:1px solid var(--line,#dedbd2);border-left:3px solid #1f6b4f;background:#f7faf8;border-radius:10px}
.deliveryHead{margin-bottom:10px}
.deliveryHead b{display:block;font-size:14px;color:#18251f;margin-top:2px}
.deliveryHead span{display:block;color:var(--muted);font-size:11.5px;margin-top:3px;line-height:1.55}
.deliveryBlock .formGrid{gap:0 18px}
.deliveryOtherWrap>span{display:block;font-size:11px;font-weight:700;margin-bottom:2px}
.deliveryTag{display:block;margin-top:6px;padding:5px 10px;border-radius:7px;background:#eef7f2;color:#1c5b43;font-size:11.5px;line-height:1.5}

/* ── ศูนย์ควบคุมแอดมิน (v21.24.35) ── */
.adminHead{margin-bottom:14px}
.adminHead h2{margin:4px 0;font-size:24px}
.adminHead p{margin:4px 0 0;color:var(--muted);font-size:13px;max-width:70ch}
.adminTabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line,#dedbd2);margin-bottom:18px}
.adminTabs button{padding:11px 18px;border:1px solid var(--line,#dedbd2);border-bottom:0;background:#f4f1e9;color:var(--muted);font:inherit;font-size:13px;font-weight:700;cursor:pointer;margin-bottom:-1px;border-radius:10px 10px 0 0}
.adminTabs button.active{background:#fffdf8;color:#18251f}
.adminNote{padding:12px 14px;margin:0 0 16px;background:#eef7f2;border-left:3px solid #1f6b4f;color:#3a4d43;font-size:12.5px;line-height:1.7}
.menuGroup{margin-bottom:18px;border:1px solid var(--line,#dedbd2);background:#fffdf8;border-radius:12px;padding:14px 16px}
.menuGroupTitle{display:block;font-size:11px;letter-spacing:1px;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.menuRow{display:grid;grid-template-columns:minmax(150px,1fr) minmax(0,1.4fr) auto;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid #f0ede5}
.menuRow:last-child{border-bottom:0}
.menuRowKey b{display:block;font-size:13px;color:#18251f}
.menuRowKey small{display:block;color:var(--muted);font-size:11px;margin-top:1px;font-family:ui-monospace,monospace}
.menuRow input{width:100%;padding:9px 12px;border:1px solid #cfd8d2;background:#fff;font:inherit;font-size:13px;border-radius:8px}
.menuRow button{padding:7px 13px;border:1px solid #cfd8d2;background:#fff;color:var(--muted);font:inherit;font-size:11.5px;cursor:pointer;border-radius:7px;white-space:nowrap}
.menuRow button:hover{border-color:#9c412e;color:#9c412e}
.menuRowSpacer{display:block;width:78px}
.adminActions{display:flex;gap:10px;flex-wrap:wrap;padding-top:6px}
.adminActions button{padding:11px 20px;border:1px solid #cfd8d2;background:#fff;font:inherit;font-size:13px;font-weight:700;cursor:pointer;border-radius:8px}
.adminActions button.primary{background:#1f6b4f;color:#fff;border-color:#1f6b4f}
.adminActions button:disabled{opacity:.5;cursor:default}
.adminActions #menuLabelsResetAll{margin-left:auto;color:#9c412e;border-color:#e0c3ba}
@media(max-width:760px){.menuRow{grid-template-columns:1fr}.menuRowSpacer{display:none}.adminActions #menuLabelsResetAll{margin-left:0}}
.rptCard.bad strong{color:#9c412e}
.gapRow{display:flex;align-items:center;gap:12px;padding:7px 0;border-bottom:1px solid #f0ede5;font-size:12.5px}
.gapRow:last-child{border-bottom:0}
.gapRow>span:first-child{color:var(--muted);font-size:11.5px}
.gapRow b{font-family:ui-monospace,monospace;color:#9c412e}
.gapCount{margin-left:auto;padding:2px 9px;border-radius:99px;background:#f7e3de;color:#7d3423;font-size:11px;font-weight:700}
.orderList{border:1px solid var(--line,#dedbd2);background:#fffdf8;border-radius:12px;padding:8px 14px;margin-bottom:16px}
.orderRow{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid #f0ede5}
.orderRow:last-child{border-bottom:0}
.orderIndex{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#eef2ef;color:var(--muted);font-size:11.5px;font-weight:700}
.orderName{flex:1;min-width:0}
.orderName b{display:block;font-size:13px;color:#18251f}
.orderName small{display:block;color:var(--muted);font-size:11px;font-family:ui-monospace,monospace;margin-top:1px}
.orderBtns{flex:none;display:flex;gap:5px}
.orderBtns button{width:34px;height:34px;border:1px solid #cfd8d2;background:#fff;color:#1f6b4f;font-size:12px;cursor:pointer;border-radius:7px;line-height:1}
.orderBtns button:hover:not(:disabled){background:#eef7f2;border-color:#1f6b4f}
.orderBtns button:disabled{opacity:.32;cursor:default}
.chequeTable td:last-child{min-width:180px}.chequeTable td:last-child button{margin:2px}
.chequeReceiptBlock{grid-column:1/-1;padding:14px;border:1px solid #cbd8d1;border-radius:12px;background:#f6faf8}
.chequeReceiptHead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.chequeReceiptHead span{display:flex;flex-direction:column;gap:3px}.chequeReceiptHead small{color:#52635c;font-weight:400}
.chequeReceiptHead button,.chequeReceiptRow button{border:1px solid #267457;background:#fff;color:#145d45;border-radius:9px;padding:8px 12px;font-weight:700}
.chequeReceiptRow{display:grid;grid-template-columns:70px minmax(180px,1fr) 64px;gap:8px;align-items:center;margin-top:8px}
.chequeReceiptRow>span{font-weight:700;color:#315448}.chequeReceiptRow input{width:100%}
.chequeReceiptRow button:disabled{opacity:.35;cursor:not-allowed}
.chequeReceiptLookup{position:relative;min-width:0}.chequeReceiptSuggestions{position:absolute;z-index:35;top:calc(100% + 5px);left:0;right:0;max-height:280px;overflow:auto;padding:6px;border:1px solid #a9c5b7;border-radius:10px;background:#fff;box-shadow:0 13px 30px rgba(19,55,42,.18)}
.chequeReceiptSuggestions button{display:grid;width:100%;grid-template-columns:minmax(130px,.8fr) minmax(170px,1.5fr) auto;gap:8px;align-items:center;border:0!important;border-radius:7px!important;padding:9px 10px!important;text-align:left;background:#fff!important;color:#173d31!important}.chequeReceiptSuggestions button:hover,.chequeReceiptSuggestions button:focus{background:#edf7f1!important;outline:2px solid #82b89f}.chequeReceiptSuggestions button b,.chequeReceiptSuggestions button span,.chequeReceiptSuggestions button small{min-width:0;overflow-wrap:anywhere}.chequeReceiptSuggestions button small{color:#63756b}.chequeReceiptSuggestionEmpty,.chequeReceiptSuggestionMore{display:block;margin:0;padding:9px 10px;color:#7b5a25;font-size:12px}
.chequeReceiptChips,.chequeMatchList{display:flex;flex-wrap:wrap;gap:6px}
.chequeReceiptChips span,.chequeMatchList span{display:flex;flex-direction:column;gap:2px;padding:6px 8px;border-radius:8px;border:1px solid #ccd8d2;background:#fff}
.chequeReceiptChips .matched,.chequeMatchList .matched{border-color:#9dceb8;background:#edf8f2;color:#145d45}
.chequeReceiptChips .unmatched,.chequeMatchList .unmatched{border-color:#e5c59a;background:#fff8e9;color:#80541c}
.chequeMatchList{margin-top:8px}
@media(max-width:680px){.chequeReceiptHead{align-items:flex-start;flex-direction:column}.chequeReceiptHead button{width:100%}.chequeReceiptRow{grid-template-columns:52px minmax(130px,1fr) 54px}.chequeReceiptRow button{padding:8px 6px}.chequeReceiptSuggestions{position:fixed;left:12px;right:12px;top:auto;bottom:12px;max-height:45vh}.chequeReceiptSuggestions button{grid-template-columns:1fr}.chequeActions button{width:100%}}
