:root{--green:#176b4b;--green-dark:#164c39;--red:#b94046;--ink:#17221d;--paper:#fffef9;--bg:#f3f1ea;--line:#d8d9d2;--muted:#747d77;--blue:#365f86;--gold:#b98534;--radius:18px}
*{box-sizing:border-box}
html{background:var(--bg)}
body{min-height:100vh;margin:0;color:var(--ink);background:radial-gradient(circle at 8% 10%,rgba(203,155,69,.1),transparent 26rem),radial-gradient(circle at 95% 90%,rgba(23,107,75,.1),transparent 34rem),var(--bg);font-family:"NRT Reg",Tahoma,"Noto Sans Arabic",Arial,sans-serif;font-weight:500}
button,input,textarea,select{font:inherit}
a{color:inherit}
.topbar{position:sticky;top:0;z-index:40;color:#fff;background:rgba(18,68,50,.97);border-bottom:1px solid rgba(255,255,255,.14);box-shadow:0 10px 30px rgba(20,50,39,.16);backdrop-filter:blur(14px)}
.topbar-inner{width:min(1180px,calc(100% - 28px));min-height:82px;margin:auto;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px}
.topbar-actions{justify-self:start;display:flex;align-items:center;gap:7px}.menu-button{width:46px;height:46px;border:1px solid rgba(255,255,255,.23);border-radius:14px;color:#fff;background:rgba(255,255,255,.1);font-size:23px;cursor:pointer}.pdf-button{height:38px;padding:0 11px;border:1px solid rgba(255,255,255,.25);border-radius:11px;color:#164c39;background:#fff;font-size:11px;font-weight:900;cursor:pointer}
.page-heading{text-align:center;line-height:1.15}.page-heading h1{margin:0;font-size:clamp(20px,3vw,28px);font-weight:900}.page-heading small{display:block;margin-top:4px;color:#b7d8ca;font-size:10px}.page-heading time{display:block;margin-top:4px;color:#fff6d9;font-size:11px;font-weight:800;direction:ltr}
.brand{justify-self:end;display:flex;align-items:center;gap:10px}.brand>div{display:flex;flex-direction:column;align-items:end}.brand b{font-size:14px;letter-spacing:.18em}.brand small{margin-top:5px;color:#b7d8ca;font-size:10px}.brand>span,.auth-brand>span,.drawer-head>span{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;color:#fff;background:linear-gradient(145deg,#cb9b45,#9f6d23);font-size:20px;font-weight:900;box-shadow:inset 0 1px rgba(255,255,255,.3),0 8px 22px rgba(7,30,21,.22)}
.page-container{width:min(1180px,calc(100% - 28px));margin:auto;padding:28px 0 56px}
.drawer-backdrop{position:fixed;inset:0;z-index:60;background:rgba(5,18,13,.5);opacity:0;visibility:hidden;transition:.2s}.drawer{position:fixed;top:0;right:0;z-index:70;width:min(360px,88vw);height:100vh;display:flex;flex-direction:column;background:var(--paper);box-shadow:-20px 0 50px rgba(17,36,28,.2);transform:translateX(105%);transition:.25s ease}.menu-open .drawer{transform:none}.menu-open .drawer-backdrop{opacity:1;visibility:visible}.drawer-head{display:flex;align-items:center;gap:12px;padding:28px 22px;color:#fff;background:var(--green-dark)}.drawer-head>div{display:flex;flex:1;flex-direction:column;gap:3px}.drawer-head small{color:#b7d8ca}.drawer-head button{border:0;color:#fff;background:transparent;font-size:30px;cursor:pointer}.drawer nav{display:grid;gap:8px;padding:20px 15px}.drawer nav a{min-height:52px;padding:0 15px;display:flex;align-items:center;gap:13px;border-radius:14px;color:#4b5550;font-weight:800;text-decoration:none}.drawer nav a.active,.drawer nav a:hover{color:var(--green);background:#e4efe8;box-shadow:inset -3px 0 var(--green)}.drawer nav a span{width:24px;text-align:center;font-size:20px}.drawer-user{margin:auto 16px 12px;padding:15px;display:flex;flex-direction:column;gap:4px;border:1px solid var(--line);border-radius:15px;background:#f5f5ef}.drawer-user small{color:var(--muted)}.drawer-user span{color:var(--green);font-size:11px}.logout-link{margin:0 16px 18px;padding:13px;border-radius:13px;color:#a2343b;background:#f7e8e9;text-align:center;font-weight:800;text-decoration:none}
.flash{position:fixed;top:96px;left:50%;z-index:55;min-width:min(430px,calc(100% - 30px));padding:13px 18px;border-radius:14px;box-shadow:0 14px 34px rgba(20,40,32,.2);transform:translateX(-50%);text-align:center;font-weight:800}.flash.success{color:#155c41;background:#e4f2e9;border:1px solid #b9ddc8}.flash.error{color:#9f3038;background:#fae7e8;border:1px solid #edbec1}
.dashboard-stack,.receipts-stack{display:grid;gap:18px}.date-ribbon,.filter-card{min-height:78px;padding:14px 16px;display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:20px;background:rgba(255,254,249,.94);box-shadow:0 12px 35px rgba(53,67,58,.08)}.date-ribbon>div{display:flex;flex:1;flex-direction:column;gap:4px}.date-ribbon small{color:var(--muted)}.date-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;color:var(--green);background:#e5eee7;font-size:22px}.date-ribbon input,.filter-card input,.panel-title input{min-height:44px;padding:0 12px;border:1px solid #cfd4cf;border-radius:12px;background:#fff;direction:ltr}.filter-card{justify-content:space-between}.filter-card>div{display:flex;align-items:center;gap:9px;font-weight:900}.filter-card>div span{color:var(--green);font-size:22px}
.date-filter-panel{padding:16px;display:grid;grid-template-columns:minmax(190px,1fr) auto;gap:14px;border:1px solid var(--line);border-radius:20px;background:rgba(255,254,249,.96);box-shadow:0 12px 35px rgba(53,67,58,.08)}.date-filter-title{display:flex;align-items:center;gap:12px}.date-filter-title>div{display:flex;flex-direction:column;gap:4px}.date-filter-title small{color:var(--muted)}.quick-filters{display:flex;align-items:center;gap:7px}.quick-filter{min-height:42px;padding:0 13px;display:inline-flex;align-items:center;border:1px solid #cdd5cf;border-radius:11px;color:#536059;background:#fff;font-size:12px;font-weight:900;text-decoration:none}.quick-filter.active{color:#fff;border-color:var(--green);background:var(--green)}.range-form{grid-column:1/-1;padding-top:13px;display:grid;grid-template-columns:1fr 1fr auto;gap:10px;border-top:1px solid #e1e3de}.range-form label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:900}.range-form input{width:100%;min-height:43px;padding:0 10px;border:1px solid #cfd4cf;border-radius:11px;background:#fff;direction:ltr}.range-form button{min-height:43px;padding:0 20px;border:0;border-radius:11px;color:#fff;background:var(--blue);font-weight:900;cursor:pointer}
.ledger-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.button{min-height:46px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:13px;color:#fff;font-weight:900;text-decoration:none;cursor:pointer;transition:.18s}.button:hover{filter:brightness(.92)}.button.primary,.button.receipt{background:var(--green)}.button.debt{background:var(--red)}.button.blue{background:var(--blue)}.button.wide{width:100%}
.ledger-book{position:relative;min-height:470px;overflow:hidden;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"receiptHead debtHead" "receipt debt" "receiptTotal debtTotal";border:1px solid #d3d0c7;border-radius:24px;background-color:#fffdf4;background-image:linear-gradient(rgba(80,107,95,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(214,195,155,.055) 1px,transparent 1px);background-size:100% 36px,42px 100%;box-shadow:0 18px 50px rgba(67,64,50,.1),inset 0 1px #fff}.ledger-book:after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 70px rgba(169,144,93,.08)}.center-rule{position:absolute;top:0;bottom:0;left:50%;width:2px;background:#cabf9f;box-shadow:0 0 0 5px rgba(202,191,159,.09);transform:translateX(-1px)}
.ledger-head{min-height:87px;padding:15px 20px;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:9px;border-bottom:2px solid #7f765d;background:rgba(251,248,235,.8)}.ledger-head span{width:25px;height:25px;display:grid;place-items:center;border:2px solid;border-radius:50%;font-size:12px}.ledger-head b{font-size:clamp(17px,2.4vw,22px)}.ledger-head small{justify-self:end;color:#878578}.receipt-head{grid-area:receiptHead;color:var(--green)}.debt-head{grid-area:debtHead;color:var(--red)}.ledger-column{min-height:320px;padding:12px;display:flex;flex-direction:column;gap:9px}.receipt-column{grid-area:receipt}.debt-column{grid-area:debt}.ledger-item{padding:12px 13px;display:flex;flex-direction:column;gap:6px;border:1px solid;border-radius:14px;background:rgba(255,255,252,.9);box-shadow:0 4px 15px rgba(65,70,58,.05)}.receipt-item{border-color:#bddacb}.debt-item{color:#a12f37;border-color:#e4b9bb}.ledger-item-top{display:flex;align-items:center;justify-content:space-between;gap:7px}.ledger-item-top strong{min-width:0;flex:1}.ledger-item strong{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.ledger-item span,.ledger-item time{overflow:hidden;color:#7a7d76;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.ledger-item b{margin-top:3px;text-align:right}.receipt-item b{color:var(--green)}.delete-icon{width:24px;height:24px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;color:#fff;background:var(--red);font-size:16px;cursor:pointer}.empty-note{margin:auto;color:#96968c;text-align:center;font-size:12px}.ledger-total{min-height:79px;padding:14px 18px;display:flex;flex-direction:column;justify-content:center;gap:4px;border-top:2px solid #7f765d;background:rgba(246,242,227,.92)}.ledger-total span{color:#74766f;font-size:11px}.ledger-total strong{text-align:right;font-size:clamp(15px,2.8vw,21px)}.receipt-total{grid-area:receiptTotal;color:var(--green)}.debt-total{grid-area:debtTotal;color:var(--red)}
.app-dialog{width:min(520px,calc(100% - 24px));max-height:88vh;padding:0;border:1px solid var(--line);border-radius:22px;background:var(--paper);box-shadow:0 30px 80px rgba(19,39,31,.3)}.app-dialog::backdrop{background:rgba(7,22,16,.55);backdrop-filter:blur(3px)}.dialog-head{padding:20px 22px;display:flex;align-items:start;border-bottom:1px solid var(--line)}.dialog-head>div{flex:1}.dialog-head h2{margin:0;font-size:19px}.dialog-head p{margin:5px 0 0;color:var(--muted);font-size:12px}.dialog-head button{border:0;background:transparent;font-size:27px;cursor:pointer}.app-dialog form{padding:20px}
.form-stack{display:grid;gap:15px}.form-stack label{display:grid;gap:7px;color:#3e4943;font-size:13px;font-weight:800}.form-stack input,.form-stack textarea,.form-stack select{width:100%;min-height:47px;padding:10px 12px;border:1px solid #cfd4cf;border-radius:12px;color:var(--ink);background:#fff;outline:none}.form-stack input:focus,.form-stack textarea:focus,.form-stack select:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(23,107,75,.12)}.form-stack input[type=file]{height:auto;padding:8px}.form-section-title{margin-top:5px;padding:10px 12px;border-radius:11px;color:var(--green);background:#e8f0eb;font-weight:900}.automatic-user{padding:13px 14px;display:flex;align-items:center;gap:10px;border-radius:14px;background:#eef2ed}.automatic-user>span{color:var(--green);font-size:23px}.automatic-user>div{display:flex;flex-direction:column;gap:3px}.automatic-user small{color:var(--muted)}.role-help{padding:13px;display:grid;gap:5px;border-radius:13px;color:#466356;background:#edf3ef}.role-help span{font-size:11px;line-height:1.7}
.two-panel{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(0,1.25fr);gap:18px;align-items:start}.panel{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:rgba(255,254,249,.96);box-shadow:0 12px 35px rgba(53,67,58,.07)}.panel-title{padding:22px;display:flex;align-items:center;gap:12px}.panel-title.with-filter>div{flex:1}.panel-title h2{margin:0 0 4px;font-size:17px}.panel-title p{margin:0;color:var(--muted);font-size:11px}.section-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;font-size:20px;font-weight:900}.section-icon.coral{color:#b44742;background:#f7e5e2}.section-icon.green{color:var(--green);background:#e4efe8}.section-icon.blue{color:var(--blue);background:#e5edf7}.form-panel>.form-stack{padding:0 22px 22px}.list-panel.full{grid-column:1/-1}.table-scroll{overflow-x:auto}.panel table{width:100%;border-collapse:collapse;font-size:13px}.panel th,.panel td{padding:14px 16px;border-bottom:1px solid #e2e3dd;text-align:right;white-space:nowrap}.panel thead{background:#edf0eb}.panel tfoot{background:#f0f1ec}.red{color:var(--red);font-weight:900}.green{color:var(--green);font-weight:900}.mini-link,.customer-link{color:var(--green);font-weight:900;text-underline-offset:4px}.has-image{padding:5px 9px;border-radius:999px;color:var(--green);background:#e3f0e8;font-size:10px}.role-badge{padding:5px 9px;border-radius:999px;color:#455149;background:#edf0ec;font-size:10px;font-weight:900}.role-badge.admin{color:#79541a;background:#f4e7c9}.role-badge.manager{color:#365c83;background:#e4edf7}.role-badge.accountant{color:var(--green);background:#e3f0e8}
.large-empty{min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#8b928e;text-align:center}.large-empty>span{font-size:40px}.large-empty strong{color:#455049}.large-empty small{font-size:12px}.tabs{padding:5px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;border:1px solid var(--line);border-radius:16px;background:#e7e9e4}.tabs a{min-height:47px;padding:7px 10px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;color:#65706a;text-align:center;font-size:13px;font-weight:900;text-decoration:none}.tabs a.active{background:#fff;box-shadow:0 2px 8px rgba(41,54,47,.1)}.tabs a.receipt-tab{color:var(--green)}.tabs a.debt-tab{color:var(--red)}.tabs b{min-width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:#eef0eb;font-size:11px}.table-panel{min-height:260px}
.receipt-entry-form{padding:0 22px 22px;grid-template-columns:repeat(2,minmax(0,1fr))}.receipt-entry-form>input,.receipt-entry-form>.button{grid-column:1/-1}.delete-inline{display:inline}.delete-text{min-height:34px;padding:0 11px;border:1px solid #e5b9bc;border-radius:9px;color:#a72e36;background:#fff0f1;font-weight:900;cursor:pointer}.current-user-mark{color:var(--muted);font-size:10px}.detail-delete{margin-top:16px}.wide-delete{width:100%;min-height:45px}.detail-card>.detail-delete{display:block}
.detail-card{width:min(760px,100%);margin:auto;padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--paper);box-shadow:0 16px 45px rgba(44,61,52,.09)}.back-link{display:inline-flex;margin-bottom:16px;color:var(--green);font-weight:900;text-decoration:none}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.detail-grid>div{padding:14px;display:flex;flex-direction:column;gap:4px;border-radius:14px;background:#f1f3ef}.detail-grid small{color:var(--muted)}.detail-money{grid-column:1/-1!important;flex-direction:row!important;align-items:center;justify-content:space-between;color:var(--green);background:#e7f2eb!important}.detail-money.debt{color:var(--red);background:#f8e8e9!important}.detail-money strong{font-size:20px}.receipt-photo{margin-top:14px;overflow:hidden;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:17px;color:var(--green);background:#f3f5f1;text-align:center;text-decoration:none}.receipt-photo img{width:100%;max-height:600px;object-fit:contain;background:#e9ebe7}.receipt-photo span{padding:13px;font-size:12px;font-weight:900}.no-photo{min-height:130px;margin-top:14px;display:grid;place-items:center;border:1px dashed #cdd1cc;border-radius:16px;color:#939a96;background:#f7f7f3}
.auth-body{display:grid;place-items:center;padding:24px}.auth-shell,.install-shell{width:min(460px,100%)}.install-shell{width:min(580px,100%)}.auth-card{padding:28px;border:1px solid var(--line);border-radius:25px;background:rgba(255,254,249,.97);box-shadow:0 24px 70px rgba(35,55,45,.14)}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:25px}.auth-brand>div{display:flex;flex-direction:column}.auth-brand strong{font-size:19px}.auth-brand small{color:var(--muted)}.auth-card h1{margin:0 0 8px;font-size:25px}.auth-card>p{margin:0 0 20px;color:var(--muted);line-height:1.8}.success-box,.error-box{margin:12px 0;padding:12px;border-radius:12px;font-size:12px;font-weight:800}.success-box{color:#155c41;background:#e4f2e9}.error-box{color:#9f3038;background:#fae7e8}
@media(max-width:820px){.two-panel{grid-template-columns:1fr}.list-panel{order:2}.users-layout .list-panel{order:2}}
@media(max-width:620px){.topbar-inner{width:calc(100% - 20px);min-height:76px;grid-template-columns:94px 1fr 48px;gap:7px}.topbar-actions{gap:5px}.menu-button{width:42px;height:42px}.pdf-button{height:34px;padding:0 8px;font-size:10px}.brand>div{display:none}.page-heading small{font-size:8px}.page-heading time{font-size:9px}.page-heading h1{font-size:19px}.page-container{width:calc(100% - 20px);padding-top:18px}.date-filter-panel{grid-template-columns:1fr}.quick-filters{justify-content:stretch}.quick-filter{flex:1;justify-content:center;padding:0 5px}.range-form{grid-template-columns:1fr 1fr}.range-form button{grid-column:1/-1}.date-ribbon{display:grid;grid-template-columns:42px 1fr}.date-ribbon input{grid-column:1/-1;width:100%}.date-icon{width:42px;height:42px}.ledger-book{min-height:430px;border-radius:19px}.ledger-head{min-height:78px;padding:12px 10px;grid-template-columns:auto 1fr;gap:5px}.ledger-head small{grid-column:1/-1;justify-self:start;padding-right:25px;font-size:9px}.ledger-column{min-height:280px;padding:7px;gap:7px}.ledger-item{padding:9px 8px;border-radius:11px}.ledger-item strong{font-size:11px}.ledger-item span{font-size:9px}.delete-icon{width:21px;height:21px;font-size:14px}.ledger-total{min-height:70px;padding:11px 10px}.filter-card{align-items:stretch;flex-direction:column}.filter-card input{width:100%}.tabs a{padding:6px 5px;font-size:11px}.receipt-entry-form{grid-template-columns:1fr}.receipt-entry-form>.button{grid-column:auto}.panel{border-radius:18px}.panel th,.panel td{padding:12px 10px;font-size:11px}.detail-grid{grid-template-columns:1fr}.detail-money{grid-column:auto!important}.auth-card{padding:22px}}
@media(max-width:390px){.ledger-head b{font-size:15px}.ledger-head span{width:21px;height:21px}.ledger-item b{font-size:10px}.ledger-total strong{font-size:12px}.ledger-actions .button{padding:0 8px;font-size:12px}}

/* Version 3: partial payments, customers and faster forms */
.button:disabled{opacity:.5;cursor:not-allowed;filter:none}.button.gold{color:#493818;background:#d5aa55}.button.import-button{color:#fff;background:#526f8e}.section-icon.gold{color:#8a6427;background:#f5ead1}
.customer-warning{padding:13px 16px;border:1px solid #e3cf9f;border-radius:14px;color:#6e5322;background:#fff7e3;font-weight:800}.customer-warning a{color:var(--green);font-weight:900}
.remaining-field{padding:12px;border:1px solid #e5c8ca;border-radius:14px;color:var(--red)!important;background:#fff2f3}.remaining-field input{border:0!important;color:var(--red)!important;background:transparent!important;box-shadow:none!important;font-size:18px;font-weight:900}.amount-invalid{border-color:var(--red)!important;box-shadow:0 0 0 3px rgba(170,47,55,.12)!important}
.partial-mark{width:max-content;padding:3px 7px;border-radius:999px;color:#7a5a22!important;background:#f6e9cb;font-style:normal;font-weight:900}.partial-mark.debt{color:#9f3038!important;background:#f8e4e6}
.tabs.three-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.tabs a.partial-tab{color:#8a6427}.category-badge{padding:5px 9px;border-radius:999px;color:#795a22;background:#f5ead2;font-size:10px;font-weight:900}
.customers-layout{grid-template-columns:minmax(300px,.65fr) minmax(0,1.35fr)}.customer-list-head>div{flex:1}.customer-list-head form{display:flex;gap:7px}.customer-list-head input{min-height:41px;padding:0 10px;border:1px solid #cfd4cf;border-radius:10px;background:#fff}.customer-list-head button{padding:0 13px;border:0;border-radius:10px;color:#fff;background:var(--green);font-weight:900;cursor:pointer}
.import-help{padding:13px;display:grid;gap:5px;border-radius:13px;color:#405b70;background:#eaf0f6}.import-help span{font-size:11px}.app-dialog .import-help+label{margin-top:4px}
form[data-fast-form][data-processing="1"]{opacity:.78;pointer-events:none}
@media(max-width:820px){.customers-layout{grid-template-columns:1fr}}
@media(max-width:620px){.tabs.three-tabs{gap:3px}.tabs.three-tabs a{min-height:58px;padding:5px 3px;flex-direction:column;gap:3px;font-size:9px}.tabs.three-tabs b{height:20px;min-width:20px}.customer-list-head{align-items:stretch;flex-wrap:wrap}.customer-list-head form{width:100%}.customer-list-head input{min-width:0;flex:1}}

/* Version 4: customer statements and debt settlement */
.customer-search-panel{padding:15px 16px;display:grid;gap:12px;border:1px solid var(--line);border-radius:20px;background:rgba(255,254,249,.96);box-shadow:0 12px 35px rgba(53,67,58,.08)}.customer-search-panel form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.customer-search-panel label{display:grid;gap:6px;color:#4b5650;font-size:12px;font-weight:900}.customer-search-panel select{width:100%;min-height:44px;padding:0 12px;border:1px solid #cfd4cf;border-radius:11px;color:var(--ink);background:#fff}.customer-search-panel button{min-height:44px;padding:0 22px;border:0;border-radius:11px;color:#fff;background:var(--blue);font-weight:900;cursor:pointer}.customer-debt-result{padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:14px;background:#f1f3ef}.customer-debt-result>div{display:grid;gap:3px}.customer-debt-result small{color:var(--muted)}.customer-debt-result a{padding:8px 12px;border-radius:10px;color:#fff;background:var(--green);font-size:11px;font-weight:900;text-decoration:none}
.partial-mark.paid{color:#176b4b!important;background:#e3f0e8}.repayment-note{margin-top:3px;display:block;color:#547068;font-size:9px;font-weight:900;direction:rtl}.settle-box{min-width:170px}.settle-box summary{width:max-content;padding:7px 11px;border-radius:9px;color:#fff;background:var(--green);font-size:11px;font-weight:900;cursor:pointer;list-style:none}.settle-box summary::-webkit-details-marker{display:none}.settle-box[open]{padding:8px;border:1px solid #c8d9cf;border-radius:12px;background:#f2f7f4}.settle-box form{margin-top:8px;display:grid;gap:7px}.settle-box label{display:grid;gap:4px;color:#58625d;font-size:10px;font-weight:900}.settle-box input{width:100%;min-height:38px;padding:0 9px;border:1px solid #cbd2cd;border-radius:9px;background:#fff}.settle-box small{color:var(--red);font-size:9px;direction:rtl}.settle-box .button{min-height:38px;padding:0 10px;font-size:11px}
.statement-stack{display:grid;gap:18px}.statement-filter-form{padding:0 22px 22px;display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:10px;align-items:end}.statement-filter-form label{display:grid;gap:6px;color:#4a5550;font-size:12px;font-weight:900}.statement-filter-form select,.statement-filter-form input{width:100%;min-height:44px;padding:0 11px;border:1px solid #cfd4cf;border-radius:11px;background:#fff}.statement-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.statement-summary article{min-height:104px;padding:17px;display:flex;flex-direction:column;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:18px;background:var(--paper);box-shadow:0 10px 28px rgba(53,67,58,.06)}.statement-summary small{color:var(--muted);font-weight:800}.statement-summary strong{font-size:17px}.statement-kind{padding:5px 9px;border-radius:999px;color:var(--green);background:#e4f0e9;font-size:10px;font-weight:900}.statement-kind.debt{color:var(--red);background:#f8e7e8}.debt-settle{width:100%}.debt-settle summary{color:#9f3038;background:#f8e4e6}.debt-settle[open]{border-color:#e5bdc0;background:#fff5f5}
@media(max-width:820px){.statement-filter-form{grid-template-columns:1fr 1fr}.statement-filter-form label:first-child{grid-column:1/-1}.statement-filter-form .button{grid-column:1/-1}}
@media(max-width:620px){.customer-search-panel form{grid-template-columns:1fr}.customer-search-panel button{width:100%}.customer-debt-result{align-items:stretch;flex-direction:column}.customer-debt-result a{text-align:center}.statement-filter-form{padding:0 16px 16px;grid-template-columns:1fr}.statement-filter-form label:first-child,.statement-filter-form .button{grid-column:auto}.statement-summary{grid-template-columns:1fr}.statement-summary article{min-height:82px}.settle-box{min-width:145px}}

/* Version 8: mobile customer names and searchable customer fields */
.dashboard-stack{margin-top:-10px;gap:10px}.dashboard-tools{position:relative;z-index:25;min-height:44px;display:flex;direction:ltr;justify-content:flex-start;align-items:flex-start;gap:7px}.dashboard-tool{position:relative;width:min(250px,calc(50% - 4px));direction:rtl}.dashboard-tool>summary{height:42px;padding:5px 9px;display:flex;align-items:center;gap:8px;border:1px solid #cfd5d0;border-radius:7px;color:#344039;background:#fffef9;box-shadow:0 5px 16px rgba(53,67,58,.07);cursor:pointer;list-style:none}.dashboard-tool>summary::-webkit-details-marker{display:none}.dashboard-tool>summary>div{min-width:0;display:flex;flex:1;flex-direction:column;gap:1px}.dashboard-tool>summary strong{overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.dashboard-tool>summary small{overflow:hidden;color:var(--muted);font-size:8px;text-overflow:ellipsis;white-space:nowrap}.tool-menu-icon{flex:0 0 auto;color:var(--green);font-size:15px}.dashboard-tool[open]>summary{color:var(--green);border-color:#aac7b8}.dashboard-tool-body{position:absolute;top:48px;left:0;z-index:35;width:min(540px,calc(100vw - 28px));padding:12px;display:grid;gap:10px;border:1px solid #ccd4ce;border-radius:10px;background:#fffef9;box-shadow:0 18px 45px rgba(26,48,38,.2)}.customer-tool .dashboard-tool-body{right:0;left:auto}.dashboard-tool-body .range-form{padding-top:10px}.dashboard-customer-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.dashboard-customer-form label{display:grid;gap:4px;color:#56615b;font-size:10px;font-weight:900}.dashboard-customer-form select{width:100%;min-height:39px;padding:0 9px;border:1px solid #cfd4cf;border-radius:7px;background:#fff}.dashboard-customer-form button{min-height:39px;padding:0 15px;border:0;border-radius:7px;color:#fff;background:var(--blue);font-size:10px;font-weight:900;cursor:pointer}.dashboard-tool-body .customer-debt-result{padding:9px 10px;border-radius:7px}.dashboard-tool-body .customer-debt-result a{border-radius:5px}
.dashboard-stack .ledger-book{min-height:610px;border-radius:12px}.dashboard-stack .ledger-head{min-height:62px;padding:9px 13px}.dashboard-stack .ledger-column{min-height:465px;padding:7px;gap:5px}.dashboard-stack .ledger-item{padding:7px 8px;gap:4px;border-radius:4px;box-shadow:none}.dashboard-stack .ledger-item-top{min-width:0;gap:6px}.ledger-name{min-width:0;display:flex;flex:1;align-items:center;gap:5px}.ledger-name i{flex:0 0 auto;color:#59635d;font-size:11px;font-style:normal;font-weight:900}.dashboard-stack .ledger-name strong{font-size:14px;line-height:1.35}.dashboard-stack .ledger-item-top>b{flex:0 0 auto;margin:0;font-size:13px;line-height:1.35;text-align:left;white-space:nowrap}.dashboard-stack .delete-icon{width:18px;height:18px;font-size:12px}.ledger-item-meta{min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:3px}.dashboard-stack .ledger-item-meta>span{min-width:36px;flex:1;font-size:8px}.dashboard-stack .ledger-item-meta time{font-size:8px}.dashboard-stack .partial-mark{padding:1px 4px;border-radius:2px;font-size:7.5px;line-height:1.45}.dashboard-stack .debt-settle{width:auto;min-width:0}.dashboard-stack .debt-settle summary{padding:1px 4px;border-radius:2px;font-size:7.5px;line-height:1.45}.dashboard-stack .debt-settle[open]{width:100%;padding:6px;border-radius:4px}.dashboard-stack .debt-settle[open] summary{font-size:8px}.dashboard-stack .ledger-total{min-height:61px;padding:9px 12px}
.native-customer-select{display:none!important}.customer-autocomplete{position:relative;width:100%;direction:rtl}.customer-autocomplete-input{width:100%;min-height:47px;padding:10px 38px 10px 12px;border:1px solid #cfd4cf;border-radius:12px;color:var(--ink);background:#fff;outline:none;font:inherit}.customer-autocomplete::before{content:'⌕';position:absolute;top:12px;right:13px;z-index:2;color:var(--green);font-size:18px;pointer-events:none}.customer-autocomplete-input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(23,107,75,.12)}.customer-autocomplete-list{position:absolute;top:calc(100% + 5px);right:0;left:0;z-index:120;max-height:250px;padding:5px;overflow-y:auto;border:1px solid #cbd3cd;border-radius:10px;background:#fff;box-shadow:0 16px 38px rgba(21,43,33,.22)}.customer-autocomplete-list[hidden]{display:none}.customer-autocomplete-option{width:100%;min-height:42px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;border-bottom:1px solid #edf0ec;border-radius:6px;color:#344039;background:#fff;text-align:right;cursor:pointer}.customer-autocomplete-option:last-child{border-bottom:0}.customer-autocomplete-option:hover,.customer-autocomplete-option.active{color:#fff;background:var(--green)}.customer-autocomplete-option strong{overflow:visible;font-size:12px;line-height:1.4;text-overflow:clip;white-space:normal}.customer-autocomplete-option small{flex:0 0 auto;color:inherit;font-size:9px;direction:ltr}.customer-autocomplete-empty{padding:14px;display:block;color:var(--muted);font-size:11px;text-align:center}.dashboard-customer-form .customer-autocomplete-input{min-height:39px;padding-top:6px;padding-bottom:6px;border-radius:7px}.dashboard-customer-form .customer-autocomplete::before{top:8px}.statement-filter{overflow:visible}.statement-filter-form .customer-autocomplete-input{min-height:44px;border-radius:11px}
@media(max-width:620px){.dashboard-stack{margin-top:-8px}.dashboard-tools{min-height:40px;gap:5px}.dashboard-tool{width:calc(50% - 3px)}.dashboard-tool>summary{height:38px;padding:4px 7px}.dashboard-tool>summary strong{font-size:9px}.dashboard-tool>summary small{font-size:7px}.tool-menu-icon{font-size:13px}.dashboard-tool-body{top:43px;width:calc(100vw - 20px);padding:9px}.dashboard-customer-form{grid-template-columns:1fr}.dashboard-stack .ledger-book{min-height:570px}.dashboard-stack .ledger-head{min-height:54px;padding:7px 8px}.dashboard-stack .ledger-column{min-height:445px;padding:5px;gap:4px}.dashboard-stack .ledger-item{padding:7px 6px}.dashboard-stack .ledger-item-top{align-items:flex-start;flex-wrap:wrap}.dashboard-stack .ledger-name{flex:1 0 100%;align-items:flex-start}.dashboard-stack .ledger-name strong{overflow:visible;font-size:12.5px;line-height:1.5;text-overflow:clip;white-space:normal;word-break:break-word}.dashboard-stack .ledger-name i{padding-top:2px;font-size:10px}.dashboard-stack .ledger-item-top>b{margin-right:auto;font-size:12px}.dashboard-stack .partial-mark,.dashboard-stack .debt-settle summary{font-size:6.8px}.dashboard-stack .ledger-total{min-height:55px}.customer-autocomplete-list{max-height:215px}.customer-autocomplete-option{min-height:45px}.customer-autocomplete-option strong{font-size:11px}}

/* Version 11: full desktop width and employee loans */
@media(min-width:821px){.topbar-inner,.page-container{width:calc(100% - 32px);max-width:none}.dashboard-stack .ledger-book{min-height:calc(100vh - 245px)}.dashboard-stack .ledger-column{min-height:calc(100vh - 390px)}}
.top-debt-badge{margin:5px auto 0;padding:3px 8px;display:flex;width:max-content;align-items:center;justify-content:center;gap:4px;border:1px solid rgba(255,211,214,.42);border-radius:999px;color:#fff;background:#a7333a;font-size:8px;font-weight:900;text-decoration:none}.top-debt-badge b{font-size:8px}.drawer-debt{margin-top:7px;padding:8px 9px;border-radius:9px;color:#9f3038!important;background:#f8e5e7;font-size:10px!important;font-weight:900;text-decoration:none}.drawer nav{overflow-y:auto}
.user-loans-stack{display:grid;gap:18px}.loan-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.loan-summary.personal{grid-template-columns:minmax(0,620px);justify-content:center}.loan-summary article{min-height:105px;padding:18px;display:flex;flex-direction:column;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:18px;background:var(--paper);box-shadow:0 10px 28px rgba(53,67,58,.06)}.loan-summary span{color:var(--muted);font-size:12px;font-weight:900}.loan-summary strong{font-size:20px}.loan-summary small{color:var(--muted);font-size:10px}.my-loan-card{text-align:center}.loan-layout{grid-template-columns:minmax(320px,.7fr) minmax(0,1.3fr)}.loan-balance-list{padding:0 18px 18px;display:grid;gap:8px}.loan-balance-list>div{padding:13px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #ebc8ca;border-radius:12px;background:#fff5f5}.loan-balance-list span{display:flex;flex-direction:column;gap:3px}.loan-balance-list small{color:var(--muted);font-size:9px}.loan-kind{padding:5px 9px;border-radius:999px;font-size:10px;font-weight:900}.loan-kind.debt{color:#9f3038;background:#f8e5e7}.loan-kind.payment{color:#176b4b;background:#e3f0e8}
@media(max-width:820px){.loan-summary{grid-template-columns:1fr 1fr}.loan-summary article:last-child{grid-column:1/-1}.loan-layout{grid-template-columns:1fr}}
@media(max-width:620px){.loan-summary,.loan-summary.personal{grid-template-columns:1fr}.loan-summary article,.loan-summary article:last-child{min-height:84px;grid-column:auto}.loan-summary strong{font-size:17px}.top-debt-badge{margin-top:3px;padding:2px 6px;font-size:7px}.top-debt-badge b{font-size:7px}}

/* Version 15: customer material records */
.materials-stack,.catalog-stack,.material-detail-stack{display:grid;gap:18px}.catalog-nav{display:flex;justify-content:flex-start}.catalog-nav .button{min-width:220px}.catalog-layout{grid-template-columns:minmax(300px,.55fr) minmax(0,1.45fr)}.catalog-grid{padding:0 18px 18px;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:11px}.catalog-card{position:relative;min-height:105px;padding:9px;display:grid;grid-template-columns:88px 1fr auto;align-items:center;gap:11px;border:1px solid var(--line);border-radius:15px;background:#fff}.catalog-card>img{width:88px;height:88px;border-radius:11px;object-fit:cover;background:#edf0eb}.catalog-card>div{min-width:0;display:flex;flex-direction:column;gap:5px}.catalog-card strong{font-size:16px}.catalog-card small{color:var(--muted);font-size:10px}.catalog-card>div>span{color:var(--green);font-size:10px;font-weight:900}.catalog-locked{width:24px;text-align:center;font-size:13px}.material-issue-panel{overflow:visible}.material-issue-panel>.panel-title{border-bottom:1px solid #e1e3de}.manage-material-link{margin-right:auto;white-space:nowrap}.material-issue-form{padding:20px;display:grid;gap:18px}.material-issue-fields{display:grid;grid-template-columns:1.5fr .7fr;gap:12px}.material-issue-fields label{display:grid;gap:7px;color:#3e4943;font-size:14px;font-weight:900}.material-issue-fields input,.material-issue-fields textarea,.material-issue-fields select{width:100%;min-height:50px;padding:10px 12px;border:1px solid #cfd4cf;border-radius:12px;color:var(--ink);background:#fff;outline:none}.material-issue-fields input:focus,.material-issue-fields textarea:focus,.material-issue-fields select:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(23,107,75,.12)}.material-note-field{grid-column:1/-1}.material-picker-head{padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:13px;color:#254c3c;background:#e8f0eb}.material-picker-head>div{display:flex;flex-direction:column;gap:3px}.material-picker-head small{color:#6c7771;font-size:11px}.material-picker-head>span{padding:7px 10px;border-radius:9px;color:#fff;background:var(--green);font-size:11px;font-weight:900;white-space:nowrap}.material-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:11px}.material-pick-card{position:relative;overflow:hidden;display:grid;grid-template-rows:1fr auto;border:2px solid #d7dcd8;border-radius:16px;background:#fff;transition:.15s}.material-pick-card:hover{border-color:#9fc3b3;transform:translateY(-1px)}.material-pick-card.selected{border-color:var(--green);box-shadow:0 0 0 3px rgba(23,107,75,.1)}.material-pick-main{padding:0 0 10px;display:flex;flex-direction:column;align-items:stretch;gap:7px;border:0;color:var(--ink);background:#fff;cursor:pointer;text-align:center}.material-pick-main img{width:100%;height:125px;object-fit:cover;background:#edf0eb}.material-pick-main strong{padding:0 8px;font-size:15px;line-height:1.45}.material-pick-main small{color:var(--green);font-size:10px;font-weight:900}.material-quantity-button{min-height:45px;padding:6px 10px;display:flex;align-items:center;justify-content:space-between;border:0;border-top:1px solid #e1e4e1;color:#5d6962;background:#f4f6f3;cursor:pointer}.material-quantity-button span{font-size:11px;font-weight:900}.material-quantity-button b{min-width:36px;padding:4px 8px;border-radius:8px;color:#fff;background:#849189;font-size:16px}.material-pick-card.selected .material-quantity-button{color:#175b41;background:#e6f1eb}.material-pick-card.selected .material-quantity-button b{background:var(--green)}.material-save-button{min-height:58px;font-size:18px}.quantity-dialog{width:min(460px,calc(100% - 24px))}.quantity-dialog-body{padding:20px;display:grid;gap:16px}.quantity-dialog-body>img{width:100%;height:180px;border-radius:15px;object-fit:contain;background:#edf0eb}.quantity-dialog-body label{display:grid;gap:8px;font-weight:900}.quantity-dialog-body input{width:100%;min-height:82px;padding:8px 14px;border:2px solid var(--green);border-radius:15px;color:var(--green-dark);background:#fff;font-size:38px;font-weight:900;text-align:center;direction:ltr;outline:none}.material-history-panel .clickable-row{cursor:pointer;transition:.15s}.material-history-panel .clickable-row:hover,.material-history-panel .clickable-row:focus{background:#eaf2ed;outline:none}.material-detail-note{grid-column:1/-1}.material-detail-title{margin:22px 0 12px;font-size:20px}.material-detail-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:11px}.material-detail-grid>article{min-height:115px;padding:9px;display:grid;grid-template-columns:95px 1fr;align-items:center;gap:12px;border:1px solid var(--line);border-radius:15px;background:#fff}.material-detail-image img,.material-detail-image{width:95px;height:95px;border-radius:11px;object-fit:cover;background:#edf0eb}.material-detail-image{display:grid;place-items:center;color:var(--green);font-size:26px}.material-detail-grid>article>div:last-child{display:flex;flex-direction:column;gap:5px}.material-detail-grid strong{font-size:15px}.material-detail-grid small{color:var(--muted)}.material-detail-grid b{color:var(--green);font-size:25px}.material-detail-card{width:min(980px,100%)}
@media(max-width:820px){.catalog-layout{grid-template-columns:1fr}.material-issue-fields{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.materials-stack,.catalog-stack,.material-detail-stack{gap:12px}.catalog-nav .button{width:100%;min-width:0}.catalog-grid{padding:0 12px 12px;grid-template-columns:1fr}.catalog-card{grid-template-columns:78px 1fr auto}.catalog-card>img{width:78px;height:78px}.material-issue-panel>.panel-title{align-items:flex-start;flex-wrap:wrap}.manage-material-link{width:100%;margin:0;text-align:center}.material-issue-form{padding:13px;gap:14px}.material-issue-fields{grid-template-columns:1fr}.material-note-field{grid-column:auto}.material-picker-head{align-items:stretch;flex-direction:column}.material-picker-head>span{text-align:center}.material-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.material-pick-main img{height:105px}.material-pick-main strong{font-size:13px}.material-quantity-button b{font-size:15px}.quantity-dialog-body>img{height:150px}.quantity-dialog-body input{min-height:75px;font-size:34px}.material-detail-grid{grid-template-columns:1fr}.material-detail-grid>article{grid-template-columns:82px 1fr}.material-detail-image img,.material-detail-image{width:82px;height:82px}.material-history-panel .panel-title p{line-height:1.7}}
@media print{.material-issue-panel,.catalog-nav,.quantity-dialog{display:none!important}}

/* Version 16 — simple material entry and separate history */
.material-entry-only{max-width:1500px;margin-inline:auto}.material-form-title{gap:12px}.material-title-actions{margin-right:auto;display:flex;align-items:center;gap:8px}.material-simple-form{gap:14px}.material-picker-more{grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:9px}.material-picker-more .material-pick-main img{height:104px}.material-picker-more .material-pick-main strong{font-size:14px}.material-bottom-fields{padding:15px;display:grid;grid-template-columns:minmax(300px,1.5fr) minmax(260px,.8fr);gap:11px;border:1px solid #d8ded9;border-radius:15px;background:#f7f8f5}.material-bottom-fields label{display:grid;gap:6px;color:#3e4943;font-size:12px;font-weight:900}.material-bottom-fields input,.material-bottom-fields select,.material-bottom-fields textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid #cfd4cf;border-radius:11px;color:var(--ink);background:#fff;outline:none}.material-customer-main{grid-row:span 1}.material-customer-main>span{font-size:16px}.material-customer-main .customer-autocomplete-input{min-height:57px;font-size:18px;font-weight:900}.material-small-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}.material-note-field{grid-column:1/-1}.material-bottom-fields textarea{min-height:58px;resize:vertical}.history-top-actions{display:flex;justify-content:flex-start}.history-top-actions .button{min-width:210px}.material-history-range{grid-template-columns:minmax(230px,1.4fr) repeat(2,minmax(150px,.7fr)) auto}.history-customer-filter .customer-autocomplete-input{min-height:46px}.payment-badge{display:inline-flex;min-width:58px;padding:5px 10px;align-items:center;justify-content:center;border-radius:999px;font-weight:900}.payment-badge.debt{color:#a83d43;background:#f8e4e5}.payment-badge.cash{color:#176b4b;background:#e1f2e9}.material-history-panel table td strong{font-size:15px}.material-history-panel table td{vertical-align:middle}
.material-history-list-head{flex-wrap:wrap}.material-history-heading{flex:1;min-width:210px}.material-history-total{display:flex;min-width:190px;padding:9px 15px;border:1px solid rgba(23,107,75,.22);border-radius:13px;background:#edf7f1;flex-direction:column;align-items:center;justify-content:center;gap:2px}.material-history-total span{color:#52675b;font-size:11px;font-weight:900}.material-history-total strong{color:var(--green);font-size:24px;line-height:1.1}.material-product-filter{margin-right:auto}.material-product-filter label{display:grid;grid-template-columns:auto minmax(180px,250px);align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:900}.material-product-filter select{width:100%;min-height:44px;padding:0 11px;border:1px solid #cdd5cf;border-radius:11px;color:#445149;background:#fff;font:inherit;font-weight:900}.material-product-filter select:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(23,107,75,.12);outline:none}
@media(max-width:900px){.material-bottom-fields{grid-template-columns:1fr}.material-small-fields{grid-template-columns:1fr 1fr}.material-history-range{grid-template-columns:1fr 1fr}.history-customer-filter{grid-column:1/-1}.material-history-range button{grid-column:1/-1}}
@media(max-width:620px){.material-form-title{flex-wrap:wrap}.material-title-actions{width:100%;margin:0}.material-title-actions .mini-link{flex:1;text-align:center}.material-picker-more{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.material-picker-more .material-pick-main img{height:82px}.material-picker-more .material-pick-main strong{padding-inline:4px;font-size:11px}.material-picker-more .material-pick-main small{font-size:9px}.material-picker-more .material-quantity-button{min-height:39px;padding:5px 6px}.material-picker-more .material-quantity-button span{font-size:9px}.material-picker-more .material-quantity-button b{min-width:29px;padding:3px 5px;font-size:13px}.material-bottom-fields{padding:11px}.material-small-fields{grid-template-columns:1fr 1fr}.material-customer-main .customer-autocomplete-input{font-size:16px}.history-top-actions .button{width:100%}.material-history-range{grid-template-columns:1fr}.history-customer-filter,.material-history-range button{grid-column:auto}.material-history-panel table{min-width:780px}.material-history-total{width:100%;min-width:0;flex-direction:row;justify-content:space-between}.material-history-total span{font-size:13px}.material-history-total strong{font-size:26px}.material-product-filter{width:100%;margin:0}.material-product-filter label{grid-template-columns:1fr}.material-product-filter select{min-width:0;font-size:16px}}
@media print{.history-top-actions,.material-history-filter,.material-product-filter{display:none!important}}

/* Version 17 — daily material notice and cleaner entry */
.material-issue-panel{padding-top:0}.material-simple-form{padding-top:14px}.material-customer-label{display:flex!important;align-items:center;gap:9px}.material-customer-count{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border:3px solid #7f171e;border-radius:50%;color:#fff;background:#a5232c;box-shadow:0 4px 12px rgba(127,23,30,.22);font-size:13px;font-weight:900;line-height:1;direction:ltr}.material-customer-count[hidden]{display:none!important}.history-top-actions{gap:9px;flex-wrap:wrap}.history-top-actions .button.secondary{color:#fff;background:#53645b}.daily-material-alert{position:relative;min-height:58px;padding:10px 60px 10px 14px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:3px 9px;border:1px solid #e2b9bc;border-radius:11px;color:#742229;background:#fff2f2;text-decoration:none;box-shadow:0 5px 14px rgba(119,34,41,.08)}.daily-material-alert>span{grid-row:1/3;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;color:#fff;background:#a5232c}.daily-material-alert strong{font-size:13px}.daily-material-alert small{color:#80565a;font-size:10px}.daily-material-alert>b{position:absolute;top:50%;right:14px;width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:#fff;background:#871a22;font-size:15px;transform:translateY(-50%);direction:ltr}
@media(max-width:620px){.material-simple-form{padding:8px}.material-picker-more{grid-template-columns:repeat(3,minmax(0,1fr))}.material-bottom-fields input,.material-bottom-fields select,.material-bottom-fields textarea,.material-bottom-fields .customer-autocomplete-input{font-size:16px!important}.material-customer-count{width:32px;height:32px;font-size:12px}.history-top-actions .button{width:100%}.daily-material-alert{min-height:62px;padding:9px 53px 9px 9px;gap:2px 7px}.daily-material-alert>span{width:31px;height:31px}.daily-material-alert strong{font-size:12px}.daily-material-alert small{font-size:9px}.daily-material-alert>b{right:9px;width:33px;height:33px;font-size:14px}}
@media print{.daily-material-alert{display:none!important}}

/* Version 18 — no double-tap zoom and monthly customer material count */
.materials-no-zoom,.materials-no-zoom *{touch-action:manipulation}.materials-no-zoom{-webkit-text-size-adjust:100%}.materials-no-zoom .material-customer-count{width:auto;min-width:42px;height:42px;padding:0 6px;border-radius:999px;background:#84151d;border-color:#651017;font-size:12px}.materials-no-zoom .material-customer-label::after{content:'موادی ئەم مانگە';color:#8b5559;font-size:10px;font-weight:900}
@media(max-width:620px){.materials-no-zoom .material-customer-count{min-width:38px;height:38px;padding-inline:5px;font-size:11px}.materials-no-zoom .material-customer-label::after{font-size:9px}}

/* Version 19 — visible catalog delete action */
.catalog-delete-form{margin:0}.catalog-delete-button{min-height:38px;padding:0 10px;white-space:nowrap}.catalog-card{grid-template-columns:88px minmax(0,1fr) auto}
@media(max-width:620px){.catalog-card{grid-template-columns:78px minmax(0,1fr)}.catalog-delete-form{grid-column:1/-1}.catalog-delete-button{width:100%;min-height:42px}}

/* Version 21 — mobile gallery picker */
.gallery-image-field>span{padding:8px 10px;display:block;border-radius:9px;color:#35634f;background:#e8f2ed;font-size:11px;font-weight:800;line-height:1.7}.gallery-image-field input[type=file]{padding:10px;background:#fff}.gallery-image-field input[type=file]::file-selector-button{min-height:40px;margin-left:10px;padding:0 14px;border:0;border-radius:9px;color:#fff;background:var(--green);font:inherit;font-weight:900;cursor:pointer}
@media(max-width:620px){.gallery-image-field>span{font-size:12px}.gallery-image-field input[type=file]{font-size:16px}}

/* Version 14: expense category filter */
.expense-filter-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px}.expense-category-filter label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;font-weight:900}.expense-category-filter select{min-width:150px;min-height:42px;padding:0 10px;border:1px solid #cdd5cf;border-radius:11px;color:#536059;background:#fff;font:inherit;font-weight:900}.expense-category-filter input[type=hidden]{display:none}
@media(max-width:620px){.expense-filter-actions{display:grid;grid-template-columns:1fr;gap:9px}.expense-category-filter label{display:grid;grid-template-columns:auto 1fr}.expense-category-filter select{width:100%;min-width:0}}

/* Version 13: expense date filters */
.expenses-stack{display:grid;gap:18px}

/* Version 12: readable desktop type and flexible customer search */
@media(min-width:821px){body{font-size:17px}.topbar-inner{min-height:94px}.page-heading h1{font-size:32px}.page-heading small{font-size:13px}.page-heading time{font-size:14px}.brand b{font-size:17px}.brand small{font-size:13px}.menu-button{width:52px;height:52px;font-size:27px}.pdf-button{height:44px;padding:0 15px;font-size:13px}.drawer nav a{font-size:16px}.drawer-user small,.drawer-user span{font-size:13px}.button{min-height:53px;font-size:16px}.dashboard-tool{width:min(320px,calc(50% - 4px))}.dashboard-tool>summary{height:52px;padding:7px 12px}.dashboard-tool>summary strong{font-size:14px}.dashboard-tool>summary small{font-size:11px}.tool-menu-icon{font-size:19px}.dashboard-tool-body{top:58px}.dashboard-customer-form label{font-size:13px}.dashboard-customer-form button{min-height:46px;font-size:13px}.dashboard-customer-form .customer-autocomplete-input{min-height:46px;font-size:15px}.dashboard-stack .ledger-head{min-height:76px;padding:12px 17px}.dashboard-stack .ledger-head b{font-size:23px}.dashboard-stack .ledger-head small{font-size:12px}.dashboard-stack .ledger-head span{width:29px;height:29px;font-size:14px}.dashboard-stack .ledger-column{padding:10px;gap:8px}.dashboard-stack .ledger-item{padding:11px 12px;gap:6px;border-radius:7px}.dashboard-stack .ledger-name strong{font-size:18px}.dashboard-stack .ledger-name i{font-size:14px}.dashboard-stack .ledger-item-top>b{font-size:17px}.dashboard-stack .ledger-item-meta>span,.dashboard-stack .ledger-item-meta time{font-size:11px}.dashboard-stack .partial-mark,.dashboard-stack .debt-settle summary{padding:3px 7px;font-size:10px}.dashboard-stack .delete-icon{width:23px;height:23px;font-size:15px}.dashboard-stack .ledger-total{min-height:75px;padding:12px 16px}.dashboard-stack .ledger-total span{font-size:14px}.dashboard-stack .ledger-total strong{font-size:22px}.panel-title h2{font-size:21px}.panel-title p{font-size:14px}.form-stack label{font-size:15px}.form-stack input,.form-stack textarea,.form-stack select,.customer-autocomplete-input{min-height:52px;font-size:16px}.panel table{font-size:15px}.panel th,.panel td{padding:17px 18px}.role-badge,.category-badge,.loan-kind{font-size:12px}.loan-summary span{font-size:14px}.loan-summary strong{font-size:24px}.loan-summary small{font-size:12px}.customer-autocomplete-option{min-height:50px}.customer-autocomplete-option strong{font-size:15px}.customer-autocomplete-option small{font-size:12px}.customer-autocomplete-empty{font-size:14px}.remaining-field input{font-size:22px!important}}
@media(max-width:620px){body{font-size:16px}.page-heading h1{font-size:22px}.page-heading small{font-size:10px}.page-heading time{font-size:11px}.button{min-height:50px;font-size:16px}.ledger-actions .button{font-size:18px}.dashboard-tool>summary{height:44px;padding:5px 9px}.dashboard-tool>summary strong{font-size:12px}.dashboard-tool>summary small{font-size:9.5px}.tool-menu-icon{font-size:16px}.dashboard-tool-body{top:49px}.dashboard-stack .ledger-head{min-height:65px;padding:9px 8px}.dashboard-stack .ledger-head b{font-size:20px}.dashboard-stack .ledger-head small{padding-right:27px;font-size:10.5px}.dashboard-stack .ledger-head span{width:26px;height:26px;font-size:13px}.dashboard-stack .ledger-column{padding:7px;gap:6px}.dashboard-stack .ledger-item{padding:10px 8px;gap:6px}.dashboard-stack .ledger-name strong{font-size:16px;line-height:1.6}.dashboard-stack .ledger-name i{font-size:13px}.dashboard-stack .ledger-item-top>b{font-size:15.5px}.dashboard-stack .ledger-item-meta>span,.dashboard-stack .ledger-item-meta time{font-size:10.5px}.dashboard-stack .partial-mark,.dashboard-stack .debt-settle summary{padding:2px 5px;font-size:9px}.dashboard-stack .delete-icon{width:23px;height:23px;font-size:15px}.dashboard-stack .ledger-total span{font-size:13px}.dashboard-stack .ledger-total strong{font-size:18px}.panel-title h2{font-size:19px}.panel-title p{font-size:13px}.form-stack label{font-size:15px}.form-stack input,.form-stack textarea,.form-stack select,.customer-autocomplete-input{min-height:51px;font-size:16px}.panel table{font-size:13px}.panel th,.panel td{padding:14px 11px;font-size:13px}.customer-autocomplete-option{min-height:49px}.customer-autocomplete-option strong{font-size:14px}.customer-autocomplete-option small{font-size:11px}.customer-autocomplete-empty{font-size:13px}.loan-summary span{font-size:13px}.loan-summary strong{font-size:20px}.remaining-field input{font-size:20px!important}.top-debt-badge,.top-debt-badge b{font-size:9px}}

@media print{@page{size:A4;margin:10mm}html,body{background:#fff!important}body{font-size:10pt;color:#111}.topbar{position:static!important;color:#111!important;background:#fff!important;border-bottom:2px solid #164c39;box-shadow:none!important}.topbar-inner{width:100%;min-height:58px}.topbar-actions,.top-debt-badge,.brand,.drawer,.drawer-backdrop,.flash,.ledger-actions,.dashboard-tools,.date-filter-panel,.customer-search-panel,.filter-card,.tabs,.form-panel,.receipt-entry-panel,.delete-inline,.detail-delete,.settle-box,.customer-warning,.customer-list-head form,.logout-link{display:none!important}.page-heading h1{color:#111}.page-heading small,.page-heading time{color:#333}.page-container{width:100%;padding:12px 0}.two-panel{display:block}.list-panel{width:100%}.panel,.ledger-book,.detail-card,.statement-summary article,.loan-summary article{box-shadow:none!important;break-inside:avoid}.table-scroll{overflow:visible!important}.panel table{width:100%;font-size:8.5pt}.panel th,.panel td{padding:6px 7px;white-space:normal}.ledger-book{min-height:0}.ledger-column{min-height:120px}.ledger-item{break-inside:avoid}.statement-stack,.dashboard-stack,.receipts-stack,.user-loans-stack{gap:10px}.statement-filter{display:none}.statement-summary,.loan-summary{grid-template-columns:repeat(3,1fr)}a{color:#111;text-decoration:none}.receipt-photo img{max-height:180mm}.no-photo{min-height:50px}}

/* Version 24 — priced materials, linked sales receipts and company settings */
.brand-logo{width:48px;height:48px;border-radius:14px;object-fit:contain;background:#fff}.settings-stack{max-width:900px;margin-inline:auto}.settings-panel{overflow:visible}.settings-form{grid-template-columns:1fr 1fr}.settings-form .gallery-image-field,.settings-form .settings-logo-preview,.settings-form button{grid-column:1/-1}.settings-logo-preview{padding:14px;display:flex;align-items:center;gap:13px;border:1px solid var(--line);border-radius:14px;background:#f7f8f5}.settings-logo-preview img{width:90px;height:90px;border-radius:15px;object-fit:contain;background:#fff}.settings-logo-preview span{font-weight:900}.catalog-card-info{min-width:0}.catalog-price-summary{margin-top:7px;padding:7px 9px;display:grid;gap:3px;border-radius:10px;background:#edf7f1}.catalog-price-summary b{color:var(--green);font-size:16px}.catalog-price-summary em{color:#a33c43;font-size:10px;font-style:normal;font-weight:900}.catalog-price-summary strong{color:#385345;font-size:11px}.catalog-price-edit{margin-top:7px}.catalog-price-edit>summary{color:var(--green);font-size:11px;font-weight:900;cursor:pointer}.catalog-price-edit form{margin-top:7px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.catalog-price-edit label{display:grid;gap:3px;color:var(--muted);font-size:9px}.catalog-price-edit input{width:100%;min-height:37px;padding:5px 7px;border:1px solid #ccd4ce;border-radius:8px}.catalog-price-edit button{grid-column:1/-1}.material-pick-card.unpriced{opacity:.62}.material-pick-card.unpriced button{cursor:not-allowed}.material-card-price{padding:0 5px;color:var(--green);font-size:12px;font-weight:900;direction:ltr}.material-card-discount{padding:2px 5px;color:#a23d43;background:#fcebed;font-size:9px;font-style:normal;font-weight:900}.material-sale-summary{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.material-sale-summary>div{padding:10px 12px;display:flex;align-items:center;justify-content:space-between;border:1px solid #d7ddd8;border-radius:11px;background:#fff}.material-sale-summary span{color:var(--muted);font-size:11px;font-weight:900}.material-sale-summary b{font-size:14px}.material-sale-summary .grand{border-color:#8db7a3;color:#fff;background:var(--green)}.material-sale-summary .grand span,.material-sale-summary .grand strong{color:#fff}.material-sale-summary .grand strong{font-size:20px;direction:ltr}.receipt-slip-shell{max-width:900px;margin-inline:auto;display:grid;gap:12px}.receipt-detail-actions{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap}.receipt-detail-actions .button{min-height:45px}.terminal-receipt{overflow:hidden;padding:26px;border:1px solid #cfd8d1;border-radius:20px;background:#fff;box-shadow:0 15px 42px rgba(20,48,35,.13)}.receipt-company-head{padding-bottom:16px;display:flex;align-items:center;justify-content:center;gap:13px;border-bottom:2px dashed #b9c7bd;text-align:center}.receipt-company-head img{width:82px;height:82px;border-radius:16px;object-fit:contain}.receipt-company-head h2{margin:0;color:var(--green-dark);font-size:27px}.receipt-company-head p{margin:4px 0;color:var(--muted);font-size:12px}.receipt-company-head b{display:block;color:#405047;font-size:13px}.receipt-title-line{padding:15px 0;display:flex;align-items:center;justify-content:space-between;gap:12px}.receipt-title-line>div{display:grid;gap:2px}.receipt-title-line strong{font-size:21px}.receipt-title-line small{color:var(--muted);font-size:11px;direction:ltr}.receipt-customer-grid{padding:12px;display:grid;grid-template-columns:repeat(2,1fr);gap:10px;border:1px solid var(--line);border-radius:13px;background:#f8f9f7}.receipt-customer-grid>div{display:grid;gap:3px}.receipt-customer-grid small{color:var(--muted);font-size:10px}.receipt-customer-grid strong{font-size:14px}.receipt-items-scroll{margin-top:14px;overflow-x:auto}.sale-receipt-table{width:100%;border-collapse:collapse}.sale-receipt-table th,.sale-receipt-table td{padding:10px 8px;border-bottom:1px solid #e0e4e0;text-align:right;font-size:12px}.sale-receipt-table th{color:#546159;background:#f1f5f2}.sale-receipt-table td b{color:var(--green)}.sale-receipt-totals,.payment-voucher-totals{margin-top:15px;margin-right:auto;width:min(420px,100%);display:grid;gap:7px}.sale-receipt-totals>div,.payment-voucher-totals>div{padding:9px 11px;display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:10px}.sale-receipt-totals span,.payment-voucher-totals span{color:var(--muted);font-size:11px;font-weight:900}.sale-receipt-totals .grand{color:#fff;background:var(--green)}.sale-receipt-totals .grand span,.sale-receipt-totals .grand strong{color:#fff}.sale-receipt-totals .grand strong{font-size:19px}.payment-voucher-totals .paid{border:2px solid #3b936c;background:#e8f6ee}.payment-voucher-totals .paid span{color:#23734f}.payment-voucher-totals .paid strong{color:#087341;font-size:24px}.payment-voucher-totals .remaining b{color:#a33c43;font-size:20px}.voucher-sale-link{margin-top:12px;padding:10px;display:block;border-radius:10px;color:var(--green);background:#edf7f1;text-align:center;font-weight:900;text-decoration:none}.receipt-note{margin-top:14px;padding:11px;border-radius:11px;background:#f5f5f1}.receipt-note small{color:var(--muted)}.receipt-note p{margin:5px 0 0}.receipt-thanks{margin-top:18px;padding-top:13px;border-top:2px dashed #b9c7bd;color:var(--green);text-align:center;font-weight:900}.sale-row-mark{margin-top:3px;display:block;color:var(--green);font-size:9px;font-weight:900}
@media(max-width:620px){.brand-logo{width:40px;height:40px}.settings-form{grid-template-columns:1fr}.settings-form>*{grid-column:auto!important}.catalog-price-edit form{grid-template-columns:1fr}.catalog-price-edit button{grid-column:auto}.material-sale-summary{grid-template-columns:1fr}.material-sale-summary>div{min-height:48px}.terminal-receipt{padding:14px;border-radius:15px}.receipt-company-head img{width:66px;height:66px}.receipt-company-head h2{font-size:23px}.receipt-title-line strong{font-size:18px}.receipt-customer-grid{grid-template-columns:1fr 1fr}.sale-receipt-table{min-width:650px}.receipt-detail-actions>*{flex:1;text-align:center}.payment-voucher-totals .paid strong{font-size:21px}}
@page terminal{size:80mm auto;margin:4mm}
@media print{.receipt-detail-actions{display:none!important}.terminal-receipt{box-shadow:none!important}.terminal-printing .topbar,.terminal-printing .drawer,.terminal-printing .drawer-backdrop,.terminal-printing .flash,.terminal-printing .detail-delete{display:none!important}.terminal-printing .page-container{padding:0!important}.terminal-printing .page-container>*{display:none!important}.terminal-printing .page-container>.receipt-slip-shell{display:block!important}.terminal-printing .receipt-slip-shell>*{display:none!important}.terminal-printing .receipt-slip-shell>.terminal-receipt{display:block!important;width:72mm!important;max-width:72mm!important;margin:0!important;padding:3mm!important;border:0!important;border-radius:0!important;page:terminal}.terminal-printing .receipt-company-head img{width:17mm;height:17mm}.terminal-printing .receipt-company-head h2{font-size:15pt}.terminal-printing .receipt-company-head p,.terminal-printing .receipt-company-head b{font-size:8pt}.terminal-printing .receipt-title-line strong{font-size:12pt}.terminal-printing .receipt-customer-grid{padding:2mm;grid-template-columns:1fr 1fr;gap:2mm}.terminal-printing .receipt-customer-grid small{font-size:6.5pt}.terminal-printing .receipt-customer-grid strong{font-size:8pt}.terminal-printing .receipt-items-scroll{overflow:visible}.terminal-printing .sale-receipt-table{min-width:0}.terminal-printing .sale-receipt-table th,.terminal-printing .sale-receipt-table td{padding:1.5mm .8mm;font-size:6.5pt}.terminal-printing .sale-receipt-totals,.terminal-printing .payment-voucher-totals{width:100%}.terminal-printing .sale-receipt-totals>div,.terminal-printing .payment-voucher-totals>div{padding:1.8mm}.terminal-printing .payment-voucher-totals .paid strong{font-size:15pt}.terminal-printing .receipt-thanks{font-size:8pt}}

/* Version 26 — correct material payment type and edit saved sale items */
.history-payment-cell{min-width:190px;display:grid;gap:7px;justify-items:start}.material-payment-change{display:flex;align-items:center;gap:5px}.material-payment-change select{min-width:105px;min-height:36px;padding:4px 8px;border:1px solid #c8d1cb;border-radius:9px;color:#33483d;background:#fff;font:inherit;font-size:11px;font-weight:900}.material-payment-change button{min-height:36px;padding:4px 10px;border:0;border-radius:9px;color:#fff;background:var(--green);font:inherit;font-size:10px;font-weight:900;cursor:pointer}.history-row-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.history-row-actions .mini-link.edit,.material-edit-link{color:#795c19;background:#fff3cf}.material-edit-page{max-width:1500px;margin-inline:auto}.material-edit-head{flex-wrap:wrap}.material-edit-paid{margin-right:auto;padding:8px 12px;display:grid;gap:2px;border:1px solid #9bc9b2;border-radius:11px;background:#ebf7f0;text-align:center}.material-edit-paid small{color:#607268;font-size:10px}.material-edit-paid strong{color:var(--green);font-size:17px}.material-edit-notice{padding:11px 13px;display:flex;align-items:center;gap:9px;border:1px solid #d3dfd7;border-radius:12px;color:#526059;background:#f3f7f4;font-size:12px;line-height:1.8}.material-edit-notice b{flex:0 0 auto;padding:4px 8px;border-radius:8px;color:#fff;background:var(--green)}.material-legacy-card{border-style:dashed}.material-edit-summary .material-paid-fixed,.material-edit-summary .material-remaining{grid-column:span 3;min-height:58px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.material-edit-summary .material-paid-fixed{border-color:#a9cfbb;background:#edf8f2}.material-edit-summary .material-paid-fixed strong{font-size:18px}.material-edit-rule{margin:0;padding:10px 12px;border-right:4px solid #ba8c2e;border-radius:8px;color:#6a5a37;background:#fff7df;font-size:11px;font-weight:800}.amount-invalid-text{color:#fff!important;background:#af3f46;border-radius:7px;padding:4px 7px}.material-edit-link{font-weight:900}
@media(max-width:620px){.history-payment-cell{min-width:155px}.material-payment-change{width:100%}.material-payment-change select{min-width:0;flex:1;font-size:12px}.material-payment-change button{font-size:11px}.material-edit-paid{width:100%;margin:0}.material-edit-notice{align-items:flex-start;flex-direction:column}.material-edit-summary .material-paid-fixed,.material-edit-summary .material-remaining{grid-column:auto}.material-edit-link{flex-basis:100%!important}.material-edit-page .material-picker-more{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.material-payment-change,.history-row-actions .edit{display:none!important}}

/* Version 25 — partial material payments, two receipt copies and fast thumbnails */
.material-sale-summary{grid-template-columns:repeat(6,minmax(0,1fr))}.material-sale-summary>div:nth-child(-n+3){grid-column:span 2}.material-payment-entry,.material-remaining{grid-column:span 3;min-height:58px;padding:9px 12px;display:flex!important;align-items:center;justify-content:space-between;gap:12px;border:1px solid #b8d5c6;border-radius:11px;background:#edf8f2}.material-payment-entry span,.material-remaining span{color:#34614d;font-size:12px;font-weight:900}.material-payment-entry input{width:min(190px,55%);min-height:42px!important;padding:6px 10px!important;border:1px solid #77ae91!important;border-radius:9px!important;color:#087341!important;background:#fff!important;font-size:18px!important;font-weight:900!important;text-align:left}.material-payment-entry input:read-only{color:#176b4b!important;background:#e2f2e9!important}.material-remaining{border-color:#e2b6ba;background:#fff0f1}.material-remaining span,.material-remaining strong{color:#a32e37}.material-remaining strong{font-size:20px;direction:ltr}.payment-badge.partial{color:#765018;background:#f6e9c9}.receipt-copy-control{padding:13px 16px;display:flex;align-items:center;gap:12px;border:2px solid #86b59d;border-radius:14px;background:#edf8f2;cursor:pointer}.receipt-copy-control input{width:24px;height:24px;accent-color:var(--green)}.receipt-copy-control>span{display:grid;gap:2px}.receipt-copy-control strong{color:var(--green);font-size:15px}.receipt-copy-control small{color:var(--muted);font-size:11px}.terminal-receipt{background:linear-gradient(180deg,#fff 0,#fffef9 100%);border-top:5px solid var(--green)}.terminal-sale-items,.terminal-receipt-clone,.print-copy-label{display:none}.material-pick-card,.catalog-card{content-visibility:auto;contain-intrinsic-size:220px}.material-pick-main img,.catalog-card>img{background:#edf1ed;object-fit:cover}
@media(max-width:620px){.material-sale-summary{grid-template-columns:1fr}.material-sale-summary>div:nth-child(-n+3),.material-payment-entry,.material-remaining{grid-column:auto}.material-payment-entry input{width:52%;font-size:17px!important}.receipt-copy-control{padding:12px}.receipt-copy-control strong{font-size:14px}.receipt-copy-control small{font-size:10px}}
@media print{.terminal-printing .receipt-copy-control{display:none!important}.terminal-printing .terminal-receipt-clone{break-before:page;page-break-before:always}.terminal-printing .print-copy-label{margin:-3mm -3mm 2.5mm;padding:1.5mm;display:block!important;color:#fff;background:#174c39;text-align:center;font-size:8pt;font-weight:900}.terminal-printing .sale-receipt .receipt-items-scroll{display:none!important}.terminal-printing .terminal-sale-items{margin-top:2.5mm;display:grid!important;gap:1.5mm}.terminal-printing .terminal-sale-items article{padding:1.6mm;border:1px solid #bfc9c2;border-radius:1.5mm;break-inside:avoid}.terminal-printing .terminal-sale-items header,.terminal-printing .terminal-sale-items footer{display:flex;align-items:center;justify-content:space-between;gap:2mm}.terminal-printing .terminal-sale-items header b{font-size:8pt}.terminal-printing .terminal-sale-items header strong{font-size:7.5pt;white-space:nowrap}.terminal-printing .terminal-sale-items article>div{padding:1mm 0;display:flex;justify-content:space-between;gap:1mm;color:#59645d;font-size:6.5pt}.terminal-printing .terminal-sale-items footer{padding-top:1mm;border-top:1px dashed #aeb9b1;font-size:7pt}.terminal-printing .terminal-sale-items footer strong{color:#176b4b;font-size:8pt}.terminal-printing .sale-receipt-totals{margin-top:2.5mm}}

/* Version 27 — clearer, balanced material sales receipt */
.sale-receipt{
  color:#17241e;
  border-color:#bac8bf;
  background:#fff;
}
.sale-receipt .receipt-company-head{
  padding-bottom:13px;
  border-bottom-color:#7f9186;
}
.sale-receipt .receipt-company-head h2{
  color:#123e2e;
  font-size:24px;
  font-weight:900;
  line-height:1.35;
}
.sale-receipt .receipt-company-head p{
  color:#34483e;
  font-size:12px;
  font-weight:800;
  line-height:1.65;
}
.sale-receipt .receipt-company-head b{
  color:#17241e;
  font-size:12px;
  font-weight:900;
}
.sale-receipt .receipt-title-line{
  padding:12px 0;
  border-bottom:1px solid #d8dfda;
}
.sale-receipt .receipt-title-line strong{
  color:#17241e;
  font-size:19px;
  font-weight:900;
}
.sale-receipt .receipt-title-line small{
  color:#46594f;
  font-size:10px;
  font-weight:800;
}
.sale-receipt .payment-badge{
  padding:6px 10px;
  font-size:10.5px;
  font-weight:900;
}
.sale-receipt .receipt-customer-grid{
  padding:10px 12px;
  gap:8px 12px;
  border-color:#c8d2cb;
  background:#f7f9f7;
}
.sale-receipt .receipt-customer-grid small{
  color:#42564b;
  font-size:10.5px;
  font-weight:900;
}
.sale-receipt .receipt-customer-grid strong{
  color:#17241e;
  font-size:13.5px;
  font-weight:900;
  line-height:1.55;
}
.sale-receipt .receipt-items-scroll{
  margin-top:12px;
  border:1px solid #c9d2cc;
  border-radius:11px;
}
.sale-receipt .sale-receipt-table th,
.sale-receipt .sale-receipt-table td{
  padding:9px 8px;
  color:#1a2921;
  border-bottom-color:#d8dfda;
  font-size:12px;
  font-weight:800;
  line-height:1.55;
}
.sale-receipt .sale-receipt-table th{
  color:#243a2f;
  background:#e9efeb;
  font-size:11px;
  font-weight:900;
}
.sale-receipt .sale-receipt-table tbody tr:last-child td{border-bottom:0}
.sale-receipt .sale-receipt-table td strong{
  color:#17241e;
  font-weight:900;
}
.sale-receipt .sale-receipt-table td b{
  color:#125b40;
  font-size:12.5px;
  font-weight:900;
}
.sale-receipt .sale-receipt-totals{
  width:min(380px,100%);
  margin-top:12px;
  gap:5px;
}
.sale-receipt .sale-receipt-totals>div{
  min-height:36px;
  padding:6px 9px;
  border-color:#c9d2cc;
  border-radius:8px;
  background:#fbfcfb;
}
.sale-receipt .sale-receipt-totals span{
  color:#34483e;
  font-size:10.5px;
  font-weight:900;
}
.sale-receipt .sale-receipt-totals b{
  color:#17241e;
  font-size:12.5px;
  font-weight:900;
}
.sale-receipt .sale-receipt-totals b.green{color:#146443}
.sale-receipt .sale-receipt-totals b.red{color:#a23038}
.sale-receipt .sale-receipt-totals .grand{
  min-height:40px;
  border:2px solid #1f6a4d;
  background:#1f6a4d;
}
.sale-receipt .sale-receipt-totals .grand span{
  font-size:11px;
}
.sale-receipt .sale-receipt-totals .grand strong{
  font-size:15px;
  font-weight:900;
}
.sale-receipt .receipt-note{
  margin-top:11px;
  padding:9px 10px;
  color:#1d2c24;
  border:1px solid #d6ddd8;
  background:#f6f8f6;
  font-weight:800;
}
.sale-receipt .receipt-note small{color:#43564c;font-weight:900}
.sale-receipt .receipt-thanks{
  margin-top:13px;
  padding-top:10px;
  color:#174f39;
  border-top-color:#7f9186;
  font-size:12px;
  font-weight:900;
}
@media(max-width:620px){
  .sale-receipt{padding:13px}
  .sale-receipt .receipt-company-head h2{font-size:21px}
  .sale-receipt .receipt-company-head p{font-size:11px}
  .sale-receipt .receipt-title-line strong{font-size:17px}
  .sale-receipt .receipt-customer-grid{grid-template-columns:1fr 1fr}
  .sale-receipt .receipt-customer-grid strong{font-size:12.5px}
  .sale-receipt .sale-receipt-totals{width:100%}
  .sale-receipt .sale-receipt-totals .grand strong{font-size:14.5px}
}
@media print{
  .terminal-printing .sale-receipt{
    color:#000!important;
    background:#fff!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .terminal-printing .sale-receipt .receipt-company-head{padding-bottom:2.2mm;border-bottom:1px dashed #222}
  .terminal-printing .sale-receipt .receipt-company-head h2{color:#000!important;font-size:13pt;font-weight:900}
  .terminal-printing .sale-receipt .receipt-company-head p,
  .terminal-printing .sale-receipt .receipt-company-head b{color:#000!important;font-size:7.5pt;font-weight:800}
  .terminal-printing .sale-receipt .receipt-title-line{padding:2mm 0;border-bottom:1px solid #777}
  .terminal-printing .sale-receipt .receipt-title-line strong{color:#000!important;font-size:10.5pt;font-weight:900}
  .terminal-printing .sale-receipt .receipt-title-line small{color:#111!important;font-size:6.5pt;font-weight:800}
  .terminal-printing .sale-receipt .payment-badge{padding:1mm 1.5mm;color:#000!important;border:1px solid #333;background:#fff!important;font-size:7pt;font-weight:900}
  .terminal-printing .sale-receipt .receipt-customer-grid{padding:1.6mm;gap:1.3mm 2mm;border-color:#555;background:#fff!important}
  .terminal-printing .sale-receipt .receipt-customer-grid small{color:#111!important;font-size:6.3pt;font-weight:800}
  .terminal-printing .sale-receipt .receipt-customer-grid strong{color:#000!important;font-size:7.8pt;font-weight:900}
  .terminal-printing .sale-receipt .terminal-sale-items article{padding:1.3mm;border-color:#555;background:#fff!important}
  .terminal-printing .sale-receipt .terminal-sale-items header b{color:#000!important;font-size:7.8pt;font-weight:900}
  .terminal-printing .sale-receipt .terminal-sale-items header strong{color:#000!important;font-size:7.2pt;font-weight:900}
  .terminal-printing .sale-receipt .terminal-sale-items article>div{padding:.8mm 0;color:#111!important;font-size:6.3pt;font-weight:800}
  .terminal-printing .sale-receipt .terminal-sale-items article>div b{color:#000!important;font-weight:900}
  .terminal-printing .sale-receipt .terminal-sale-items footer{padding-top:.8mm;color:#000!important;font-size:6.7pt;font-weight:800}
  .terminal-printing .sale-receipt .terminal-sale-items footer strong{color:#000!important;font-size:7.8pt;font-weight:900}
  .terminal-printing .sale-receipt .sale-receipt-totals{margin-top:2mm;gap:.8mm}
  .terminal-printing .sale-receipt .sale-receipt-totals>div{min-height:0;padding:1.1mm 1.5mm;border-color:#555;border-radius:1mm;background:#fff!important}
  .terminal-printing .sale-receipt .sale-receipt-totals span{color:#000!important;font-size:6.7pt;font-weight:900}
  .terminal-printing .sale-receipt .sale-receipt-totals b{color:#000!important;font-size:8pt;font-weight:900}
  .terminal-printing .sale-receipt .sale-receipt-totals .grand{border:1.5px solid #000;background:#fff!important}
  .terminal-printing .sale-receipt .sale-receipt-totals .grand span{color:#000!important;font-size:7pt}
  .terminal-printing .sale-receipt .sale-receipt-totals .grand strong{color:#000!important;font-size:9.5pt;font-weight:900}
  .terminal-printing .sale-receipt .receipt-note{margin-top:1.5mm;padding:1.3mm;color:#000!important;border-color:#777;background:#fff!important;font-size:7pt;font-weight:800}
  .terminal-printing .sale-receipt .receipt-note small{color:#000!important;font-size:6.5pt}
  .terminal-printing .sale-receipt .receipt-thanks{margin-top:2mm;padding-top:1.5mm;color:#000!important;border-top:1px dashed #222;font-size:7.5pt;font-weight:900}
}
