*{box-sizing:border-box}body{margin:0;font:14px system-ui;background:#f4f7fb;color:#172033;display:flex;min-height:100vh}aside{width:230px;background:#17233b;color:white;padding:24px;position:fixed;height:100vh}aside h1{margin:0 0 30px;color:#72e0c1}nav button{display:block;width:100%;padding:12px;margin:4px 0;border:0;background:none;color:#b9c4d8;text-align:left;border-radius:9px}nav button.active,nav button:hover{background:#293956;color:white}aside small{position:absolute;bottom:22px}main{margin-left:230px;padding:28px;width:calc(100% - 230px)}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.header-actions{display:flex;align-items:center;gap:10px}#currentUser{color:#667085;font-weight:600}.role-toggle{display:inline-flex;align-items:center;gap:8px;padding:6px 8px 6px 10px;background:transparent;color:#667085;font-weight:600}.role-toggle[hidden]{display:none}.role-toggle:hover{background:#eef2f6}.role-toggle i{position:relative;display:block;width:36px;height:20px;border-radius:999px;background:#c7ced8;box-shadow:inset 0 0 0 1px #aeb7c4;transition:background .18s}.role-toggle i:after{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transition:transform .18s}.role-toggle.active i{background:#79aef5;box-shadow:inset 0 0 0 1px #5d94df}.role-toggle.active i:after{transform:translateX(16px)}h2{font-size:26px;margin:0}header p{color:#7b8496;margin:5px 0}button{cursor:pointer;background:#176bdf;color:white;border:0;padding:10px 15px;border-radius:8px}.ghost{background:#e8edf5;color:#334}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.card,.panel{background:white;border-radius:14px;padding:20px;box-shadow:0 4px 20px #2233 0}.metric{font-size:30px;font-weight:700;margin-top:10px}.cash-today-card{grid-column:span 1}.cash-today-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px;margin-top:13px;padding-top:11px;border-top:1px solid #e1e6ed}.cash-today-breakdown span,.cash-today-excluded span{display:flex;justify-content:space-between;gap:10px;color:#667085;font-size:12px}.cash-today-breakdown b{color:#26364d;white-space:nowrap}.cash-today-excluded{display:grid;gap:5px;margin-top:10px;padding-top:9px;border-top:1px dashed #d0d5dd}.cash-today-excluded b{color:#b42318;white-space:nowrap}.panel{margin-top:18px;overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #edf0f5}th{color:#7b8496}.badge{background:#e8f1ff;color:#176bdf;border-radius:20px;padding:5px 9px}.low{color:#c33;font-weight:600}dialog{border:0;border-radius:14px;width:min(560px,92vw);padding:24px}dialog::backdrop{background:#172033aa}#fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.repair-modal{width:min(1180px,96vw);max-height:94vh;padding:22px}.repair-modal #formTitle{margin:0 0 14px;font-size:22px}.repair-modal #fields{display:block}.repair-card{display:grid;grid-template-columns:1fr 1fr;gap:14px}.repair-card section{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;align-content:start;border:1px solid #d8dee8;border-radius:10px;padding:14px;background:#fafbfd}.repair-card section h4{grid-column:1/-1;margin:0 0 3px;padding-bottom:8px;border-bottom:1px solid #e1e6ed;color:#30445f}.repair-card label{margin:0}.repair-card .wide{grid-column:1/-1}.repair-card textarea{min-height:56px;resize:vertical}.repair-card section:nth-child(3){grid-column:1/-1;grid-template-columns:repeat(3,1fr)}.repair-card section:nth-child(3) h4{grid-column:1/-1}.repair-card section:nth-child(3) .wide{grid-column:auto}.repair-card section:nth-child(3) textarea{min-height:58px}.client-picker{display:flex;gap:7px;align-items:center}.client-combo{position:relative;flex:1}.client-combo>input{margin-top:5px;padding-right:40px}.combo-toggle{position:absolute;right:1px;top:6px;width:36px;height:36px;padding:0;border-radius:0 7px 7px 0;background:#e8edf5;color:#40526b;font-size:16px}.client-menu{display:none;position:absolute;z-index:30;left:0;right:0;top:46px;max-height:240px;overflow:auto;background:white;border:1px solid #bfc8d5;border-radius:8px;box-shadow:0 12px 30px #17203333;padding:5px}.client-menu.open{display:block}.client-menu button{display:flex;justify-content:space-between;gap:14px;width:100%;padding:9px 10px;background:white;color:#26364d;text-align:left;border-radius:5px}.client-menu button:hover{background:#eaf2ff}.client-menu button span{color:#748096;white-space:nowrap}.client-empty{padding:12px;color:#788497;text-align:center}.icon-btn{flex:0 0 38px;height:38px;padding:0;margin-top:5px;background:#e8edf5;color:#40526b;font-size:19px}.icon-btn:disabled{opacity:.35;cursor:not-allowed}.icon-btn:not(:disabled):hover,.icon-btn.editing{background:#176bdf;color:white}.repair-card input[readonly],.repair-card textarea[readonly]{background:#f0f3f7;color:#687386;cursor:default}.issuance-history{min-height:76px;line-height:1.65;resize:none}.service-details{grid-column:1/-1;border:1px solid #d8dee8;border-radius:10px;background:#fafbfd}.service-details>summary{cursor:pointer;padding:12px 14px;font-weight:700;color:#30445f;list-style:none}.service-details>summary::-webkit-details-marker{display:none}.service-details>summary::after{content:'▾';float:right;transition:transform .15s}.service-details[open]>summary::after{transform:rotate(180deg)}.service-details[open]>summary{border-bottom:1px solid #e1e6ed}.service-details-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px}.repair-card .service-details section{border:0;padding:0;background:transparent}.repair-card .work-block{min-height:110px}.repair-card .work-block p{grid-column:1/-1;color:#778195;margin:0}.repair-modal form>footer{position:sticky;bottom:-22px;background:white;padding:14px 0 0;margin-top:14px;border-top:1px solid #e1e6ed}label{color:#5d687b}input,select,textarea{display:block;width:100%;padding:10px;border:1px solid #d7ddea;border-radius:7px;margin-top:5px}textarea{min-height:70px}form footer{text-align:right;margin-top:18px}#toast{position:fixed;right:20px;bottom:20px;background:#17233b;color:white;padding:12px;border-radius:8px;display:none}#login{display:none;position:fixed;inset:0;z-index:100;background:linear-gradient(135deg,#17233b,#29466f);align-items:center;justify-content:center;padding:20px}.locked #login{display:flex}.locked aside,.locked main{display:none}#loginForm{width:min(390px,100%);background:white;padding:34px;border-radius:18px;box-shadow:0 20px 60px #0005}#loginForm h1{margin:0;color:#17233b;font-size:30px}#loginForm p{color:#7b8496;margin:8px 0 25px}#loginForm label{display:block;margin:14px 0}#loginForm button{width:100%;margin-top:8px}#loginError{color:#c33;min-height:20px;margin-top:12px}.repair-tools{display:flex;gap:12px;align-items:center;background:white;padding:12px 16px;border-radius:12px}.repair-tools input{max-width:440px;margin:0}.repair-tools>select{width:auto;min-width:190px;margin:0;padding:10px}.status-filter{position:relative}.status-filter summary{cursor:pointer;background:#e8edf5;padding:10px 14px;border-radius:8px;min-width:150px}.status-filter>div{position:absolute;z-index:10;top:44px;left:0;background:white;padding:14px;box-shadow:0 10px 30px #17203333;border-radius:10px;width:210px}.status-filter label{display:block;padding:5px}.status-filter input{display:inline;width:auto;margin:0}.status-filter button{width:100%;margin-top:8px}.repair-tools span{margin-left:auto;color:#667085}.repair-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:14px;background:white;border-top:1px solid #e1e6ed}.repair-pager button{min-width:105px}.repair-pager button:disabled{opacity:.4;cursor:not-allowed}.repair-pager span{color:#667085}.repair-page-jump{display:flex;align-items:center;gap:7px;color:#667085}.repair-page-jump input{width:72px;height:34px;margin:0;padding:5px 8px;text-align:center}.repair-table{padding:0;border-radius:8px}.repair-table table{min-width:1250px;font-size:13px}.repair-table th{position:sticky;top:0;background:#eef2f6;color:#344054;padding:9px}.repair-table td{padding:7px 9px}.repair-table tbody tr:hover{filter:brightness(.96)}.repair-table tr.age-overdue{background:#ffb1ab}.repair-table tr.age-warning{background:#fff3a6}.repair-table tr.age-current{background:#fff}.repair-table tr.age-issued{background:#fff;color:#667085}.repair-table tr.status-home{background:#ffc477}.repair-table tbody tr{cursor:pointer;position:relative}.repair-table tbody tr.selected{outline:3px solid #176bdf;outline-offset:-3px;box-shadow:inset 0 0 0 1px #fff}.inline-status{display:block;width:calc(100% + 7px);height:26px;margin:-5px 0 -5px -7px;padding:0 28px 0 7px;border:1px solid #9bb9e8;border-radius:6px;background-color:#f7faff;background-image:linear-gradient(45deg,transparent 50%,#4b6f9f 50%),linear-gradient(135deg,#4b6f9f 50%,transparent 50%);background-position:calc(100% - 12px) 10px,calc(100% - 8px) 10px;background-size:4px 4px,4px 4px;background-repeat:no-repeat;color:#172033;font:600 13px system-ui;line-height:24px;appearance:none;vertical-align:middle;box-shadow:0 1px 2px #17203312;transition:border-color .15s,box-shadow .15s}.inline-status:hover{border-color:#5d8fd8;background-color:#fff}.inline-status:focus{outline:0;border-color:#176bdf;box-shadow:0 0 0 2px #176bdf26}.cash-table{padding:0;border-radius:8px;overflow:auto;max-height:calc(100vh - 245px)}.cash-table table{min-width:1500px;font-size:13px}.cash-table th{position:sticky;top:0;background:#eef2f6;color:#344054;padding:9px;white-space:nowrap}.cash-table td{padding:7px 9px;border:1px solid #dfe4eb;vertical-align:middle}.cash-table tbody tr{cursor:pointer}.cash-table tbody tr:hover{filter:brightness(.97)}.cash-table tbody tr.cash-debt{background:#ffb1ab}.cash-table tbody tr.cash-debt_closed{background:#b9dcff}.cash-table tbody tr.cash-fresh{background:#bff1b5}.cash-table tbody tr.cash-deleted{background:#d9dde3!important;color:#7a818d}.cash-table tbody tr.cash-deleted input,.cash-table tbody tr.cash-deleted select{background:#e4e7eb;color:#7a818d;cursor:not-allowed}.cash-table tbody tr.selected{outline:3px solid #176bdf;outline-offset:-3px}.cash-date{font-weight:700;white-space:nowrap}.cash-number{font-weight:700;color:inherit;text-align:center;cursor:default}.cash-number:hover{background:#eef2f6}.cash-linked .cash-editable{cursor:not-allowed}.cash-debt-link,.cash-items-link{display:grid;gap:2px;width:100%;min-height:34px;padding:5px 8px;background:#edf3ff;color:#2459a9;text-align:left;border:1px solid #9bb9e8}.cash-debt-link:hover,.cash-items-link:hover{background:#dbe9ff}.cash-debt-link small,.cash-items-link small{color:#667085;white-space:normal;overflow:hidden;text-overflow:ellipsis}.cash-items-link b{color:#2459a9}.linked-debt-history{display:grid;gap:6px;padding:12px;border:1px solid #9bb9e8;border-radius:8px;background:#edf3ff}.linked-debt-history>span{color:#667085;font-size:12px}.linked-debt-history button{display:grid;gap:4px;width:100%;padding:9px 10px;background:#fff;color:#2459a9;text-align:left;border:1px solid #b8cbea}.linked-debt-history button:hover{background:#f7faff}.linked-debt-history small{color:#667085}.warning-btn{background:#b54708}.cash-amount{font-weight:700;white-space:nowrap}.debt-progress{min-width:145px}.debt-progress b{display:block;font-size:12px}.debt-progress span{display:block;height:5px;margin-top:3px;background:#fff8;border-radius:5px;overflow:hidden}.debt-progress i{display:block;height:100%;background:#176bdf;border-radius:5px}.cash-pay-editor{display:flex;align-items:center;gap:5px}.cash-pay-editor img{width:18px;height:18px;flex:none}.cash-table select{min-width:105px;margin:0;padding:5px 7px;height:30px}.cash-table .cash-client{min-width:170px;height:30px;margin:0;padding:5px 7px;background:transparent}.cash-editable{cursor:text;min-width:140px}.cash-table td.cell-selected{outline:2px solid #ff8a00;outline-offset:-2px;box-shadow:inset 0 0 0 1px #fff}.cash-cell-input{width:100%;height:28px;margin:0;padding:4px 6px;border:1px solid #176bdf;background:#fff}.cash-footer{display:flex;align-items:center;gap:14px;background:white;border-top:1px solid #dfe4eb;padding:8px 12px}.cash-footer .repair-pager{flex:1;border:0;padding:6px}.cash-actions{display:flex;gap:8px;margin-left:auto;white-space:nowrap}.danger-btn{background:#d92d20}.danger-dark{background:#7a271a}.restore-btn{background:#16803c}.cash-dialog{width:min(620px,94vw);border:0;border-radius:14px;padding:22px}.cash-dialog::backdrop{background:#172033aa}.cash-dialog-body{display:grid;gap:12px;max-height:65vh;overflow:auto}.cash-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.history-list{display:grid;gap:8px}.history-list>div{display:grid;gap:3px;padding:10px;border:1px solid #dfe4eb;border-radius:8px}.history-list span,.history-list small{color:#667085}.cash-history-title{margin-top:4px;font-weight:800;color:#30445f}.cash-history-timeline{display:grid;margin-top:2px}.cash-history-timeline article{position:relative;display:grid;grid-template-columns:18px 1fr;gap:9px;padding:0 0 14px}.cash-history-timeline article:not(:last-child):before{content:'';position:absolute;left:6px;top:13px;bottom:-1px;width:2px;background:#d7e3f4}.cash-history-timeline article>i{position:relative;z-index:1;width:14px;height:14px;margin-top:4px;border:3px solid #176bdf;border-radius:50%;background:white}.cash-history-timeline article>div{display:grid;gap:3px;padding:9px 11px;border:1px solid #dfe4eb;border-radius:9px;background:#fafcff}.cash-history-timeline time{color:#667085;font-size:11px}.cash-history-timeline b{color:#26364d}.cash-history-timeline p{margin:0;color:#526176;font-size:12px;line-height:1.4}.pay-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:12px;white-space:nowrap;font-weight:700}.pay-badge img{width:17px;height:17px}.pay-gold,.pay-qr{background:#fff0f0;color:#b42318}.pay-cash{background:#edf8f1;color:#18794e}.pay-bank{background:#edf3ff;color:#2459a9}.pay-other{background:#f2f4f7;color:#475467}@media(max-width:700px){aside{width:100%;height:auto;position:fixed;bottom:0;top:auto;padding:8px;z-index:5}aside h1,aside small{display:none}nav{display:flex;overflow:auto}nav button{white-space:nowrap}main{margin:0;padding:18px;width:100%;padding-bottom:80px}.cards{grid-template-columns:1fr}#fields{grid-template-columns:1fr}header{align-items:flex-start}.header-actions{flex-wrap:wrap;justify-content:flex-end}#currentUser{width:100%;text-align:right}}
#brand{display:block;width:100%;margin:0 0 30px;padding:0;background:none;color:#72e0c1;text-align:left;font-size:26px;font-weight:700}
.counterparties{position:absolute;left:24px;right:24px;bottom:48px}.counterparties summary{cursor:pointer;padding:12px;color:#b9c4d8;border-radius:9px;list-style:none}.counterparties summary::after{content:'▾';float:right}.counterparties[open] summary{background:#293956;color:white}.counterparties button{padding-left:25px}.bank-account{grid-column:1/-1;border:1px solid #d8dee8;border-radius:9px;padding:14px;margin-top:5px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.bank-account legend{color:#31945f;font-weight:600;padding:0 5px}.bank-account .wide{grid-column:1/-1}.bank-picker{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) 40px;gap:5px}.bank-picker input,.bank-picker select{margin-top:5px}.bank-picker button{height:38px;margin-top:5px;padding:0;font-size:20px;border-radius:5px}
.bank-editor{display:grid;grid-template-columns:1fr 1fr auto auto;gap:8px;align-items:end;padding:12px;background:#f7f9fc;border:1px solid #dfe4eb;border-radius:9px}.bank-editor button{height:38px}.bank-rows{display:grid;gap:7px}.bank-rows>div{display:grid;grid-template-columns:1fr 40px auto;gap:7px;align-items:center;padding:9px 10px;border:1px solid #dfe4eb;border-radius:8px}.bank-rows span{display:grid}.bank-rows small{color:#667085;margin-top:2px}.bank-rows .edit-bank{padding:0;height:36px;font-size:18px;background:#e8edf5;color:#40526b}.bank-rows .delete-bank{background:#d92d20}@media(max-width:700px){.bank-editor{grid-template-columns:1fr}.bank-picker{grid-template-columns:1fr 40px}.bank-picker input{grid-column:1/-1}.bank-rows>div{grid-template-columns:1fr auto auto}}
.field-error{display:block;min-height:18px;margin-top:4px;color:#d92d20;font-size:12px;font-weight:600}.invalid{border-color:#d92d20!important;background:#fff4f3!important;box-shadow:0 0 0 2px #d92d201c}
.organization-table{padding:0}.organization-table tbody tr{cursor:pointer}.organization-table tbody tr:hover{background:#f7f9fc}.organization-table tbody tr.selected{outline:3px solid #176bdf;outline-offset:-3px}.organization-table tbody tr.organization-deleted{background:#e1e5eb;color:#7a818d;text-decoration:line-through}.organization-table tbody tr.organization-deleted:hover{background:#d7dce3}
.uppercase-input{text-transform:uppercase}.own-organization{background:#fff9e8!important}.own-crown{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin-right:5px;border-radius:50%;background:#f5c542;color:#704f00;font-size:17px;text-decoration:none}.own-note{margin-left:auto;color:#8a6400!important;font-weight:700}.own-organization-card{margin-top:18px;border-left:5px solid #f5c542;background:linear-gradient(135deg,#fffdf5,#fff8dc)}.own-organization-card h3{margin:0 0 5px;color:#8a6400;font-size:22px}.own-organization-card>b{display:block;margin-bottom:14px}.own-organization-card>div{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:5px 0;border-top:1px solid #eadfae}.own-organization-card span{color:#7b6b35}
.stock-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;align-items:start}.stock-groups{position:sticky;top:20px;background:#fff;border-radius:12px;padding:14px;box-shadow:0 4px 20px #2233 0;max-height:calc(100vh - 150px);overflow:auto;overscroll-behavior:contain}.stock-groups-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.stock-groups-head h3{margin:0}.stock-groups-head button{width:36px;height:34px;padding:0;background:#e8edf5;color:#40526b}.stock-groups>input{margin:12px 0}.group-tree,.group-tree ul{display:grid;gap:3px}.group-tree ul{margin:0;padding:0;list-style:none}.group-tree button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:9px 8px 9px calc(8px + var(--depth,0)*15px);background:transparent;color:#344054;text-align:left}.group-tree button:hover{background:#eef4ff}.group-tree button.active{background:#176bdf;color:#fff}.group-tree button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-tree button b{font-size:12px;opacity:.7}.stock-main{min-width:0}.stock-toolbar{display:flex;align-items:center;gap:10px;background:#fff;border-radius:12px;padding:12px 14px}.stock-toolbar input{margin:0;max-width:440px}.stock-toolbar select{margin:0;width:auto;min-width:190px}.stock-toolbar span{margin-left:auto;color:#667085;white-space:nowrap}.stock-table{padding:0;border-radius:9px}.stock-table th{position:sticky;top:0;background:#eef2f6}.stock-table tbody tr{cursor:pointer}.stock-table tbody tr:hover{background:#f5f8fc}.stock-table tr.stock-low{background:#fff0ef;color:#9f251a}.stock-table tr.stock-debt{background:#ffd6d2;color:#8f1710}.stock-debt-badge{display:inline-block;padding:3px 7px;border-radius:12px;background:#b42318;color:#fff;font-weight:700;white-space:nowrap}.product-qty-field input[readonly]{background:#eef1f5;color:#667085;cursor:not-allowed}.group-editor{display:grid;grid-template-columns:1fr 1fr auto auto;gap:8px;align-items:end;padding:12px;background:#f7f9fc;border:1px solid #dfe4eb;border-radius:9px}.group-editor button{height:38px}.group-manager-list{display:grid;gap:7px}.group-manager-list>div{display:grid;grid-template-columns:1fr 40px auto;gap:7px;align-items:center;padding:9px 10px;border:1px solid #dfe4eb;border-radius:8px}.group-manager-list span{display:grid}.group-manager-list small{color:#667085}.group-manager-list .edit-group{padding:0;height:36px;background:#e8edf5;color:#40526b;font-size:18px}.group-manager-list .delete-group{background:#d92d20}@media(max-width:900px){.stock-layout{grid-template-columns:1fr}.stock-groups{position:static;max-height:none}.stock-toolbar{flex-wrap:wrap}.stock-toolbar span{margin-left:0}.group-editor{grid-template-columns:1fr}}
.group-toggle{display:inline-block;width:18px;font-style:normal;text-align:center;font-size:15px;line-height:18px;border-radius:3px}.group-toggle:not(.empty):hover{background:#17203318}.group-toggle.empty{opacity:.35;cursor:default}
.cash-table tbody tr.cash-bank-pending,.cash-table tbody tr.cash-bank-pending:hover{background:#ffb1ab!important}.cash-table tbody tr.cash-bank-paid,.cash-table tbody tr.cash-bank-paid:hover{background:#bff1b5!important}.payment-dates{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.payment-status-paid{color:#16803c}.payment-status-pending{color:#b42318}.payment-dates>div{display:grid;gap:4px;padding:12px;border:1px solid #dfe4eb;border-radius:8px;background:#f8fafc}.payment-dates span{color:#667085}.history-collapsed{border:1px solid #dfe4eb;border-radius:8px}.history-collapsed>summary{cursor:pointer;padding:12px;font-weight:700}.history-collapsed .history-list{padding:0 10px 10px}.cash-product-cell{min-width:380px;width:380px;padding:4px!important}.cash-table th:nth-child(3){min-width:380px;width:380px}.cash-table th:nth-child(5),.cash-table th:nth-child(6),.cash-table td[data-field=extra_1],.cash-table td[data-field=extra_2]{min-width:90px;width:100px;max-width:110px}.cash-table td[data-field=extra_1],.cash-table td[data-field=extra_2]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cash-product-picker{display:grid;grid-template-columns:1fr 32px;gap:4px}.cash-product-picker input{height:30px;margin:0;padding:5px 7px;background:transparent}.cash-product-picker button{height:30px;padding:0;border-radius:5px;font-size:17px}.stock-picker-list{display:grid;gap:5px;max-height:360px;overflow:auto}.stock-picker-list button{display:flex;justify-content:space-between;gap:12px;width:100%;background:#fff;color:#26364d;border:1px solid #dfe4eb;text-align:left}.stock-picker-list button:hover,.stock-picker-list button.selected{background:#eaf2ff;border-color:#176bdf}.stock-picker-list span{color:#667085}.disabled-field{opacity:.65}.disabled-field input{background:#e9edf2;cursor:not-allowed}
.cash-product-picker{position:relative}.cash-product-search{opacity:0;pointer-events:none;transform:scale(.85);transition:opacity .12s,transform .12s}.cash-product-cell:focus-within .cash-product-search{opacity:1;pointer-events:auto;transform:scale(1)}.cash-product-suggestions{position:absolute;z-index:45;top:34px;left:0;right:36px;display:grid;max-height:260px;overflow:auto;padding:5px;background:#fff;border:1px solid #bfc8d5;border-radius:7px;box-shadow:0 12px 28px #17203335}.cash-product-suggestions button{display:flex;justify-content:space-between;gap:8px;width:100%;padding:7px 8px;background:#fff;color:#26364d;text-align:left}.cash-product-suggestions button:hover{background:#eaf2ff}.cash-product-suggestions small{color:#667085;white-space:nowrap}.stock-picker-dialog{width:min(950px,96vw);height:min(680px,92vh);overflow:hidden}.stock-picker-dialog>form{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;min-height:0}.stock-picker-dialog .cash-dialog-body{max-height:none;min-height:0;overflow:hidden}.stock-picker-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:14px;height:100%;min-height:0}.stock-picker-tree{min-height:0;border:1px solid #dfe4eb;border-radius:9px;padding:10px;overflow:auto;overscroll-behavior:contain}.stock-picker-tree h4{margin:2px 0 10px}.stock-picker-tree #pickerTree{display:grid;gap:3px}.stock-picker-tree button{display:flex;justify-content:space-between;width:100%;padding:8px 7px 8px calc(7px + var(--depth,0)*14px);background:#fff;color:#344054;text-align:left}.stock-picker-tree button:hover,.stock-picker-tree button.active{background:#176bdf;color:#fff}.stock-picker-products{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0}.stock-picker-products .stock-picker-list{max-height:none;min-height:0;overflow:auto;overscroll-behavior:contain}.stock-picker-products label{margin-bottom:9px}@media(max-width:700px){.stock-picker-dialog{height:min(760px,94vh)}.stock-picker-layout{grid-template-columns:1fr;grid-template-rows:minmax(140px,220px) minmax(0,1fr)}.stock-picker-tree{max-height:none}}
.cash-items-toggle{width:24px;height:24px;padding:0;margin-right:5px;background:#e8edf5;color:#2459a9;border-radius:5px}.cash-item-row{background:#f8fafc!important;color:#344054}.cash-item-row td{padding:6px 9px}.cash-item-row .item-arrow{text-align:right;color:#98a2b3;font-size:18px}.item-name{display:grid;gap:2px}.item-name small{color:#667085}.cash-item-row label{font-size:11px}.cash-item-row input{height:28px;margin:2px 0 0;padding:4px 6px}.item-delete{width:28px;height:28px;padding:0;background:#fee4e2;color:#b42318;font-size:18px}.stock-pick-row{display:flex!important;align-items:center;gap:9px;padding:8px;border:1px solid #dfe4eb;border-radius:7px;cursor:pointer}.stock-pick-row:hover{background:#eaf2ff}.stock-pick-row>input{width:auto;margin:0}.stock-pick-row>span{display:grid}.stock-pick-row small{color:#667085}.stock-pick-row.already-added{opacity:.55;cursor:not-allowed}
.repair-table tr.repair-deleted{background:#d9dde3!important;color:#7a818d}.repair-table tr.repair-deleted:hover{background:#cfd4db!important}.repair-context-menu{position:fixed;z-index:200;min-width:170px;padding:6px;background:#fff;border:1px solid #d7ddea;border-radius:9px;box-shadow:0 12px 35px #17203344}.repair-context-menu button{display:block;width:100%;padding:9px 12px;background:#fff;color:#26364d;text-align:left;border-radius:6px}.repair-context-menu button:hover{background:#eef4ff}.repair-context-menu .delete-action{color:#b42318}.repair-context-menu .restore-action{color:#16803c}
.stock-table tr.stock-deleted{background:#d9dde3!important;color:#7a818d}.stock-table tr.stock-deleted:hover{background:#cfd4db!important}.stock-context-menu{position:fixed;z-index:210;min-width:175px;padding:6px;background:#fff;border:1px solid #d7ddea;border-radius:9px;box-shadow:0 12px 35px #17203344}.stock-context-menu button{display:block;width:100%;padding:9px 12px;background:#fff;color:#26364d;text-align:left;border-radius:6px}.stock-context-menu button:hover:not(:disabled){background:#eef4ff}.stock-context-menu button:disabled{opacity:.45;cursor:not-allowed}.stock-context-menu .delete-action{color:#b42318}.stock-context-menu .restore-action{color:#16803c}.stock-picker-toolbar{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.stock-picker-toolbar button{height:38px;margin-bottom:0}
.organization-import{grid-column:1/-1;display:grid;grid-template-columns:1fr minmax(220px,1fr) auto;gap:10px;align-items:end;padding:13px;border:1px dashed #8da6c8;border-radius:10px;background:#f4f8ff}.organization-import>div{display:grid;gap:3px}.organization-import small,.organization-import #recognizeStatus{color:#667085}.organization-import input{margin:0}.organization-import details{grid-column:1/-1}.organization-import pre{max-height:180px;overflow:auto;white-space:pre-wrap;background:#fff;padding:10px;border-radius:7px;border:1px solid #d7ddea}.organization-import .recognize-success{color:#16803c!important;font-weight:600}.recognized-field{border-color:#16803c!important;box-shadow:0 0 0 2px #16803c20}@media(max-width:700px){.organization-import{grid-template-columns:1fr}.organization-import details{grid-column:1}}
/* Sticky cash header must always cover scrolling inputs and product cells. */
.cash-table thead{position:relative;z-index:60}.cash-table th{z-index:60;box-shadow:0 1px 0 #dfe4eb}

/* Fit the cash register into small laptop screens, including Windows 125% scaling. */
@media(max-width:1700px){
main{padding:18px}.repair-tools{gap:8px;padding:10px 12px}.cash-table table{width:100%;min-width:0;table-layout:fixed;font-size:11px}.cash-table th,.cash-table td{padding:5px 4px}.cash-table th:nth-child(1){width:72px}.cash-table th:nth-child(2){width:76px}.cash-table th:nth-child(3),.cash-product-cell{width:auto;min-width:0}.cash-table th:nth-child(4){width:105px}.cash-table th:nth-child(5),.cash-table th:nth-child(6),.cash-table td:nth-child(5),.cash-table td:nth-child(6){display:none}.cash-table th:nth-child(7){width:145px}.cash-table th:nth-child(8){width:105px}.cash-table th:nth-child(9){width:100px}.cash-table th:nth-child(10){width:95px}.cash-table .cash-client,.cash-table select,.cash-editable,.debt-progress{min-width:0}.cash-table .cash-client,.cash-table select{font-size:11px;padding:4px}.cash-product-picker{grid-template-columns:minmax(80px,1fr) 28px 28px;gap:2px}.cash-product-picker button{width:28px}.cash-product-input{min-width:0}.cash-amount{overflow:hidden;text-overflow:ellipsis}.cash-footer{padding:6px 8px;gap:8px}.cash-footer .repair-pager{gap:8px}.cash-footer .repair-pager button{min-width:90px;padding:8px}}
@media(max-width:1100px){.cash-table th:nth-child(4),.cash-table td:nth-child(4){display:none}.cash-table th:nth-child(3){width:auto}.cash-table th:nth-child(7){width:135px}}
.document-create{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;padding:12px;background:#f7f9fc;border:1px solid #dfe4eb;border-radius:9px}.document-create select{margin:0}.document-list{display:grid;gap:7px}.document-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid #dfe4eb;border-radius:8px}.document-list span{display:grid}.document-list small{color:#667085}.document-list>div.document-deleted{background:#e4e7eb;border-color:#c7ccd4;color:#737b87}.document-list>div.document-deleted small{color:#858c96}.document-empty{padding:24px;text-align:center;color:#667085;border:1px dashed #d0d5dd;border-radius:8px}
.document-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cash-dialog fieldset{display:grid;grid-template-columns:1fr 1fr;gap:8px;border:1px solid #dfe4eb;border-radius:8px;padding:10px}.cash-dialog fieldset legend{font-weight:700;padding:0 5px}.cash-dialog fieldset label,.document-meta label{font-size:12px;color:#475467}.cash-dialog fieldset input,.document-meta input{margin-top:3px}.document-items-head{display:flex;justify-content:space-between;align-items:center}.document-items-wrap{overflow:auto}.document-items{width:100%;border-collapse:collapse}.document-items th,.document-items td{padding:5px;border:1px solid #dfe4eb}.document-items input{min-width:110px;margin:0}.document-items .doc-item-name{min-width:280px}.document-items .doc-item-delete{width:30px;padding:4px}.document-buttons{display:flex!important;grid-auto-flow:column;gap:6px}.document-buttons button{white-space:nowrap}@media(max-width:700px){.document-meta,.cash-dialog fieldset{grid-template-columns:1fr}}
.cash-product-picker{grid-template-columns:minmax(130px,1fr) 32px 32px}.cash-product-edit,.cash-product-search{opacity:0;pointer-events:none;transform:scale(.85);transition:opacity .12s,transform .12s}.cash-table tr.selected .cash-product-edit,.cash-product-cell:focus-within .cash-product-edit,.cash-table tr.selected .cash-product-search,.cash-product-cell:focus-within .cash-product-search{opacity:1;pointer-events:auto;transform:scale(1)}.cash-product-edit{background:#e8edf5!important;color:#2459a9!important}.cash-product-suggestions{position:fixed!important;z-index:200;right:auto!important}.cash-item-row>td{padding:0!important;background:#f8fafc}.cash-items-panel{position:sticky;left:0;width:min(1100px,calc(100vw - 300px));min-width:720px;padding:8px 12px;display:grid;gap:6px;background:#f8fafc;border-left:4px solid #176bdf}.cash-item-entry{display:grid;grid-template-columns:minmax(260px,1fr) 115px 135px 120px 32px;gap:10px;align-items:center;padding:7px 8px;border:1px solid #dfe4eb;border-radius:7px;background:#fff}.cash-item-entry label{margin:0}.cash-item-entry input{margin:2px 0 0}.cash-item-entry .item-total{text-align:right;white-space:nowrap}.cash-manage-list{display:grid;gap:7px}.cash-manage-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border:1px solid #dfe4eb;border-radius:8px}.cash-manage-list span{display:grid;gap:3px}.cash-manage-list small{color:#667085}.cash-manage-delete{width:30px;height:30px;padding:0;flex:none;background:#fee4e2;color:#b42318;font-size:18px}@media(max-width:900px){.cash-items-panel{width:calc(100vw - 60px);min-width:620px}}

/* Purchase orders / incoming parts */
.po-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.po-summary>div{display:grid;gap:5px;padding:15px 17px;background:#fff;border-radius:12px;box-shadow:0 4px 20px #2233 0}.po-summary span{color:#667085}.po-summary b{font-size:24px}.po-summary .overdue{background:#fff0ef;color:#b42318}.po-summary .overdue span{color:#b42318}.po-toolbar{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#fff;border-radius:12px}.po-toolbar>div{display:flex;gap:5px}.po-toolbar button{background:#e8edf5;color:#344054}.po-toolbar button.active{background:#176bdf;color:#fff}.po-toolbar input{max-width:430px;margin:0}.po-toolbar>span{margin-left:auto;color:#667085}.po-table{padding:0}.po-table th{position:sticky;top:0;background:#eef2f6}.po-table td{vertical-align:middle}.po-table td small{display:block;margin-top:4px;color:#667085}.po-table tr.po-overdue{background:#fff0ef}.po-table tr.po-received{background:#edf8f1}.po-table tr.po-cancelled{background:#e6e9ee;color:#7a818d}.po-table tr.po-partial{background:#fff7df}.po-status{display:inline-block;padding:5px 9px;border-radius:14px;background:#e8f1ff;color:#176bdf;white-space:nowrap;font-weight:600}.po-overdue .po-status{background:#fee4e2;color:#b42318}.po-received .po-status{background:#d1fadf;color:#16803c}.po-actions{display:flex;gap:6px}.po-actions button{padding:7px 9px;white-space:nowrap}.po-actions button:first-child{background:#e8edf5;color:#344054}.po-actions .receive-btn{background:#16803c;color:#fff}.po-card{display:grid;gap:14px}.po-card>section{display:grid;grid-template-columns:repeat(3,1fr);gap:10px 12px;padding:14px;border:1px solid #d8dee8;border-radius:10px;background:#fafbfd}.po-card>section.wide{display:block}.po-card .wide{grid-column:1/-1}.po-items-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.po-items-head h4{margin:0}.po-item{display:grid;grid-template-columns:minmax(190px,1.2fr) minmax(180px,1.2fr) 120px minmax(150px,1fr) 100px 130px 130px 34px;gap:8px;align-items:end;padding:10px;margin-top:7px;background:#fff;border:1px solid #dfe4eb;border-radius:8px}.po-item label{font-size:12px}.po-item input,.po-item select{margin-top:3px}.po-remove{height:38px;padding:0;background:#fee4e2;color:#b42318;font-size:20px}.po-receive-list{display:grid;gap:8px}.po-receive-list label{display:grid;grid-template-columns:1fr 130px;gap:12px;align-items:center;padding:10px;border:1px solid #dfe4eb;border-radius:8px}.po-receive-list label>span{display:grid;gap:3px}.po-receive-list small{color:#667085}.po-receive-list input{margin:0}@media(max-width:1000px){.po-summary{grid-template-columns:1fr 1fr}.po-card>section{grid-template-columns:1fr 1fr}.po-item{grid-template-columns:1fr 1fr}.po-remove{width:38px}.po-table{overflow:auto}.po-table table{min-width:1100px}}
.po-toolbar .po-new{background:#176bdf;color:#fff;white-space:nowrap}.po-toolbar .po-permission{color:#b54708;font-weight:600;white-space:nowrap}.po-actions .po-delete{background:#fee4e2;color:#b42318}
.po-view{display:grid;gap:14px}.po-view>section{display:grid;grid-template-columns:repeat(3,1fr);gap:10px 14px;padding:15px;border:1px solid #d8dee8;border-radius:10px;background:#fafbfd}.po-view>section>div{display:grid;gap:4px}.po-view>section span{color:#667085;font-size:12px}.po-view>section .wide{grid-column:1/-1}.po-view-items{margin:0;padding:0}.po-view-items th{background:#eef2f6}@media(max-width:700px){.po-view>section{grid-template-columns:1fr}}

/* Admin reports */
.report-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:14px;padding:12px;background:var(--panel,#fff);border-radius:10px}.report-toolbar label{display:grid;gap:4px;font-size:12px}.report-toolbar input,.report-toolbar select{min-height:38px}.report-cards{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin:12px 0}.report-card{padding:14px;background:var(--panel,#fff);border:1px solid var(--border,#ddd);border-radius:10px}.report-card b{display:block;font-size:18px;margin-top:6px}.report-warning{padding:12px;margin:12px 0;border:1px solid #d69e2e;background:#fffaf0;color:#744210;border-radius:8px}.report-split{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:14px}.report-print-area table{width:100%;border-collapse:collapse;background:var(--panel,#fff)}.report-print-area th,.report-print-area td{padding:8px;border:1px solid var(--border,#ddd);text-align:left}.report-print-area th{background:rgba(127,127,127,.08)}.inventory-fill{min-width:90px;height:28px}@media(max-width:900px){.report-cards{grid-template-columns:repeat(2,1fr)}.report-split{grid-template-columns:1fr}}

/* Hierarchical group filter in stock reports */
.report-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:14px;align-items:start}.report-layout>#reportResult:only-child{grid-column:1/-1}.report-group-panel{position:sticky;top:10px;width:auto;height:auto;background:var(--panel,#fff);color:#172033;border:1px solid var(--border,#ddd);border-radius:10px;padding:10px;max-height:calc(100vh - 150px);overflow:auto}.report-group-panel[hidden]{display:none}.report-group-panel[hidden]+#reportResult{grid-column:1/-1}.report-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.report-group-head h3{margin:0}.report-group-head span{font-size:11px;opacity:.7;text-align:right}.report-group-actions{display:flex;gap:6px;margin:9px 0}.report-group-actions button{flex:1;padding:6px}.report-group-tree ul{list-style:none;margin:0;padding-left:15px;border-left:1px solid var(--border,#ddd)}.report-group-tree>ul{padding-left:0;border-left:0}.report-group-tree li{margin:2px 0}.report-group-tree button{width:100%;display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:4px;padding:7px 6px;border:0;background:transparent;color:#344054;text-align:left;border-radius:7px}.report-group-tree button:hover{background:rgba(127,127,127,.1)}.report-group-tree button.checked{font-weight:600}.report-group-tree button.partial{background:rgba(49,130,206,.08)}.report-group-tree button b{font-size:11px;opacity:.65}.report-check{font-size:18px;line-height:1;color:#3182ce}.report-group-tree button.empty .report-check{color:#718096}@media(max-width:900px){.report-layout{grid-template-columns:1fr}.report-group-panel{position:static;max-height:360px}.report-group-panel[hidden]+#reportResult{grid-column:auto}}

/* Compact automatic daily cash summary */
.daily-cash-note{margin-left:auto;color:#667085;font-size:12px}.daily-cash-month-nav{display:flex;align-items:end;gap:6px}.daily-cash-month-nav label{margin:0}.daily-cash-month-nav button{min-width:38px;padding:8px 10px}.daily-cash-table{padding:0;overflow:auto}.daily-cash-table table{min-width:1380px;font-size:12px}.daily-cash-table th{position:sticky;top:0;background:#eef2f6;color:#344054;white-space:nowrap}.daily-cash-table td,.daily-cash-table th{padding:8px 9px}.daily-cash-table tbody tr:hover{background:#f7f9fc}.daily-cash-table td:nth-child(7),.daily-cash-table td:last-child{background:#f7faff}@media(max-width:900px){.daily-cash-note{width:100%;margin-left:0}}
.daily-cash-detail-row{cursor:pointer}.daily-cash-detail-row:hover{background:#eaf2ff!important}.cash-day-dialog{width:min(1100px,96vw)}.cash-day-dialog .cash-dialog-body{max-height:72vh}.cash-day-dialog .report-cards{margin-top:0}.cash-day-details{margin:0;padding:0;overflow:auto}.cash-day-details table{min-width:900px;font-size:12px}.cash-day-details th{white-space:nowrap;background:#eef2f6}.cash-day-details td,.cash-day-details th{padding:8px}

/* Human-readable audit history */
.history-tabs{display:flex;gap:7px;overflow:auto;padding:5px 0 3px}.history-tabs button{display:flex;align-items:center;gap:7px;white-space:nowrap;background:#e8edf5;color:#40526b}.history-tabs button b{min-width:22px;padding:2px 6px;border-radius:12px;background:#fff;color:#667085;font-size:11px}.history-tabs button.active{background:#176bdf;color:#fff}.history-tabs button.active b{color:#176bdf}.history-tools{display:flex;align-items:center;gap:10px;margin-top:8px;padding:12px 14px;background:#fff;border-radius:12px}.history-tools input{max-width:430px;margin:0}.history-tools select{width:auto;min-width:180px;margin:0}.history-tools>span{margin-left:auto;color:#667085}.human-history{padding:0;overflow:auto}.human-history table{min-width:1250px;font-size:12px}.human-history th{position:sticky;top:0;background:#eef2f6;color:#344054;white-space:nowrap}.human-history td{padding:9px;vertical-align:top}.human-history td:nth-child(5){min-width:260px}.human-history td:nth-child(6){min-width:340px;color:#5d687b}.human-history time{white-space:nowrap}.human-history tbody tr[data-history-index]{cursor:pointer}.human-history tbody tr[data-history-index]:hover{background:#f7faff}.history-fields{display:flex;flex-wrap:wrap;gap:5px;min-width:300px}.history-fields>span{display:inline-block;padding:3px 7px;border-radius:12px;background:#fff2cc;color:#7a5900;font-weight:700;white-space:nowrap}.history-section,.history-action{display:inline-block;padding:4px 8px;border-radius:14px;white-space:nowrap;font-weight:700}.history-section{background:#edf3ff;color:#2459a9}.history-action.history-delete{background:#fee4e2;color:#b42318}.history-action.history-create{background:#d1fadf;color:#16803c}.history-action.history-update{background:#fff2cc;color:#8a6400}.history-action.history-other{background:#f2f4f7;color:#475467}@media(max-width:900px){.history-tools{flex-wrap:wrap}.history-tools input{max-width:none}.history-tools>span{margin-left:0}}

/* Keep this final: later cash rules must not restore desktop minimum widths. */
@media(max-width:1700px){.cash-table table{width:100%;min-width:0!important;table-layout:fixed;font-size:11px}.cash-table th,.cash-table td{padding:5px 4px}.cash-table th:nth-child(1){width:72px}.cash-table th:nth-child(2){width:76px}.cash-table th:nth-child(3),.cash-table .cash-product-cell{width:auto;min-width:0}.cash-table th:nth-child(4){width:105px}.cash-table th:nth-child(5),.cash-table th:nth-child(6),.cash-table td:nth-child(5),.cash-table td:nth-child(6){display:none}.cash-table th:nth-child(7){width:145px}.cash-table th:nth-child(8){width:105px}.cash-table th:nth-child(9){width:100px}.cash-table th:nth-child(10){width:95px}.cash-table .cash-client,.cash-table select,.cash-table .cash-editable,.cash-table .debt-progress{min-width:0}.cash-table .cash-client,.cash-table select{font-size:11px;padding:4px}.cash-table .cash-product-picker{grid-template-columns:minmax(80px,1fr) 28px 28px;gap:2px}.cash-table .cash-product-picker button{width:28px}.cash-table .cash-product-input{min-width:0}.cash-table .cash-amount{overflow:hidden;text-overflow:ellipsis}}
@media(max-width:1100px){.cash-table th:nth-child(4),.cash-table td:nth-child(4){display:none}.cash-table th:nth-child(3){width:auto}.cash-table th:nth-child(7){width:135px}}

.cash-product-selected-picker{grid-template-columns:minmax(0,1fr) 32px}.cash-product-selected{display:flex;align-items:center;min-width:0;height:30px;padding:5px 7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;user-select:none}

.cash-service-cost{display:grid!important;grid-template-columns:auto 110px;align-items:center;gap:7px;margin:0 0 0 auto!important;font-size:12px;color:#667085}.cash-service-cost input{margin:0!important;height:30px;padding:4px 7px}

.cash-today-profit{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;padding:9px 10px;border-radius:8px;background:#edf8f1;color:#18794e}.cash-today-profit b{font-size:18px;white-space:nowrap}
.cash-day-payment-summary{margin-bottom:14px;padding:16px;border:1px solid #dfe4eb;border-radius:12px;background:#fff}.cash-day-payment-total{display:flex;justify-content:space-between;align-items:center;gap:12px}.cash-day-payment-total span{font-size:15px;color:#475467}.cash-day-payment-total b{font-size:25px;color:#172033;white-space:nowrap}.cash-day-payment-summary .cash-today-breakdown,.cash-day-payment-summary .cash-today-excluded{grid-template-columns:1fr 1fr}

.cash-item-qty,.cash-item-price,.cash-service-cost{display:grid!important;grid-template-columns:auto 100px;align-items:center;gap:7px;margin:0!important;font-size:12px;color:#667085;white-space:nowrap}.cash-item-price{margin-left:auto!important}.cash-item-qty input,.cash-item-price input,.cash-service-cost input{margin:0!important;height:30px;padding:4px 7px}.cash-manage-item>span{min-width:180px;flex:1}.cash-manage-total{color:#344054}.cash-manage-summary{text-align:right;padding:5px 10px;font-size:15px;color:#667085}.cash-manage-summary b{margin-left:6px;color:#172033;font-size:17px}@media(max-width:650px){.cash-manage-list>div{flex-wrap:wrap}.cash-manage-item>span{flex-basis:100%}.cash-item-price{margin-left:0!important}}

/* Optional cash-to-repair link in the Equipment column. */
.cash-equipment-cell{padding:3px!important;overflow:hidden}.cash-equipment{position:relative;display:flex;align-items:center;min-width:0;min-height:32px;padding:3px 29px 3px 5px}.cash-equipment>span{display:-webkit-box;min-width:0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;overflow-wrap:anywhere;line-height:1.25}.cash-equipment.linked>span{color:#2459a9;font-weight:700;cursor:pointer}.cash-equipment-link{position:absolute;right:2px;top:50%;width:25px;height:25px;padding:0;transform:translateY(-50%) scale(.85);opacity:0;pointer-events:none;background:#e8edf5;color:#2459a9;font-size:16px;transition:.12s}.cash-equipment-cell:hover .cash-equipment-link,.cash-equipment-cell.cell-selected .cash-equipment-link{opacity:1;pointer-events:auto;transform:translateY(-50%) scale(1)}.repair-link-dialog{width:min(1120px,96vw)}.repair-link-issued-toggle{display:flex;align-items:center;gap:8px;width:max-content;color:#475467}.repair-link-issued-toggle input{width:auto;margin:0}.repair-link-count{min-height:17px;color:#667085;font-size:12px}.repair-link-list{display:grid;gap:5px;max-height:430px;overflow:auto}.repair-link-list button{display:block;min-width:980px;width:100%;padding:9px 10px;background:#fff;color:#26364d;border:1px solid #dfe4eb;text-align:left}.repair-link-list button:hover,.repair-link-list button.selected{background:#eaf2ff;border-color:#176bdf}.repair-link-list button>span{display:grid;grid-template-columns:70px 90px minmax(150px,1.25fr) 135px minmax(190px,1.5fr) minmax(150px,1fr) 100px;align-items:center;gap:10px;white-space:nowrap}.repair-link-list button b,.repair-link-list button strong{color:#26364d}.repair-link-list button time,.repair-link-list button em,.repair-link-list button small,.repair-link-list button i{color:#667085;font-style:normal;font-weight:400}.repair-payments-field{display:grid;gap:5px}.repair-payments-field>span{color:#5d687b}.repair-payments-field>div{display:grid;gap:5px;padding:7px;border:1px solid #d7ddea;border-radius:7px;background:#f0f3f7}.repair-payments-field button{display:flex;justify-content:space-between;gap:10px;width:100%;padding:7px 9px;background:#f8fafc;color:#526176;border:1px solid #dfe4eb;text-align:left;cursor:default}.repair-payments-field button:hover{border-color:#9bb9e8}.repair-payments-field small{white-space:nowrap;color:#778195}.repair-payments-field p{margin:0;padding:10px;border:1px solid #d7ddea;border-radius:7px;background:#f0f3f7;color:#687386}
@media(max-width:1100px){.cash-table th:nth-child(4),.cash-table td:nth-child(4){display:table-cell!important;width:105px}.cash-table th:nth-child(3){width:auto}}

/* Wider payment-items editor: no nested horizontal scrollbar. */
.cash-items-dialog{width:min(980px,96vw);max-width:96vw}.cash-items-dialog .cash-dialog-body{overflow-y:auto;overflow-x:hidden}.cash-items-dialog .cash-manage-list{min-width:0}.cash-items-dialog .cash-manage-item{display:grid;grid-template-columns:minmax(200px,1fr) auto auto auto 30px;gap:10px;align-items:center;min-width:0}.cash-items-dialog .cash-manage-item>span{min-width:0}.cash-items-dialog #cashManageAdd{width:100%}
.cost-backfill-dialog{width:min(1100px,96vw);max-width:96vw}.cost-backfill-all{display:flex!important;align-items:center;gap:8px}.cost-backfill-all input,.cost-backfill-table input{width:auto!important;margin:0!important}.cost-backfill-table{max-height:55vh;overflow:auto}.cost-backfill-table table{width:100%;border-collapse:collapse}.cost-backfill-table th,.cost-backfill-table td{padding:8px;border-bottom:1px solid #e3e7ee;text-align:left;white-space:nowrap}.cost-backfill-table th{position:sticky;top:0;background:#fff;z-index:1}
@media(max-width:760px){.cash-items-dialog .cash-manage-item{grid-template-columns:1fr 30px}.cash-items-dialog .cash-manage-item>span{grid-column:1/-1}.cash-items-dialog .cash-item-qty,.cash-items-dialog .cash-item-price,.cash-items-dialog .cash-service-cost{grid-column:1}.cash-items-dialog .cash-manage-delete{grid-column:2;grid-row:2/4}.cash-items-dialog .cash-item-price{margin-left:0!important}}
.cash-items-dialog .cash-manage-item{grid-template-columns:minmax(200px,1fr) auto auto auto 70px}.cash-manage-actions{display:flex;gap:6px}.cash-manage-replace,.cash-manage-delete{width:30px;height:30px;padding:0;flex:none}.cash-manage-replace{background:#e8edf5;color:#2459a9;font-size:17px}.cash-replace-dialog{width:min(760px,96vw);height:min(680px,92vh)}.cash-replace-dialog .cash-dialog-body{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0}.cash-replace-dialog .stock-picker-list{max-height:none;min-height:0}.cash-replace-dialog .stock-picker-list button{align-items:center}.cash-replace-dialog .stock-picker-list button span{color:#667085;font-size:12px}@media(max-width:760px){.cash-items-dialog .cash-manage-item{grid-template-columns:1fr 70px}.cash-items-dialog .cash-manage-actions{grid-column:2;grid-row:2/4}}
/* Mixed payment: two compact methods in one cash cell. */
.cash-split-display{display:grid;width:100%;gap:1px;padding:3px 6px;background:#edf3ff;color:#172033;border:1px solid #79aef5;border-radius:7px;text-align:left}.cash-split-display:hover{background:#dbe9ff}.cash-split-display>span{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:5px;line-height:18px}.cash-split-display img,.cash-split-icons img{width:17px;height:17px}.cash-split-display strong{font-size:11px;line-height:18px;text-align:right;white-space:nowrap;font-weight:700;letter-spacing:0}.cash-method-icon{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:#e8edf5;color:#475467;font-size:11px;font-weight:800}.cash-method-cash{background:#d1fadf;color:#18794e}.cash-split-icons{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:32px;padding:4px;background:#edf3ff;color:#667085;border:1px solid #79aef5}.cash-split-icons i{font-style:normal;font-weight:800}.mixed-payment-dialog{width:min(720px,94vw)}.mixed-total{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid #d7e3f4;border-radius:9px;background:#f7faff}.mixed-total span{color:#667085}.mixed-total b{font-size:20px}.mixed-total em{margin-left:auto;padding:5px 9px;border-radius:14px;background:#edf3ff;color:#2459a9;font-size:12px;font-style:normal;font-weight:700}.mixed-total em.ok{background:#d1fadf;color:#18794e}.mixed-total em.bad{background:#fee4e2;color:#b42318}.mixed-payment-part{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:13px;border:2px solid #79aef5;border-radius:10px}.mixed-payment-part label{font-size:12px}.mixed-payment-part input,.mixed-payment-part select{margin-top:4px}.mixed-status{padding:12px;border-radius:8px;background:#fff7df;color:#8a4b0f;font-weight:700}.mixed-status.ok{background:#edf8f1;color:#18794e}@media(max-width:600px){.mixed-payment-part{grid-template-columns:1fr}}

/* Administration: users, live sessions and trusted browsers. */
.admin-toolbar{display:flex;gap:9px;margin-bottom:16px}.admin-table{padding:0;overflow:auto;margin-bottom:22px}.admin-table table{min-width:760px}.admin-table th{background:#eef2f6}.admin-table td{vertical-align:middle}.admin-table td small{display:block;color:#667085;margin-top:3px}.admin-table td:last-child{text-align:right}.admin-table button{white-space:nowrap}
.home-link{display:inline-block;padding:10px 14px;border-radius:8px;background:#e8edf5;color:#334;text-decoration:none;font-weight:600}.home-link[hidden]{display:none}.home-link:hover{background:#dbe3ef}

/* Persistent Everest health diagnostics. */
.health-summary{display:flex;align-items:stretch;gap:12px;margin-bottom:14px}.health-summary>div{display:grid;gap:4px;min-width:190px;padding:13px 16px;background:#fff;border-radius:10px}.health-summary span{color:#667085;font-size:12px}.health-summary b{font-size:17px}.health-summary button{margin-left:auto}.health-log-table{padding:0;overflow:auto}.health-log-table table{min-width:1050px;font-size:12px}.health-log-table th{position:sticky;top:0;background:#eef2f6}.health-log-table td{vertical-align:top}.health-log-table td:nth-child(1){white-space:nowrap}.health-log-table td:nth-child(2){min-width:190px}.health-log-table td:nth-child(4){min-width:460px}.health-log-table small{display:block;margin-top:4px;color:#667085}.health-bad{background:#fff0ef}.health-restart{background:#fff7df}.health-recovered{background:#edf8f1}.health-ok td{color:#526176}@media(max-width:700px){.health-summary{flex-wrap:wrap}.health-summary>div{flex:1}.health-summary button{margin-left:0}}

/* Keep the full navigation reachable on shorter screens. */
aside nav{max-height:calc(100vh - 115px);overflow-y:auto;overscroll-behavior:contain;padding-right:4px;scrollbar-width:thin}

/* Compact administration layout. */
.admin-toolbar{position:sticky;top:0;z-index:3;padding:8px;background:#f4f7fb;margin-bottom:8px}.admin-toolbar+ h3,.admin-table+ h3{margin:12px 0 5px}.admin-table{margin-top:5px;margin-bottom:10px;max-height:300px;border-radius:9px}.admin-table th,.admin-table td{padding:7px 9px;font-size:12px}.admin-table button{padding:6px 9px;font-size:12px}.admin-table td small{margin-top:1px}.health-summary{gap:7px;margin-bottom:8px;flex-wrap:wrap}.health-summary>div{min-width:150px;padding:8px 11px}.health-summary b{font-size:14px}.health-summary button{padding:7px 10px}.health-log-table{margin-top:8px;max-height:calc(100vh - 210px)}.health-log-table th,.health-log-table td{padding:7px 8px}

/* Protected school / e-Ashana personnel import. */

/* Compact administration navigation. */
.admin-nav{display:flex;gap:6px;margin-bottom:12px;padding:5px;background:#e8edf5;border-radius:11px;width:max-content}
.admin-nav button{background:transparent;color:#526176;padding:8px 13px}
.admin-nav button.active{background:#fff;color:#176bdf;box-shadow:0 2px 8px #17203318;font-weight:700}
.admin-toolbar{display:flex;align-items:center;gap:9px;position:static;padding:12px 14px;margin-bottom:10px;background:#fff;border-radius:11px}
.admin-toolbar>div,.admin-page-title>div{display:grid;gap:3px;margin-right:auto}
.admin-toolbar>div b,.admin-page-title b{font-size:15px;color:#26364d}
.admin-toolbar>div span,.admin-page-title span{font-size:12px;color:#667085}
.admin-page-title{display:flex;align-items:center;margin-bottom:10px;padding:12px 14px;background:#fff;border-radius:11px}
@media(max-width:700px){.admin-nav{width:100%}.admin-nav button{flex:1}.admin-toolbar{flex-wrap:wrap}.admin-toolbar>div{width:100%}}

/* Suggested photo matching for e-Ashana staff import. */
/* e-Ashana 3×4 validation and filtered import states. */
/* Automatic 3×4 face alignment preview. */
.photo-compare{display:flex;gap:7px;margin-top:7px}.photo-compare figure{margin:0;width:82px}.photo-compare img{display:block;width:82px;height:108px;object-fit:cover;border:1px solid #cfd6e2;border-radius:6px;background:#eef2f6}.photo-compare figcaption{text-align:center;color:#667085;font-size:10px;margin-top:2px}
/* School / e-Ashana mode chooser and pupil photo import. */
.photo-original-warning{display:grid;gap:9px;min-width:230px}.photo-original-warning figure{margin:0;max-width:150px}.photo-original-warning figure img{display:block;width:100%;max-height:190px;object-fit:contain;border-radius:8px;background:#eef1f5}.photo-original-warning figcaption{margin-top:4px;color:#667085;font-size:12px}.photo-original-warning label{display:flex;align-items:flex-start;gap:7px;padding:9px;border:1px solid #e4a11b;border-radius:8px;background:#fff8df;color:#744b00;font-weight:700}.photo-original-warning label input{width:auto;margin-top:2px}
.client-combo>input[readonly]{padding-right:40px;background:#f0f3f7;color:#4f5d70;cursor:default}.combo-toggle:disabled{opacity:.38;cursor:not-allowed}
.repair-card .compact-description textarea{min-height:46px;height:46px;line-height:1.3;resize:vertical}
.monthly-expenses{margin:12px 0;padding:14px;overflow:auto}.monthly-expenses-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.monthly-expenses-head h3{margin:0 0 3px}.monthly-expenses-head small{color:#667085}.monthly-expenses table{width:100%;min-width:650px}.monthly-expenses td:last-child,.monthly-expenses th:last-child{text-align:right}.monthly-expenses tfoot th{border-top:2px solid #cbd5e1}

/* Smartphone layout. Desktop rules above remain unchanged. */
@media(max-width:700px){
 html{font-size:16px;-webkit-text-size-adjust:100%}body{display:block;min-width:0;overflow-x:hidden;background:#f4f7fb}
 aside{left:0;right:0;bottom:0;width:100%;height:auto;padding:7px 8px max(7px,env(safe-area-inset-bottom));z-index:90;border-top:1px solid #31415b;box-shadow:0 -6px 20px #1720332b}
 aside #brand,aside small,aside .counterparties>summary,aside .school-nav>summary{display:none}
 aside nav{display:flex;gap:5px;max-height:none;padding:0 0 2px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:thin}
 aside nav button{flex:0 0 auto;width:auto;min-height:42px;margin:0;padding:9px 12px;border-radius:9px;white-space:nowrap;scroll-snap-align:start;text-align:center}
 aside .counterparties,aside .school-nav{position:static;display:contents}
 aside .counterparties[open],aside .school-nav[open]{display:contents}
 aside .counterparties button,aside .school-nav button{padding-left:12px}
 main{width:100%;margin:0;padding:12px 10px calc(74px + env(safe-area-inset-bottom))}
 main>header{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:12px;padding:2px 2px 10px;border-bottom:1px solid #dfe4eb}
 main>header h2{font-size:22px;line-height:1.2}main>header p{display:none}
 .header-actions{display:flex;justify-content:flex-start;gap:6px;overflow-x:auto;padding-bottom:2px}
 .header-actions>*{flex:0 0 auto}.header-actions button,.header-actions .home-link{min-height:40px;padding:8px 11px}
 #currentUser{display:none}.role-toggle span{display:none}.role-toggle{padding:7px}.role-toggle i{width:34px}
 button,input,select,textarea{font-size:16px}button{min-height:42px}input,select,textarea{min-height:44px;padding:10px 11px}
 .card,.panel{padding:13px;border-radius:11px}.panel{margin-top:12px}.cards{grid-template-columns:1fr;gap:10px}.metric{font-size:26px}
 .cash-today-breakdown{grid-template-columns:1fr}.own-organization-card>div{grid-template-columns:90px 1fr}
 .repair-tools,.stock-toolbar,.po-toolbar,.history-tools,.report-toolbar{display:grid;grid-template-columns:1fr;gap:8px;padding:10px}
 .repair-tools input,.repair-tools>select,.stock-toolbar input,.stock-toolbar select,.po-toolbar input,.history-tools input,.history-tools select,.report-toolbar input,.report-toolbar select{width:100%;max-width:none;min-width:0;margin:0}
 .repair-tools>span,.stock-toolbar>span,.po-toolbar>span,.history-tools>span,.daily-cash-note{width:auto;margin:0}
 .status-filter summary{min-height:42px}.status-filter>div{position:fixed;left:10px;right:10px;top:auto;bottom:72px;width:auto;max-height:65vh;overflow:auto;z-index:120}
 .repair-table,.cash-table,.stock-table,.po-table,.admin-table,.human-history,.daily-cash-table,.health-log-table,.eashana-table,.document-items-wrap,.monthly-expenses{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
 .repair-table table{min-width:1050px}.stock-table table{min-width:760px}.po-table table{min-width:1050px}.human-history table{min-width:1000px}.daily-cash-table table{min-width:1180px}.health-log-table table{min-width:950px}.eashana-table table{min-width:900px}
 .cash-table{max-height:calc(100dvh - 245px)}.cash-table table{width:auto!important;min-width:970px!important;table-layout:auto!important}.cash-table th:nth-child(3),.cash-table .cash-product-cell{min-width:260px!important}.cash-table th:nth-child(7){min-width:145px}.cash-table th:nth-child(8){min-width:105px}.cash-table th:nth-child(9),.cash-table th:nth-child(10){min-width:100px}
 .cash-footer{position:sticky;left:0;display:grid;gap:7px;padding:8px}.cash-footer .repair-pager{display:grid;grid-template-columns:1fr;gap:7px;padding:4px}.cash-footer .repair-pager button{width:100%}.cash-actions{display:flex;width:100%;margin:0;overflow-x:auto}.cash-actions button{flex:0 0 auto}
 .repair-pager{flex-wrap:wrap;gap:7px;padding:9px}.repair-pager button{flex:1;min-width:120px}.repair-page-jump{width:100%;justify-content:center}
 dialog,.cash-dialog,.repair-modal{inset:0;width:calc(100vw - 12px)!important;max-width:none!important;max-height:calc(100dvh - 12px);margin:auto;padding:14px;border-radius:12px;overflow:auto}
 dialog form,.cash-dialog form,.repair-modal form{min-width:0}.cash-dialog-body{max-height:calc(100dvh - 125px)}
 #fields,.repair-card,.service-details-grid,.bank-account,.po-card>section,.po-view>section{grid-template-columns:1fr!important}.repair-card>section,.repair-card .service-details{grid-column:1/-1}.repair-card section{grid-template-columns:1fr}.repair-card section>*{grid-column:1!important}.repair-modal form>footer,form footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;bottom:-14px}.repair-modal form>footer button{flex:1 1 145px}
 .client-picker{align-items:end}.client-menu{position:fixed;left:10px;right:10px;top:15vh;max-height:60vh}.client-menu button{min-height:48px}
 .stock-layout,.report-layout,.report-split{grid-template-columns:1fr}.stock-groups,.report-group-panel{position:static;max-height:320px}.group-editor,.bank-editor,.organization-import,.eashana-upload,.personnel-upload{grid-template-columns:1fr!important}
 .po-summary,.report-cards,.eashana-summary{grid-template-columns:1fr 1fr}.po-item{grid-template-columns:1fr}.po-item>*{grid-column:1}.po-remove{width:100%}
 .document-list>div,.cash-manage-list>div,.monthly-expenses-head{align-items:stretch;flex-direction:column}.document-buttons{display:flex!important;flex-wrap:wrap}.document-buttons button{flex:1}
 .monthly-expenses table{min-width:620px}.monthly-expenses-head button{width:100%}
 .history-tabs,.admin-nav{width:100%;overflow-x:auto}.history-tabs button,.admin-nav button{flex:0 0 auto}
 .payment-dates{grid-template-columns:1fr}.cash-day-dialog .report-cards{grid-template-columns:1fr 1fr}.cash-day-details table{min-width:850px}
 .eashana-intro{padding:13px}.eashana-actions{bottom:65px}.health-summary>div{min-width:140px}
 .stock-picker-dialog,.cash-items-dialog{height:calc(100dvh - 12px)}.stock-picker-layout{grid-template-rows:minmax(120px,180px) minmax(0,1fr)}.cash-items-panel{width:900px;min-width:900px}
 #login{padding:12px}#loginForm{padding:24px 18px;border-radius:14px}
}
.unknown-cost-warning{cursor:pointer;user-select:none}.unknown-cost-warning:hover{filter:brightness(.97)}.unknown-cost-list{display:grid;gap:12px;max-height:62vh;overflow:auto}.unknown-cost-list section{border:1px solid var(--border,#ddd);border-radius:10px;padding:12px}.unknown-cost-list h4{margin:0 0 3px}.unknown-cost-list section>small{display:block;margin-bottom:10px}.unknown-cost-item{display:grid;grid-template-columns:minmax(180px,1fr) repeat(3,minmax(125px,160px));gap:9px;align-items:end;padding:9px 0;border-top:1px solid var(--border,#ddd)}.unknown-cost-item label{display:grid;gap:4px;font-size:11px}.unknown-cost-item input{width:100%}.payment-fee-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;align-items:end}.payment-fee-settings label{display:grid;gap:5px}.payment-fee-settings label span{display:flex;align-items:center;gap:6px}.payment-fee-settings input{width:100%}@media(max-width:760px){.unknown-cost-item{grid-template-columns:1fr 1fr}.unknown-cost-item>b{grid-column:1/-1}}
@media(max-width:420px){
 main{padding-left:7px;padding-right:7px}.po-summary,.report-cards,.eashana-summary,.cash-day-dialog .report-cards{grid-template-columns:1fr}.cash-today-profit{align-items:flex-start;flex-direction:column}.header-actions{margin-left:-2px}.role-toggle{display:none}.monthly-expenses{padding:10px}
}
.cash-product-with-add{grid-template-columns:minmax(0,1fr) 24px 24px;align-items:center}.cash-table .cash-product-with-add .cash-product-edit,.cash-table .cash-product-with-add .cash-product-add{width:24px;height:24px;min-height:0;padding:0;border-radius:5px;font-size:15px;line-height:1;opacity:0;pointer-events:none;transform:scale(.88);transition:opacity .12s,transform .12s}.cash-product-cell:hover .cash-product-with-add .cash-product-edit,.cash-product-cell:hover .cash-product-with-add .cash-product-add,.cash-product-cell:focus-within .cash-product-with-add .cash-product-edit,.cash-product-cell:focus-within .cash-product-with-add .cash-product-add{opacity:1;pointer-events:auto;transform:scale(1)}.cash-product-add-menu{display:block;max-height:none;padding:7px}.cash-product-add-search{width:100%;height:36px;margin:0 0 6px;padding:6px 9px;border:1px solid #176bdf;background:#fff}.cash-product-add-results{display:grid;max-height:300px;overflow:auto}.cash-product-add-results button{align-items:center}.cash-product-add-results button>span{display:grid;min-width:0}.cash-product-add-results button>span b,.cash-product-add-results button>span small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cash-product-add-results p{margin:8px;color:#667085;text-align:center}@media(max-width:700px){.cash-table .cash-product-with-add .cash-product-edit,.cash-table .cash-product-with-add .cash-product-add{opacity:1;pointer-events:auto;transform:none}}
.cash-product-blue{min-height:44px;padding:5px 7px;background:#edf3ff;border:1px solid #9bb9e8;border-radius:8px;color:#2459a9}.cash-product-blue:hover{background:#dbe9ff}.cash-product-multi{display:grid;gap:2px;min-width:0;text-align:left}.cash-product-multi b{color:#2459a9;white-space:nowrap}.cash-product-multi small{display:block;overflow:visible;color:#526176;text-overflow:clip;white-space:normal}.cash-product-blue .cash-product-edit,.cash-product-blue .cash-product-add{align-self:center}

/* Cash readability preview: use the same readable type scale as Stock without
   widening columns or adding vertical space to multi-item payments. */
@media(max-width:1700px){
 .cash-table table{font-size:13px}
 .cash-table .cash-client,.cash-table select{font-size:13px}
}
.cash-product-blue{min-height:34px;padding:4px 7px}
.cash-product-multi{gap:0;line-height:1.2}
.cash-product-multi b,.cash-product-multi small{font-size:13px;line-height:1.2}
@media(max-width:700px){
 .cash-table table,.cash-table .cash-client,.cash-table select{font-size:13px}
}

/* One visual comment column backed by the legacy extra_1 + extra_2 fields. */
.client-mark{display:inline-grid;place-items:center;width:25px;height:25px;margin-right:6px;vertical-align:middle;color:#98a2b3}.client-mark svg{display:block;width:22px;height:22px;fill:currentColor}.client-mark-regular{color:#7c3aed}
.regular-client-toggle{display:flex!important;align-items:center;gap:10px;padding:10px 12px;border:1px solid #c4b5fd;border-radius:9px;background:#f5f3ff}.regular-client-toggle[hidden]{display:none!important}.regular-client-toggle input{width:20px!important;min-height:20px}.regular-client-toggle span{display:grid;gap:2px}.regular-client-toggle b{color:#6d28d9}.regular-client-toggle small{color:#667085}.repair-regular-toggle{margin-top:1px}
.repair-media-section{grid-column:1/-1;padding:12px;border:1px solid #d9e1ec;border-radius:10px;background:#f8fafc}.repair-media-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.repair-media-head>span{display:grid;gap:2px}.repair-media-head small,.repair-media-list small{color:#667085}.repair-media-add{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border-radius:8px;background:#176bdf;color:#fff;font-weight:700;cursor:pointer}.repair-media-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:10px}.repair-media-list>p{grid-column:1/-1;margin:3px 0;color:#667085}.repair-media-list article{position:relative;min-width:0;padding:7px;border:1px solid #d7dee8;border-radius:9px;background:#fff}.repair-media-list img,.repair-media-list video{display:block;width:100%;height:105px;object-fit:cover;border-radius:6px;background:#111}.repair-media-list article>div{display:grid;gap:2px;margin-top:6px}.repair-media-list article>div span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.repair-media-delete{position:absolute;top:3px;right:3px;width:27px;height:27px;min-height:0;padding:0;border-radius:50%;background:#b42318;color:#fff}.repair-media-pending{margin-top:8px;color:#365b91;font-size:12px;overflow-wrap:anywhere}
.cash-table .cash-comment-cell{position:relative;min-width:150px;width:180px;max-width:220px;overflow:visible}
.cash-linked .cash-comment-cell{cursor:text}
.cash-comment-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cash-comment-tooltip{position:fixed;z-index:1000;display:none;width:max-content;min-width:180px;max-width:min(420px,calc(100vw - 16px));padding:9px 11px;border:1px solid #b8cbea;border-radius:9px;background:#17233b;color:#fff;box-shadow:0 10px 28px #17203355;font-size:13px;font-weight:400;line-height:1.4;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.cash-comment-tooltip.visible{display:block}
.organization-table tr.buyer-with-aliases td:first-child{border-left:4px solid #2563eb;background:#eff6ff}.buyer-primary-row{display:flex;align-items:center;gap:7px}.buyer-primary-icon{color:#2563eb;font-size:13px}.buyer-primary-row b{color:#173b66}.buyer-alias-count{padding:2px 7px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:11px;font-weight:700}.buyer-alias-list{display:flex;flex-wrap:wrap;gap:5px;margin:5px 0 0 20px}.buyer-alias-list span{padding:2px 7px;border-radius:999px;background:#eef2f6;color:#64748b;font-size:12px}.buyer-private{font-weight:600;color:#475569}
@media(max-width:1700px){
 .cash-table th:nth-child(5),.cash-table td:nth-child(5),.cash-table th:nth-child(6),.cash-table td:nth-child(6){display:table-cell!important}
 .cash-table th:nth-child(5){width:145px}.cash-table th:nth-child(6){width:145px}.cash-table th:nth-child(7){width:105px}.cash-table th:nth-child(8){width:100px}.cash-table th:nth-child(9){width:95px}
 .cash-table .cash-comment-cell{min-width:0;max-width:none;width:145px}
}
.writeoff-search-results{display:grid;gap:7px;max-height:220px;overflow:auto;margin:8px 0;padding:3px}.writeoff-sale-result{display:flex!important;width:100%;align-items:flex-start;justify-content:flex-start;gap:9px;padding:10px;text-align:left;border:1px solid var(--line,#d8dee9);border-radius:8px;background:transparent;color:inherit}.writeoff-sale-result:hover,.writeoff-sale-result.selected{border-color:#2777d4;background:rgba(39,119,212,.1)}.writeoff-sale-result span{display:grid;gap:3px}.writeoff-sale-result small,.stock-move-table td small,.writeoff-product-card small{display:block;color:var(--muted,#6b7280);margin-top:3px}.writeoff-source-title{font-weight:700;margin:2px 0 7px}.writeoff-replacement{display:grid!important;gap:7px}.writeoff-product-card{padding:10px 12px;border:1px solid #2777d4;border-radius:8px;background:rgba(39,119,212,.08)}.writeoff-checkbox{display:flex!important;align-items:flex-start!important;gap:10px;padding:10px 12px;border:1px solid var(--line,#d8dee9);border-radius:8px}.writeoff-checkbox input{flex:0 0 auto;width:18px!important;height:18px;margin:2px 0 0}.writeoff-checkbox span{display:grid;gap:3px;line-height:1.25}.writeoff-checkbox small{color:var(--muted,#6b7280)}.writeoff-cancelled{opacity:.58;text-decoration:line-through}.stock-move-table{overflow:auto}.stock-move-table table{min-width:900px}
.cash-table tbody tr.cash-warranty-row{cursor:default;background:#e7e9ed;color:#596273}.cash-table tbody tr.cash-warranty-row:hover{filter:none}.cash-warranty-row td{border-color:#cfd4dc}.cash-warranty-row td:first-child{border-left:4px solid #7b8496}.cash-warranty-row small{display:block;margin-top:3px;color:#737c8b}.cash-warranty-label{font-weight:800;color:#4e596a;white-space:nowrap}.cash-warranty-status{display:inline-block;padding:4px 8px;border-radius:12px;background:#d4d8df;color:#455064;font-weight:700}.cash-warranty-cancelled{opacity:.6;text-decoration:line-through}
.cash-warranty-link{display:grid;width:100%;gap:3px;padding:7px 9px;border:1px solid #aeb8c7;border-radius:7px;background:#f4f5f7;color:#35445b;text-align:left}.cash-warranty-link:hover{border-color:#6c87ad;background:#e5ebf3;color:#174f9b}.cash-warranty-link b{font-size:13px}.cash-warranty-link small{font-size:11px}
.cash-warranty-cancel{padding:6px 8px;border:1px solid #b86a6a;border-radius:7px;background:#fff1f1;color:#9b2525;font-size:11px;font-weight:700;white-space:nowrap}.cash-warranty-cancel:hover{background:#ffdede;border-color:#9b2525}
.warranty-surcharge{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:12px;border:1px solid #d9a441;border-radius:8px;background:#fff8e8}.warranty-surcharge[hidden]{display:none!important}.warranty-surcharge>b,.warranty-surcharge>small{grid-column:1/-1}.warranty-surcharge>small{color:var(--muted,#6b7280)}@media(max-width:700px){.warranty-surcharge{grid-template-columns:1fr}}
.monthly-expense-automatic{background:#f3f5f8;color:#485468}.monthly-expense-automatic td:first-child{border-left:4px solid #7b8496}.monthly-expense-automatic td:last-child span{display:inline-block;padding:4px 7px;border-radius:10px;background:#e1e5eb;color:#596273;font-size:11px;font-weight:700}
.stock-move-table tr.stock-move-linked{cursor:pointer}.stock-move-table tr.stock-move-linked:hover{filter:brightness(.97)}.stock-move-table tr.stock-move-past-edited,.stock-move-table tr.stock-move-past-edited:hover{background:#f8dddd}.stock-move-edited-note{color:#9b3b3b!important;font-weight:700}.stock-move-table tr.stock-move-order-linked-edit,.stock-move-table tr.stock-move-order-linked-edit:hover{background:#fbe7c6}.stock-move-order-linked-note{color:#a35b12!important}
.stock-move-table tr.stock-move-debt-repayment,.stock-move-table tr.stock-move-debt-repayment:hover{background:#def3df}.cash-history-timeline article.cash-history-caused-red>i{border-color:#b54747;background:#fff4f4}.cash-history-timeline article.cash-history-caused-red>div{border-color:#d99a9a;background:#f8dddd}.cash-history-timeline article.cash-history-caused-red:not(:last-child):before{background:#e0aaaa}
.cash-history-timeline article.cash-history-repayment>i{border-color:#3d8b4d;background:#f4fff5}.cash-history-timeline article.cash-history-repayment>div{border-color:#9bc8a3;background:#def3df}.cash-history-timeline article.cash-history-repayment:not(:last-child):before{background:#abd3b1}
.po-product-picker{position:relative}.po-product-picker>input[type=text],.po-product-picker>input:not([type]){width:100%}.po-product-suggestions{position:absolute;z-index:260;top:100%;left:0;width:max(420px,100%);max-height:300px;overflow:auto;padding:5px;background:#fff;border:1px solid #bfc8d5;border-radius:8px;box-shadow:0 14px 32px #17203335}.po-product-suggestions button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:8px;background:#fff;color:#26364d;text-align:left}.po-product-suggestions button:hover{background:#eaf2ff}.po-product-suggestions span{display:grid;gap:2px}.po-product-suggestions small{color:#667085}.po-product-suggestions strong{white-space:nowrap}.po-product-empty{display:block;padding:8px;color:#667085}.stock-receipt-button{white-space:nowrap;background:#16803c}.direct-receipt-dialog{width:min(1000px,96vw)}.receipt-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:10px 12px;padding:12px;margin-bottom:14px;background:#f7f9fc;border:1px solid #dfe4eb;border-radius:9px}.receipt-meta .wide{grid-column:1/-1}.receipt-item{display:grid;grid-template-columns:minmax(320px,1fr) 120px 160px 38px;gap:10px;align-items:end;padding:10px;margin-top:7px;background:#fff;border:1px solid #dfe4eb;border-radius:8px}.receipt-item label{margin:0}.receipt-item input{margin-top:3px}@media(max-width:700px){.po-product-suggestions{width:min(90vw,420px)}.receipt-meta,.receipt-item{grid-template-columns:1fr}.receipt-meta .wide{grid-column:auto}.receipt-item .po-remove{width:100%}}
.po-product-with-button{display:grid;grid-template-columns:minmax(0,1fr) 42px}.po-product-with-button .warehouse-picker-button{margin:3px 0 0 5px;padding:0;font-size:24px;line-height:38px}.po-product-with-button .po-product-suggestions{grid-column:1/-1}.warehouse-picker-tools{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:10px}.warehouse-picker-list{max-height:55vh;overflow:auto;border:1px solid #dfe4eb;border-radius:8px}.warehouse-picker-row{display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #edf0f4;cursor:pointer}.warehouse-picker-row:hover{background:#f3f7ff}.warehouse-picker-row input{width:auto;margin:0}.warehouse-picker-row span{display:grid}.warehouse-picker-row small{color:#667085}
.direct-receipt-dialog{width:min(1160px,98vw);max-width:98vw;max-height:94vh}.direct-receipt-dialog .cash-dialog-body{max-height:78vh}.direct-receipt-dialog .po-product-suggestions{top:auto;bottom:calc(100% + 4px);max-height:280px;box-shadow:0 -14px 32px #17203335}
