/* Comprehensive accounting workspace */
.accounting-command-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:176px;padding:30px 32px;margin-bottom:18px;border-radius:24px;color:#fff;background:radial-gradient(circle at 10% 10%,rgba(255,255,255,.14),transparent 150px),linear-gradient(125deg,#1c2250,#165aa7 58%,#087ac8);box-shadow:0 22px 46px rgba(16,89,174,.17)}
.accounting-command-hero:after{content:"";position:absolute;left:-70px;bottom:-120px;width:300px;height:300px;border:52px solid rgba(255,255,255,.055);border-radius:50%}.accounting-command-hero>*{position:relative;z-index:1}.accounting-command-hero .eyebrow{color:#bfe4ff}.accounting-command-hero h2{margin:4px 0 7px;font-size:27px}.accounting-command-hero p{margin:0;color:#e2efff;font-size:13px}
.accounting-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:17px}.accounting-kpi-grid article{position:relative;min-width:0;padding:18px 18px 16px;border:1px solid #e8e8ee;border-radius:18px;background:#fff;box-shadow:0 4px 14px rgba(35,37,78,.04)}.accounting-kpi-grid article:after{content:"";position:absolute;right:0;left:0;bottom:0;height:3px;border-radius:0 0 18px 18px;background:#1059ae}.accounting-kpi-grid article:nth-child(2):after{background:#16a085}.accounting-kpi-grid article:nth-child(3):after{background:#f3a52b}.accounting-kpi-grid article:nth-child(4):after{background:#8b5cf6}.accounting-kpi-grid article.negative:after{background:#ef4056}.accounting-kpi-grid small{display:block;color:#7f8193;font-size:11px;font-weight:700}.accounting-kpi-grid b{display:block;margin:9px 0 2px;color:#272a50;font-size:20px;white-space:nowrap}.accounting-kpi-grid em{color:#999aaa;font-size:10px;font-style:normal}.kpi-icon{width:38px;height:38px;display:grid;place-items:center;float:left;margin-right:8px;border-radius:12px;background:#edf6ff;color:#1059ae;font-size:18px;font-weight:900}.kpi-icon.receive{background:#eafaf5;color:#108966}.kpi-icon.payable{background:#fff6e5;color:#a76600}.kpi-icon.profit{background:#f3eeff;color:#7652c7}
.accounting-module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:17px}.accounting-module-card{display:flex;align-items:center;gap:13px;min-height:108px;padding:16px;border:1px solid #e8e8ee;border-radius:18px;background:#fff;box-shadow:0 4px 14px rgba(35,37,78,.035);transition:.18s}.accounting-module-card:hover{border-color:#ffd0d7;box-shadow:0 12px 30px rgba(35,37,78,.07);transform:translateY(-2px)}.accounting-module-card>span{width:45px;height:45px;display:grid;place-items:center;flex:none;border-radius:14px;background:#fff0f2;color:#ef4056;font-size:22px}.accounting-module-card div{min-width:0}.accounting-module-card b{display:block;color:#292c52;font-size:14px}.accounting-module-card small{display:block;margin-top:4px;color:#858799;font-size:10px;line-height:1.65}.accounting-module-card i{margin-right:auto;color:#b4b5c0;font-style:normal;font-size:19px}
.accounting-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px}.accounting-alert-panel a{display:grid;grid-template-columns:1fr auto;gap:3px 10px;padding:14px 2px;border-bottom:1px solid #eeeeF2}.accounting-alert-panel a:last-child{border-bottom:0}.accounting-alert-panel span{color:#72748a;font-size:11px}.accounting-alert-panel b{color:#292c52;font-size:13px}.accounting-alert-panel small{grid-column:1/-1;color:#a0a1ad;font-size:10px}
.accounting-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:5px 3px 16px}.accounting-page-head h2{margin:3px 0 3px;color:#26294f;font-size:23px}.accounting-page-head p{margin:0;color:#808296;font-size:12px}.accounting-split{display:grid;grid-template-columns:minmax(310px,.72fr) minmax(0,1.55fr);gap:16px}.accounting-split.equal{grid-template-columns:repeat(2,minmax(0,1fr))}
.treasury-balance-grid,.cheque-summary-grid,.inventory-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.treasury-balance-grid article,.cheque-summary,.inventory-kpis article{padding:16px;border:1px solid #e8e8ee;border-radius:16px;background:#fff}.treasury-balance-grid small,.cheque-summary small,.inventory-kpis small{display:block;color:#858799;font-size:10px}.treasury-balance-grid b,.cheque-summary b,.inventory-kpis b{display:block;margin-top:5px;color:#292c52;font-size:17px}.direction-badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800}.direction-badge.receipt{background:#eaf8f2;color:#087a57}.direction-badge.payment{background:#fff0f2;color:#c52940}.cheque-status{display:inline-flex;padding:4px 8px;border-radius:999px;background:#f1f3f7;color:#5d6079;font-size:10px;font-weight:800}.overdue-row{background:#fffafb!important}.low-stock-row{background:#fffaf1!important}.negative-number{color:#d62f48!important;font-weight:800}
.journal-lines-panel{padding:0!important;overflow:hidden}.journal-lines-panel .panel-head{padding:18px 18px 0}.journal-entry-table input,.journal-entry-table select,.purchase-lines input,.purchase-lines select{min-width:105px;width:100%;border:1px solid #e2e3e8;border-radius:9px;padding:8px;background:#fff}.journal-entry-table th:first-child,.journal-entry-table td:first-child,.purchase-lines th:first-child,.purchase-lines td:first-child{width:42px;text-align:center}.journal-entry-table tfoot td{background:#f8f8fa;font-weight:900}.journal-submit-bar,.purchase-summary{position:sticky;bottom:12px;z-index:30;display:flex;align-items:center;justify-content:flex-end;gap:14px;padding:13px 15px;margin:12px 0;border:1px solid #e2e3e9;border-radius:16px;background:rgba(255,255,255,.94);backdrop-filter:blur(15px);box-shadow:0 14px 36px rgba(35,37,78,.11)}.journal-submit-bar label{display:flex;align-items:center;gap:8px;margin-left:auto}.journal-submit-bar select{border:1px solid #dedfe6;border-radius:9px;padding:7px}.journal-submit-bar [data-journal-balance-state]{padding:6px 10px;border-radius:999px;background:#fff3e3;color:#9b6100;font-size:11px;font-weight:800}.journal-submit-bar [data-journal-balance-state].balanced{background:#e8f8f1;color:#087a57}.purchase-summary div{min-width:150px}.purchase-summary span{display:block;color:#858799;font-size:10px}.purchase-summary b{font-size:15px}.purchase-summary button{margin-right:auto}
.accounting-filter-wide{display:grid!important;grid-template-columns:minmax(230px,1fr) 180px 180px auto!important}.search-wrap{position:relative}.search-wrap span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#999}.search-wrap input{padding-right:35px!important}.table-wrap.tall{max-height:650px}.account-level-group td:first-child b{font-size:14px}.account-level-ledger td:first-child{padding-right:28px}.account-level-detail td:first-child{padding-right:45px}
.report-tabs{display:flex;gap:7px;overflow:auto;padding:4px 1px 14px}.report-tabs a{flex:none;padding:8px 13px;border:1px solid #e5e6eb;border-radius:999px;background:#fff;color:#686a80;font-size:11px;font-weight:800}.report-tabs a.active{border-color:#ffd2d9;background:#fff0f2;color:#d7334b}.report-title{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid #ececf1}.financial-statement{max-width:980px;margin:0 auto 18px;padding:26px;border:1px solid #e4e5ea;border-radius:20px;background:#fff;box-shadow:0 8px 26px rgba(35,37,78,.055)}.financial-statement>header{display:flex;align-items:center;gap:15px;padding-bottom:18px;border-bottom:2px solid #2b2e54}.financial-statement>header img{width:72px;height:72px;object-fit:contain}.financial-statement h2{margin:0}.financial-statement p{margin:3px 0 0;color:#858799}.statement-section{padding:18px 0}.statement-section h3{margin:0 0 10px;color:#303356;font-size:15px}.statement-section>div{display:flex;justify-content:space-between;gap:20px;padding:7px 2px;border-bottom:1px dashed #ececf1}.statement-total{padding-top:12px!important;border-bottom:0!important;color:#1f2248;font-size:15px}.statement-net{display:flex;justify-content:space-between;padding:15px 17px;border-radius:13px;background:#eaf8f2;color:#087a57;font-weight:900}.statement-net.negative{background:#fff0f2;color:#c52940}.balance-columns{display:grid;grid-template-columns:1fr 1fr;gap:28px}
@media(max-width:1250px){.accounting-module-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.treasury-balance-grid,.cheque-summary-grid,.inventory-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.accounting-command-hero,.accounting-page-head{align-items:flex-start;flex-direction:column}.accounting-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-dashboard-grid,.accounting-split,.accounting-split.equal,.balance-columns{grid-template-columns:1fr}.accounting-filter-wide{grid-template-columns:1fr!important}.journal-submit-bar,.purchase-summary{position:static;flex-wrap:wrap}.purchase-summary button{width:100%;margin:0}}
@media(max-width:580px){.accounting-kpi-grid,.accounting-module-grid,.treasury-balance-grid,.cheque-summary-grid,.inventory-kpis{grid-template-columns:1fr}.accounting-command-hero{padding:23px 20px}.accounting-command-hero h2{font-size:22px}.accounting-page-head h2{font-size:20px}.financial-statement{padding:16px}.journal-submit-bar>*{width:100%}}
@media print{.accounting-page-head .btn,.report-tabs,.filter-bar,.journal-submit-bar{display:none!important}.financial-statement{max-width:none;border:0;box-shadow:none}}
.report-period-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:13px 15px;margin:0 0 15px}.report-period-filter>div{display:grid;gap:5px}.report-period-filter label{color:#6f7187;font-size:10px;font-weight:800}.report-period-filter input{min-width:150px;padding:9px 10px;border:1px solid #e1e2e8;border-radius:10px;background:#fff}.report-period-filter small{margin-right:auto;color:#9293a2;font-size:10px}.field-hint{display:block;margin-top:5px;color:#898b9b;font-size:10px}.statement-warning{margin-top:10px!important;padding:10px 12px!important;border:1px solid #ffd6dc!important;border-radius:10px;background:#fff2f4;color:#c52a42;font-weight:800}
@media(max-width:640px){.report-period-filter>*{width:100%}.report-period-filter input{width:100%}.report-period-filter small{margin:0}}
.opening-row td{background:#fff8e7!important;color:#73510b!important;border-bottom-color:#f3dfaa!important}.opening-row b{color:#5f4309!important}
.field-disabled{opacity:.58}.field-disabled select{cursor:not-allowed;background:#f4f4f7!important}

/* v6.27 accounting period lock */
.accounting-lock-banner{display:flex;align-items:center;gap:12px;border-color:#f0c66e;background:#fffaf0;color:#765000}
.accounting-lock-banner b{white-space:nowrap;font-size:13px}.accounting-lock-banner span{flex:1;line-height:1.8}.accounting-lock-banner .btn{flex:none}
@media(max-width:720px){.accounting-lock-banner{align-items:flex-start;flex-direction:column}.accounting-lock-banner .btn{width:100%}}

/* v6.33 — unified inventory lookup for daily sales and purchase invoices */
.daily-inventory-finder{
  position:relative;
  display:grid;
  gap:6px;
  margin:0 0 12px;
  padding:11px;
  border:1px solid #e1b27d;
  border-radius:13px;
  background:linear-gradient(135deg,#fff8f0,#f7f8f9);
}
.daily-inventory-search-shell{
  display:grid;
  grid-template-columns:22px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:0 11px;
  border:1px solid #d4d9df;
  border-radius:11px;
  background:#fff;
}
.daily-inventory-search-shell:focus-within{
  border-color:#e67e22;
  box-shadow:0 0 0 4px rgba(230,126,34,.12);
}
.daily-inventory-search-shell .ui-svg{width:18px;height:18px;color:#d46d15}
.daily-inventory-search-shell input{width:100%;min-width:0;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;font-family:inherit}
.daily-inventory-search-shell kbd{padding:3px 7px;border:1px solid #d6dbe0;border-bottom-width:2px;border-radius:6px;background:#f1f3f5;color:#626b75;font-family:inherit;font-size:9px}
.daily-inventory-finder>small{color:#7a624c;font-size:9px}

.inventory-quick-menu,.purchase-lookup-menu{
  position:fixed;
  z-index:5000;
  max-height:min(430px,calc(100vh - 30px));
  overflow:auto;
  padding:7px;
  border:1px solid #cbd2d9;
  border-radius:14px;
  background:#fff;
  box-shadow:0 24px 65px rgba(31,35,40,.24);
  direction:rtl;
}
.inventory-quick-result,.purchase-lookup-result,.purchase-lookup-new{
  width:100%;
  display:grid;
  grid-template-columns:minmax(220px,1fr) 160px 120px;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:10px;
  background:#fff;
  color:#30363d;
  text-align:right;
  font-family:inherit;
  cursor:pointer;
}
.inventory-quick-result:hover,.inventory-quick-result.active,.purchase-lookup-result:hover,.purchase-lookup-result.active,.purchase-lookup-new:hover,.purchase-lookup-new.active{
  border-color:#edaa69;
  background:#fff4e9;
}
.inventory-quick-result span:first-child,.purchase-lookup-result span:first-child,.purchase-lookup-new span:first-child{display:grid;gap:3px}
.inventory-quick-result b,.purchase-lookup-result b,.purchase-lookup-new b{font-size:11px}
.inventory-quick-result small,.purchase-lookup-result small,.purchase-lookup-new small{color:#7b858e;font-size:8px;direction:ltr;text-align:right}
.inventory-quick-result>span:not(:first-child),.purchase-lookup-result>span:not(:first-child){color:#59636e;font-size:9px;text-align:center}
.inventory-quick-result.is-empty{opacity:.62}
.inventory-quick-result.is-empty>span:nth-child(2){color:#b4493b}
.inventory-quick-empty,.purchase-lookup-empty{padding:18px;text-align:center;color:#7c858e;font-size:10px}
.purchase-lookup-new{grid-template-columns:minmax(0,1fr) 130px;margin-top:5px;border-top:1px dashed #e0c3a5;color:#a95a13}
.purchase-lookup-new>span:last-child{text-align:center;font-weight:900}

.purchase-entry-note{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:-3px 0 12px;
}
.purchase-entry-note span{
  padding:5px 8px;
  border:1px solid #d9dee3;
  border-radius:999px;
  background:#f7f8f9;
  color:#5f6872;
  font-size:8.5px;
}
.purchase-entry-note span:nth-child(2){border-color:#edbd8c;background:#fff3e7;color:#a95a13}
.purchase-table-wrap{overflow:auto;min-height:245px}
.purchase-lines{min-width:1320px}
.purchase-lines th:nth-child(2){min-width:255px}
.purchase-lines th:nth-child(3){min-width:220px}
.purchase-lines th:nth-child(4){min-width:140px}
.purchase-lines input,.purchase-lines select{width:100%;min-width:0}
.purchase-lookup-cell{position:relative;min-width:255px}
.purchase-lookup-cell>[data-purchase-search]{font-weight:800}
.purchase-lookup-cell>[data-purchase-match-state]{display:block;max-width:250px;margin-top:4px;color:#7c858e;font-size:8px;line-height:1.6;white-space:normal}
.purchase-lookup-cell>[data-purchase-match-state].is-matched{color:#28724e}
.purchase-lookup-cell>[data-purchase-match-state].is-new{color:#b16015}
.purchase-lookup-cell>[data-purchase-match-state].is-expense{color:#69727c}
.purchase-lines [data-purchase-stock-mode]{font-size:9px;font-weight:800}
.purchase-lines [data-purchase-line-total]{font-weight:900;color:#a95a13;white-space:nowrap}

@media(max-width:720px){
  .inventory-quick-result,.purchase-lookup-result{grid-template-columns:1fr 105px}
  .inventory-quick-result>span:last-child,.purchase-lookup-result>span:last-child{display:none}
  .purchase-lookup-new{grid-template-columns:1fr}
  .purchase-lookup-new>span:last-child{text-align:right}
}

/* v6.35 accounting integrity control center */
.accounting-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.accounting-head-actions form{margin:0}
.accounting-control-kpis{margin-top:14px}
.accounting-control-kpis article.negative{border-color:#efb0a8;background:#fff7f5}
.accounting-control-kpis article.negative b{color:#b23f34}
@media(max-width:760px){.accounting-head-actions{width:100%;justify-content:stretch}.accounting-head-actions>*{flex:1}.accounting-head-actions .btn{width:100%}}
