*{box-sizing:border-box}body{margin:0;background:#f4f6f8;color:#151515;font-family:Arial,Helvetica,sans-serif;font-size:18px}.app{min-height:100vh;padding-bottom:82px}.top{position:sticky;top:0;z-index:5;background:#262a2e;color:white;height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;box-shadow:0 2px 8px #0002}.top small{color:#cfd6dd}.linkbtn{border:0;background:transparent;color:#2b7a3d;font-size:16px;cursor:pointer}.top .linkbtn{color:white}.toast{margin:12px;background:#dbffe3;border:1px solid #9bd9a7;border-radius:12px;padding:12px}.login{padding:18px}.login h1{font-size:34px;margin:10px 0}.rolegrid{display:grid;gap:12px}.rolegrid button,.primary,.danger{border:0;border-radius:14px;font-size:20px;padding:15px 18px;font-weight:700;cursor:pointer}.rolegrid button{background:white;box-shadow:0 2px 10px #0001}.primary{background:#24a148;color:white;width:100%;margin-top:12px}.danger{background:#ffe4e4;color:#b00020;width:100%;margin-top:10px}.sheet,.total,.admin{padding:10px}.sheetHead{position:sticky;top:58px;z-index:4;display:grid;grid-template-columns:78px 1fr minmax(150px,35%);align-items:center;min-height:54px;border:1px solid #bfc5cc;font-weight:700}.sheetHead>div{padding:10px;border-right:1px solid #bfc5cc}.category{background:#ffe17a;border:1px solid #d5bd55;padding:14px 86px;font-size:22px;font-weight:700}.row{display:grid;grid-template-columns:78px 1fr minmax(150px,35%);align-items:center;min-height:62px;background:white;border-left:1px solid #d7d7d7;border-right:1px solid #d7d7d7;border-bottom:1px solid #d7d7d7}.row:hover,.card:hover{background:#f7fff8}.name{font-size:21px;padding:10px;overflow:hidden;text-overflow:ellipsis}.clickableName{cursor:pointer;user-select:none}.comment{width:100%;height:46px;border:1px solid #d8d8d8;border-radius:8px;padding:8px;font-size:18px;background:#fff}.bigcheck{display:flex;align-items:center;justify-content:center;height:100%;min-height:62px}.bigcheck input{display:none}.bigcheck span{width:46px;height:46px;border:5px solid #7a7a7a;border-radius:8px;background:white;display:block;position:relative}.bigcheck input:checked+span{background:#777;border-color:#777}.bigcheck input:checked+span:after{content:'✓';position:absolute;left:6px;top:-9px;color:white;font-size:50px;font-weight:900}.buy span{border-color:#2b7a3d}.buy input:checked+span{background:#2b7a3d;border-color:#2b7a3d}.actions{padding:8px 0}.bottom{position:fixed;bottom:0;left:0;right:0;height:70px;background:#22272b;border-top:1px solid #454b50;display:flex;z-index:10}.bottom a{flex:1;color:#9fe0ae;text-decoration:none;display:flex;align-items:center;justify-content:center;font-size:16px;border-right:1px solid #3b4147}.total h1,.admin h1{font-size:28px;margin:10px 4px}.card{display:flex;gap:10px;background:white;margin:10px 0;padding:10px;border-radius:14px;box-shadow:0 2px 10px #0001;border:1px solid #ddd;cursor:pointer}.card.done{opacity:.62}.cardbody{flex:1}.card h2,.cardTitle{display:block;font-size:23px;font-weight:700;margin:4px 0}.meta{font-size:14px;color:#777}.card ul{margin:8px 0;padding-left:18px}.wide{margin-top:6px}.empty{background:white;border-radius:12px;padding:20px}.panel{background:white;border-radius:14px;padding:14px;box-shadow:0 2px 10px #0001;margin-bottom:12px}.panel input,.panel select,.adminEditRow input,.adminEditRow select{width:100%;min-height:54px;border:1px solid #d5dbe1;border-radius:12px;margin:7px 0;padding:10px 12px;font-size:18px;background:white;color:#151515;appearance:auto}.panel select,.adminEditRow select{height:54px}.checks label{display:block;margin:10px 0}.checks input{width:24px;height:24px}.admin h2{margin:20px 4px 10px}.admin h3{margin:18px 4px 8px}.adminrow{background:white;margin:8px 0;padding:12px;border-radius:12px;display:flex;justify-content:space-between;gap:10px}.adminrow small{display:block;color:#666;margin-top:4px}.adminActions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.dangerText{color:#b00020}.muted{color:#666;background:white;border-radius:12px;padding:10px}.mutedInline{color:#777}.adminrow form{margin:0}.adminEditRow{background:#fff;border:1px solid #dde2e7;border-radius:14px;padding:12px;margin:12px 0;box-shadow:0 2px 8px #0001}.editTitle{margin-bottom:8px}.editTitle b{display:block;font-size:20px}.editTitle small{display:block;color:#666;margin-top:4px}.smallCheck{display:flex;align-items:center;gap:10px;margin:8px 0;font-size:17px}.smallCheck input{width:26px;height:26px;margin:0}.smallPrimary{font-size:18px;padding:12px;margin-top:4px}.fullWidth{width:100%}.compactDanger{margin-top:-6px;background:#fff7f7}@media(max-width:640px){body{font-size:17px}.sheet{padding:0}.sheetHead{grid-template-columns:72px 1fr}.sheetHead .colComment{display:none}.row{grid-template-columns:72px 1fr;cursor:pointer}.row .comment{grid-column:2;max-width:100%;margin:0 10px 10px;width:calc(100% - 20px)}.category{padding-left:82px}.name{font-size:20px}.bigcheck span{width:50px;height:50px}.bottom a{font-size:15px}.card{border-radius:16px}.buy{align-items:flex-start;padding-top:4px}.buy span{width:52px;height:52px}.panel input,.panel select,.adminEditRow input,.adminEditRow select{font-size:18px;min-height:56px}.adminEditRow{padding:10px}.adminActions{align-items:stretch}.adminActions form,.adminActions button{width:100%}}@media(min-width:900px){main{max-width:1100px;margin:0 auto}.bottom{left:50%;transform:translateX(-50%);max-width:1100px;border-radius:16px 16px 0 0}.row,.sheetHead{grid-template-columns:90px 1fr 320px}.bigcheck span{width:42px;height:42px}.adminEditRow{display:grid;grid-template-columns:1.2fr 1fr 180px 190px 260px 110px;gap:8px;align-items:center}.adminEditRow .editTitle,.adminEditRow .smallCheck,.adminEditRow .fullWidth{grid-column:1/-1}.adminEditRow input,.adminEditRow select{margin:0}}

/* Update: autosave, admin tabs, drag/drop, better mobile controls */
.stickyActions{position:sticky;top:58px;z-index:6;background:#f4f6f8;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid #dfe4ea}.stickyActions h1{margin:0}.autoStatus{font-size:14px;color:#666;background:#fff;border:1px solid #dce3e8;border-radius:999px;padding:7px 10px;white-space:nowrap}.autoStatus.ok{color:#1f7a35}.autoStatus.bad{color:#b00020}.iconDanger{border:0;background:#ffe4e4;color:#b00020;border-radius:12px;min-width:48px;height:44px;font-size:24px;cursor:pointer}.boughtInDepartment{background:#e5f4df!important}.boughtInDepartment .name{text-decoration:line-through;color:#51724f}.boughtInDepartment .comment{background:#eef8ea}.row.productRow,.card.productRow{cursor:pointer}.row.productRow:active,.card.productRow:active{transform:scale(.997)}.adminTabs{display:flex;gap:8px;margin:10px 0 16px}.adminTabs a{display:flex;align-items:center;justify-content:center;flex:1;min-height:48px;border-radius:12px;background:white;color:#2b7a3d;text-decoration:none;font-weight:700;border:1px solid #dbe2e8}.adminTabs a.active{background:#24a148;color:white;border-color:#24a148}.sortableList{display:grid;gap:8px;margin-bottom:18px}.sortItem{background:white;border:1px solid #dfe4ea;border-radius:14px;padding:10px;display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:start;box-shadow:0 2px 8px #0000000d}.sortItem.dragging{opacity:.55;border:2px dashed #24a148}.dragHandle{width:42px;min-height:42px;border-radius:10px;background:#eef2f5;color:#66717c;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:900;cursor:grab;user-select:none}.sectionEditForm{display:grid;grid-template-columns:1fr 130px 150px;gap:8px;align-items:center}.sectionEditForm input{width:100%;min-height:50px;border:1px solid #d5dbe1;border-radius:12px;padding:10px 12px;font-size:18px}.productEditItem{grid-template-columns:42px 1fr}.productEditItem .adminActions{grid-column:2}.productDangerActions{justify-content:flex-end}.productNameInput,.adminEditRow .productNameInput{min-height:74px!important;font-size:19px!important;line-height:1.25}.adminEditRow{box-shadow:none;margin:0;border:0;padding:0}.adminEditRow textarea,.adminEditRow input.productNameInput{overflow:visible}.smallEmpty{font-size:15px;padding:10px;color:#777}.panel select,.adminEditRow select{font-size:18px!important;min-height:56px!important;padding:10px 12px!important;border-radius:12px!important;border:1px solid #d5dbe1!important;background:#fff!important;color:#151515!important}.panel input,.adminEditRow input{font-size:18px!important}.card.done{background:#e5f4df;opacity:1}.card.done .cardTitle{text-decoration:line-through;color:#51724f}
@media(max-width:640px){.stickyActions{top:58px;padding:8px}.autoStatus{font-size:13px}.sheetHead{top:112px}.sectionEditForm{grid-template-columns:1fr}.sortItem{grid-template-columns:44px 1fr}.sortItem>form:not(.sectionEditForm){grid-column:2}.productEditItem .adminActions{grid-column:1/-1}.productDangerActions form,.productDangerActions button{width:100%}.adminTabs{position:sticky;top:58px;z-index:7;background:#f4f6f8;padding:8px 0}.productNameInput,.adminEditRow .productNameInput{min-height:88px!important}.adminEditRow{display:grid;grid-template-columns:1fr;gap:8px}.adminEditRow input,.adminEditRow select,.adminEditRow button{width:100%}.dragHandle{position:sticky;top:120px}}
@media(min-width:900px){.sectionEditForm{grid-template-columns:1fr 120px 140px}.productEditItem{grid-template-columns:42px 1fr}.productEditItem .adminEditRow{display:grid;grid-template-columns:1.4fr 120px 160px 260px 90px 120px;gap:8px;align-items:center}.productEditItem .adminEditRow .editTitle{grid-column:1/-1}.productEditItem .adminEditRow input,.productEditItem .adminEditRow select{margin:0}.productEditItem .adminEditRow .smallCheck{grid-column:auto;margin:0}.productEditItem .adminActions{grid-column:2}}

/* Update: compact admin, departments CRUD, less noise */
.sheetHead>div:first-child{font-size:0}.autoStatus{display:none}.total .stickyActions{justify-content:space-between}.total .stickyActions form{margin:0}.adminTabs{grid-template-columns:repeat(3,1fr)}
.colorLabel{display:block;margin:10px 0 4px;color:#555;font-size:16px}.colorInput{height:54px!important;padding:6px!important}.colorDot{width:22px;height:22px;border-radius:50%;border:1px solid #cfd6dd;display:inline-block;vertical-align:middle;margin-right:8px}.compactList{display:grid;gap:8px}.adminDetails,.productCompactItem{background:#fff;border:1px solid #dfe4ea;border-radius:14px;box-shadow:0 2px 8px #0000000d;overflow:hidden}.adminDetails summary,.productCompactItem summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:14px;font-size:19px}.adminDetails summary::-webkit-details-marker,.productCompactItem summary::-webkit-details-marker{display:none}.adminDetails summary:after,.productCompactItem summary:after{content:'▾';margin-left:auto;color:#66717c}.adminDetails[open] summary:after,.productCompactItem[open] summary:after{transform:rotate(180deg)}.adminDetails small{color:#777}.detailsBody{padding:0 14px 14px}.detailsDanger{padding:0 14px 14px}.detailsBody input,.detailsBody select,.detailsBody textarea{width:100%;min-height:54px;border:1px solid #d5dbe1;border-radius:12px;margin:7px 0;padding:10px 12px;font-size:18px;background:white;color:#151515}.sectionEditForm{grid-template-columns:1fr 150px!important}.productCompactItem.sortItem{display:block;padding:0}.productCompactItem .dragHandle{flex:0 0 42px}.compactProductName{font-size:19px;font-weight:700;line-height:1.25;overflow:hidden;text-overflow:ellipsis}.mutedProduct{color:#888;text-decoration:line-through}.productCompactItem .adminEditRow{padding:0 14px 14px!important;display:grid!important;grid-template-columns:1fr!important;gap:6px!important}.productCompactItem .productDangerActions{padding:0 14px 14px;justify-content:flex-start}.productNameInput,.adminEditRow .productNameInput,textarea.productNameInput{width:100%;min-height:96px!important;font-size:18px!important;line-height:1.35;resize:vertical;white-space:normal}.panel textarea.productNameInput{margin:7px 0;border:1px solid #d5dbe1;border-radius:12px;padding:10px 12px;background:#fff;color:#151515}.adminProductsHint{display:none}.sectionEditForm input{margin:0}.sectionEditForm .smallPrimary{margin:0}.stickyActions .iconDanger{margin-left:auto}
@media(max-width:640px){.adminTabs a{font-size:15px}.adminDetails summary,.productCompactItem summary{font-size:18px;padding:13px}.compactProductName{font-size:18px}.productNameInput,.adminEditRow .productNameInput,textarea.productNameInput{min-height:120px!important}.sectionEditForm{grid-template-columns:1fr!important}.bottom{overflow-x:auto}.bottom a{min-width:105px;white-space:nowrap}.total .stickyActions{top:58px}.sheetHead{top:112px}}
@media(min-width:900px){.adminTabs{max-width:760px}.compactList{max-width:900px}.productCompactItem .adminEditRow{grid-template-columns:1.4fr 140px 170px 260px 180px 130px!important;align-items:center}.productCompactItem .adminEditRow textarea.productNameInput{min-height:74px!important}.productCompactItem .productDangerActions{grid-column:1/-1}.detailsBody{max-width:900px}.adminDetails .detailsBody{display:grid;grid-template-columns:1fr 160px 130px;gap:8px;align-items:center}.adminDetails .detailsBody input{margin:0}.adminDetails .colorLabel{display:none}.adminDetails .detailsBody .primary{margin:0}.adminDetails .colorInput{height:54px!important}.sectionEditForm{grid-template-columns:1fr 150px!important}}

/* Fix product edit card layout and add multi-select sorting */
.productCompactItem summary{
    display:grid!important;
    grid-template-columns:52px 44px 1fr 28px!important;
    align-items:center!important;
    gap:10px!important;
}
.productCompactItem summary:after{grid-column:4!important;align-self:center!important;justify-self:end!important;margin-left:0!important;}
.multiSelectWrap{display:flex;align-items:center;justify-content:center;width:40px;height:40px;cursor:pointer;}
.multiSelectProduct{width:28px!important;height:28px!important;accent-color:#1677ff;cursor:pointer;}
.selectedForMove summary{background:#eef7ff!important;}
.sortItem.dragging{opacity:.55;}
.productCompactItem[open]{padding-bottom:12px;}
.productCompactItem .detailsBody,
.productCompactItem .adminEditRow.detailsBody{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    max-width:100%!important;
    padding:12px 16px!important;
    margin:0!important;
    border:0!important;
    box-shadow:none!important;
    background:#fff!important;
}
.productCompactItem .detailsBody textarea.productNameInput,
.productCompactItem .adminEditRow.detailsBody textarea.productNameInput{
    width:100%!important;
    min-height:96px!important;
    height:auto!important;
    resize:vertical!important;
    overflow:auto!important;
    white-space:normal!important;
    line-height:1.35!important;
    font-size:18px!important;
}
.productCompactItem .detailsBody input,
.productCompactItem .detailsBody select,
.productCompactItem .detailsBody button,
.productCompactItem .detailsBody label{
    width:100%!important;
    max-width:100%!important;
    min-height:54px!important;
    margin:0!important;
}
.productCompactItem .detailsBody .smallCheck{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:12px!important;
    min-height:54px!important;
}
.productCompactItem .detailsBody .smallCheck input{width:34px!important;height:34px!important;min-height:34px!important;}
.productCompactItem .productDangerActions.detailsDanger{
    padding:0 16px 8px!important;
    display:flex!important;
    gap:16px!important;
    flex-wrap:wrap!important;
}
@media (min-width: 900px){
    .productCompactItem .detailsBody,
    .productCompactItem .adminEditRow.detailsBody{
        grid-template-columns:minmax(320px,1.5fr) 160px 210px 300px 210px!important;
        align-items:start!important;
    }
    .productCompactItem .detailsBody .smallPrimary{grid-column:1 / span 1!important;}
}
@media (max-width: 700px){
    .productCompactItem summary{grid-template-columns:46px 40px 1fr 24px!important;}
    .multiSelectProduct{width:26px!important;height:26px!important;}
}

/* Update: search, users, compact header clear button */
.badToast{background:#ffe8e8;border-color:#ffb7b7;color:#9b001b}.loginForm input{width:100%;min-height:56px;border:1px solid #d5dbe1;border-radius:12px;margin:8px 0;padding:10px 12px;font-size:20px}.loginHelp{margin-top:14px;background:#fff;border-radius:14px;padding:14px;color:#555;line-height:1.45}.departmentSearchWrap{position:sticky;top:58px;z-index:6;background:#f4f6f8;padding:8px 10px;border-bottom:1px solid #dfe4ea}.departmentSearch{width:100%;height:48px;border:1px solid #d5dbe1;border-radius:14px;padding:0 14px;font-size:19px;background:#fff}.sheetHead{top:123px}.headClearCell{display:flex!important;align-items:center;justify-content:center;padding:6px!important}.headClearCell form{margin:0}.sheetHead>div:first-child{font-size:18px!important}.adminTabs{grid-template-columns:repeat(4,1fr)!important}.departmentAccessBox{background:#f7f9fb;border:1px solid #dde4ea;border-radius:14px;padding:12px;margin:8px 0}.deptCheck{display:flex;align-items:center;gap:10px;margin:10px 0;font-size:18px}.deptCheck input{width:28px;height:28px;accent-color:#24a148}.userEditBody{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.userEditBody input,.userEditBody select{width:100%!important;min-height:54px!important;border:1px solid #d5dbe1!important;border-radius:12px!important;margin:0!important;padding:10px 12px!important;font-size:18px!important}.userDetails summary{display:grid!important;grid-template-columns:1fr auto 24px!important}.userDetails summary:after{grid-column:3!important}.roleSelect{background:#fff!important}.category[style*="display: none"]{display:none!important}@media(max-width:640px){.departmentSearchWrap{top:58px}.sheetHead{top:115px}.adminTabs{overflow-x:auto;display:flex!important}.adminTabs a{min-width:115px}.userDetails summary{grid-template-columns:1fr 24px!important}.userDetails summary small{grid-column:1}.departmentAccessBox{padding:10px}.headClearCell .iconDanger{width:50px;height:48px}}@media(min-width:900px){.userEditBody{grid-template-columns:1fr 180px 220px 180px 160px!important;align-items:start}.userEditBody .departmentAccessBox{grid-column:1/-1}.userEditBody .smallPrimary{max-width:220px}.departmentSearchWrap{top:58px}.sheetHead{top:123px}}

/* Update: PIN login, fixed user forms, compact total */
.pinLoginScreen{max-width:520px;margin:0 auto;padding-top:28px}.pinLoginScreen h1{text-align:center}.pinLoginForm{padding:18px}.pinInput{text-align:center;font-size:34px!important;letter-spacing:10px;font-weight:800;height:72px!important}.adminUsersPage .userCreatePanel{max-width:980px}.userFormGrid{display:grid;grid-template-columns:1fr;gap:10px;align-items:center}.userFormGrid input,.userFormGrid select{width:100%!important;min-height:56px!important;border:1px solid #d5dbe1!important;border-radius:12px!important;margin:0!important;padding:10px 12px!important;font-size:18px!important;background:#fff!important;color:#151515!important}.userActiveCheck{display:flex!important;align-items:center!important;gap:12px!important;min-height:56px!important;margin:0!important}.userActiveCheck input{width:34px!important;height:34px!important;accent-color:#24a148}.deptAccessGrid{display:grid;grid-template-columns:1fr;gap:4px}.usersCompactList{max-width:980px}.userDetails summary{display:grid!important;grid-template-columns:1fr auto auto 28px!important;gap:10px!important;align-items:center!important}.userDetails summary:after{grid-column:4!important;justify-self:end!important}.userEditBody.detailsBody{display:block!important;max-width:100%!important}.userEditBody .departmentAccessBox{margin-top:12px}.userEditBody .smallPrimary{max-width:240px}.compactTotalHeader{min-height:54px}.compactTotalHeader h1{font-size:24px;margin:0}.compactTotalList{display:grid;gap:6px}.totalItem{background:#fff;border:1px solid #dfe4ea;border-radius:12px;overflow:hidden;box-shadow:0 1px 5px #0000000a}.totalItem summary{list-style:none;display:grid;grid-template-columns:54px minmax(0,1fr) minmax(95px,28%) 22px;gap:8px;align-items:center;min-height:56px;padding:5px 10px;cursor:pointer}.totalItem summary::-webkit-details-marker{display:none}.totalItem summary:after{content:'▾';grid-column:4;color:#66717c;justify-self:end}.totalItem[open] summary:after{transform:rotate(180deg)}.compactBuyCheck{min-height:48px!important}.compactBuyCheck span{width:40px!important;height:40px!important;border-width:4px!important}.totalItemName{font-size:18px;font-weight:700;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.totalItemDepartments{font-size:15px;color:#555;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}.totalDetails{border-top:1px solid #e8edf2;padding:10px 12px;background:#fbfcfd}.totalDetails ul{margin:6px 0 10px;padding-left:20px;font-size:16px;line-height:1.35}.buyerMeta{font-size:15px;color:#2f6d36;margin-bottom:8px}.totalItem.done summary{background:#e5f4df}.totalItem.done .totalItemName{text-decoration:line-through;color:#51724f}.totalItem.done .compactBuyCheck span{background:#4c8b3f;border-color:#4c8b3f}.totalItem.done .compactBuyCheck span:after{content:'✓';position:absolute;left:6px;top:-10px;color:white;font-size:38px;font-weight:900}.totalDetails .buyerComment{height:42px;font-size:16px}
@media(min-width:800px){.userFormGrid{grid-template-columns:1.3fr 180px 220px 150px}.deptAccessGrid{grid-template-columns:repeat(3,1fr)}.userEditBody .userFormGrid{grid-template-columns:1.3fr 180px 220px 150px}.totalItem summary{grid-template-columns:58px minmax(0,1fr) 260px 22px}.totalItemName{font-size:19px}.totalItemDepartments{font-size:16px}}
@media(max-width:640px){.pinLoginScreen{padding:18px}.pinInput{font-size:30px!important;height:68px!important}.userDetails summary{grid-template-columns:1fr 28px!important}.userDetails summary small,.userDetails summary .dangerText{grid-column:1}.totalItem summary{grid-template-columns:50px minmax(0,1fr) 86px 18px;padding:4px 8px}.totalItemName{font-size:16px}.totalItemDepartments{font-size:13px}.compactBuyCheck span{width:38px!important;height:38px!important}.totalDetails{padding:9px}.totalDetails ul{font-size:15px}}

/* Update: department header like total, clear button near search, inline buyer comments */
.departmentPage{padding:10px;}
.departmentTop{
    position:sticky;
    top:58px;
    z-index:6;
    background:#f4f6f8;
    border-top:6px solid #d8e7ff;
    border-bottom:1px solid #dfe4ea;
    padding:8px 10px 10px;
    margin:-10px -10px 8px;
}
.departmentTop h1{font-size:24px;line-height:1.15;margin:0 0 8px;font-weight:800;}
.departmentTopControls{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:8px;align-items:center;}
.departmentTopControls .departmentSearch{height:50px;margin:0;}
.departmentTopControls form{margin:0;}
.clearInlineBtn{width:56px!important;height:50px!important;min-height:50px!important;margin:0!important;border-radius:14px!important;font-size:23px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;}
.departmentPage .category{padding:12px 86px;font-size:20px;}
.buyerCommentInline{display:block;color:#8a5a00;font-size:14px;font-weight:600;line-height:1.25;margin-top:3px;white-space:normal;overflow:hidden;text-overflow:ellipsis;}
.totalItemName{white-space:normal!important;min-width:0;}
.totalItemName .productTitleText{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.totalItemName .buyerCommentInline{font-size:13px;color:#8a5a00;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.boughtInDepartment .buyerCommentInline{color:#3f6b38;}
@media(max-width:640px){
    .departmentPage{padding:0;}
    .departmentTop{top:58px;margin:0 0 6px;padding:8px 8px 9px;border-top-width:5px;}
    .departmentTop h1{font-size:22px;margin-bottom:7px;}
    .departmentTopControls{grid-template-columns:minmax(0,1fr) 52px;gap:7px;}
    .departmentTopControls .departmentSearch{height:48px;font-size:18px;}
    .clearInlineBtn{width:52px!important;height:48px!important;min-height:48px!important;}
    .departmentPage .category{padding-left:78px;font-size:19px;}
    .departmentPage .row{grid-template-columns:72px minmax(0,1fr);}
    .buyerCommentInline{font-size:13px;}
    .totalItemName .buyerCommentInline{font-size:12px;}
}
@media(min-width:900px){
    .departmentTop{border-radius:0 0 14px 14px;margin:-10px 0 10px;}
    .departmentTopControls{grid-template-columns:minmax(0,1fr) 60px;}
    .clearInlineBtn{width:60px!important;}
}


.quantityInline{display:block;color:#2864a6;font-size:13px;font-weight:700;line-height:1.25;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.totalItemName .buyerCommentInline{display:block;}

/* Restore: floating bulk controls in admin products */
.floatingSelectionBar{
    position:fixed!important;
    right:18px!important;
    bottom:86px!important;
    z-index:50!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    background:#1f252a!important;
    color:white!important;
    border:1px solid #3b444d!important;
    border-radius:18px!important;
    box-shadow:0 10px 30px #0005!important;
    padding:10px 12px!important;
    font-weight:800!important;
    max-width:min(780px, calc(100vw - 28px))!important;
    flex-wrap:nowrap!important;
}
.floatingSelectionBar[hidden]{display:none!important;}
.floatingSelectionInfo{
    display:flex!important;
    flex-direction:column!important;
    gap:0!important;
    line-height:1.05!important;
    min-width:122px!important;
    color:#fff!important;
}
.floatingSelectionInfo strong,
.floatingSelectionBar strong{
    font-size:18px!important;
    color:#fff!important;
    white-space:nowrap!important;
}
.floatingSelectionInfo span{
    font-size:12px!important;
    color:#b9c2cc!important;
    font-weight:700!important;
}
.floatingMoveSelect,
.floatingSelectionBar select{
    appearance:none!important;
    -webkit-appearance:none!important;
    height:46px!important;
    min-height:46px!important;
    width:360px!important;
    max-width:42vw!important;
    border:1px solid #4c5661!important;
    border-radius:12px!important;
    background-color:#ffffff!important;
    color:#151515!important;
    font-size:15px!important;
    font-weight:800!important;
    padding:0 40px 0 14px!important;
    line-height:46px!important;
    outline:none!important;
    margin:0!important;
    background-image:linear-gradient(45deg, transparent 50%, #555 50%),linear-gradient(135deg, #555 50%, transparent 50%)!important;
    background-position:calc(100% - 20px) 20px, calc(100% - 14px) 20px!important;
    background-size:6px 6px, 6px 6px!important;
    background-repeat:no-repeat!important;
}
.floatingMoveSelect:focus,
.floatingSelectionBar select:focus{
    border-color:#93c5fd!important;
    box-shadow:0 0 0 3px rgba(147,197,253,.25)!important;
}
.floatingSelectionBar .compactBtn,
#clearProductSelectionFloating,
.floatingSelectionBar button{
    height:46px!important;
    min-height:46px!important;
    border-radius:12px!important;
    padding:0 18px!important;
    background:#ffffff!important;
    color:#151515!important;
    border:1px solid #d6dde4!important;
    font-size:15px!important;
    font-weight:900!important;
    white-space:nowrap!important;
    cursor:pointer!important;
    margin:0!important;
    width:auto!important;
}
.floatingSelectionBar .compactBtn:hover,
#clearProductSelectionFloating:hover,
.floatingSelectionBar button:hover{background:#f1f5f9!important;}
@media(max-width:720px){
    .floatingSelectionBar{
        left:10px!important;
        right:10px!important;
        bottom:78px!important;
        display:grid!important;
        grid-template-columns:1fr auto!important;
        gap:8px!important;
        align-items:center!important;
        border-radius:16px!important;
        padding:9px 10px!important;
        max-width:none!important;
    }
    .floatingSelectionInfo{grid-column:1 / -1!important;min-width:0!important;}
    .floatingMoveSelect,
    .floatingSelectionBar select{
        width:100%!important;
        max-width:none!important;
        min-width:0!important;
    }
    .floatingSelectionBar .compactBtn,
    #clearProductSelectionFloating,
    .floatingSelectionBar button{padding:0 12px!important;}
}

/* Fix: keep search clear button inside the department search input */
.searchBox{
    position:relative!important;
    min-width:0!important;
    width:100%!important;
    display:block!important;
}
.searchBox .departmentSearch{
    width:100%!important;
    padding-right:56px!important;
    display:block!important;
}
.clearSearchBtn{
    position:absolute!important;
    right:8px!important;
    left:auto!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    max-width:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:999px!important;
    background:#edf1f5!important;
    color:#56616c!important;
    font-size:30px!important;
    font-weight:500!important;
    line-height:36px!important;
    display:none;
    align-items:center!important;
    justify-content:center!important;
    box-shadow:none!important;
    z-index:3!important;
    cursor:pointer!important;
    appearance:none!important;
    -webkit-appearance:none!important;
}
.clearSearchBtn:hover{background:#dde5ec!important;}
.clearSearchBtn:active{transform:translateY(-50%) scale(.94)!important;}
.departmentTopControls .searchBox{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    display:block!important;
}
.departmentTopControls .searchBox .departmentSearch{
    width:100%!important;
    padding-right:56px!important;
    display:block!important;
}
.departmentTopControls .searchBox .clearSearchBtn{
    right:8px!important;
    top:50%!important;
}
@media(max-width:640px){
    .searchBox .departmentSearch,
    .departmentTopControls .searchBox .departmentSearch{padding-right:52px!important;}
    .clearSearchBtn,
    .departmentTopControls .searchBox .clearSearchBtn{
        right:7px!important;
        width:36px!important;
        height:36px!important;
        min-width:36px!important;
        min-height:36px!important;
        max-width:36px!important;
        max-height:36px!important;
        font-size:28px!important;
        line-height:34px!important;
    }
}

/* Update: admin menu in top bar + user status badges */
.topRight{
    display:flex;
    align-items:center;
    gap:12px;
    margin-left:auto;
}
.topAdminMenu{
    display:flex;
    align-items:center;
    gap:6px;
}
.topAdminMenu a{
    color:#9fe0ae;
    text-decoration:none;
    font-size:15px;
    font-weight:700;
    padding:8px 10px;
    border-radius:10px;
    border:1px solid #3b4147;
    background:#202428;
    white-space:nowrap;
}
.topAdminMenu a:hover{
    background:#2e353b;
}
.statusBadge{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:4px 10px;
    border-radius:999px;
    font-size:14px!important;
    font-weight:800;
    white-space:nowrap;
}
.statusActive{
    color:#1f7a35!important;
    background:#e4f6e7;
    border:1px solid #9fd8aa;
}
.statusInactive{
    color:#b00020!important;
    background:#ffe5e8;
    border:1px solid #f0a1ac;
}
@media(max-width:760px){
    .top{height:auto;min-height:58px;align-items:flex-start;padding:9px 10px;gap:8px;}
    .topRight{gap:8px;align-items:flex-start;}
    .topAdminMenu{max-width:56vw;overflow-x:auto;padding-bottom:2px;}
    .topAdminMenu a{font-size:13px;padding:7px 8px;}
    .top .linkbtn{padding:7px 0;font-size:15px;}
    .userDetails summary{grid-template-columns:1fr auto 28px!important;}
    .userDetails summary:after{grid-column:3!important;}
}


/* Fix: single Admin button in top bar */
.topRight{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    justify-content:flex-end!important;
}
.topAdminButton{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:36px!important;
    padding:0 14px!important;
    border-radius:10px!important;
    background:#24a148!important;
    color:#fff!important;
    text-decoration:none!important;
    font-size:16px!important;
    font-weight:800!important;
    border:0!important;
    white-space:nowrap!important;
}
.topAdminButton:hover{background:#1f8f3f!important;}
.topAdminMenu{display:none!important;}
.topRight form{margin:0!important;}
@media(max-width:640px){
    .top{padding:0 10px;}
    .topRight{gap:8px!important;}
    .topAdminButton{min-height:34px!important;padding:0 12px!important;font-size:15px!important;}
}


/* Fix: make top Admin link look like normal app button even if class is missing */
.topRight > a[href="/admin"],
.top > a[href="/admin"],
.top a.topAdminButton,
.topAdminButton{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:38px!important;
    min-height:38px!important;
    padding:0 16px!important;
    border-radius:12px!important;
    background:#24a148!important;
    color:#fff!important;
    text-decoration:none!important;
    font-size:16px!important;
    line-height:38px!important;
    font-weight:800!important;
    border:1px solid #24a148!important;
    white-space:nowrap!important;
    box-shadow:none!important;
}
.topRight > a[href="/admin"]:hover,
.top > a[href="/admin"]:hover,
.top a.topAdminButton:hover,
.topAdminButton:hover{
    background:#1f8f3f!important;
    border-color:#1f8f3f!important;
}
.topRight{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
}
.topRight form{margin:0!important;}
.topRight .linkbtn{height:38px!important;line-height:38px!important;padding:0 4px!important;}
@media(max-width:640px){
    .topRight > a[href="/admin"],
    .top > a[href="/admin"],
    .top a.topAdminButton,
    .topAdminButton{height:34px!important;min-height:34px!important;line-height:34px!important;padding:0 12px!important;font-size:15px!important;}
    .topRight .linkbtn{height:34px!important;line-height:34px!important;}
}

/* Fix: nicer top bar spacing on mobile devices */
@media (max-width: 640px){
    .top{
        height:auto!important;
        min-height:72px!important;
        padding:14px 12px 10px!important;
        padding-top:calc(14px + env(safe-area-inset-top, 0px))!important;
        align-items:flex-end!important;
        gap:10px!important;
    }
    .top > div:first-child{
        min-width:0!important;
        line-height:1.2!important;
        padding-bottom:2px!important;
    }
    .top b{
        font-size:18px!important;
        line-height:1.2!important;
    }
    .top small{
        font-size:17px!important;
        line-height:1.2!important;
    }
    .topRight{
        align-items:flex-end!important;
        padding-bottom:0!important;
        gap:8px!important;
    }
    .topRight .linkbtn{
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        height:34px!important;
        line-height:34px!important;
        padding:0 2px!important;
        font-size:16px!important;
    }
    .topAdminButton,
    .topRight > a[href="/admin"],
    .top > a[href="/admin"],
    .top a.topAdminButton{
        height:34px!important;
        min-height:34px!important;
        line-height:34px!important;
    }
    .departmentTop,
    .departmentSearchWrap,
    .stickyActions{
        top:72px!important;
    }
    .sheetHead{
        top:129px!important;
    }
}

/* Update: AJAX user/section/product admin fixes */
.saveState{display:inline-flex;align-items:center;margin-left:10px;color:#66717c;font-size:14px;font-weight:700;min-height:28px;vertical-align:middle;}
.sectionEditForm .saveState{min-width:90px;}
.userDetails summary{grid-template-columns:minmax(0,1fr) auto auto 28px!important;}
.userSummaryName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.userSummaryRole{white-space:nowrap;}
.quickUserActive{display:inline-flex!important;align-items:center!important;gap:8px!important;margin:0!important;white-space:nowrap!important;cursor:pointer!important;}
.quickUserActive input{width:24px!important;height:24px!important;min-width:24px!important;accent-color:#24a148!important;margin:0!important;}
.quickUserActive .statusBadge{pointer-events:none;}
.ajaxUserForm .saveState{display:inline-flex;margin-top:8px;}
@media(max-width:640px){
    .userDetails summary{grid-template-columns:minmax(0,1fr) auto 28px!important;gap:8px!important;}
    .userSummaryRole{grid-column:1!important;font-size:14px!important;color:#66717c!important;}
    .quickUserActive{grid-column:2!important;grid-row:1 / span 2!important;align-self:center!important;}
    .userDetails summary:after{grid-column:3!important;grid-row:1 / span 2!important;}
    .quickUserActive input{width:22px!important;height:22px!important;min-width:22px!important;}
    .quickUserActive .statusBadge{font-size:12px!important;padding:3px 8px!important;}
}

/* Bulk delete button in admin products floating panel */
.floatingSelectionBar .dangerCompactBtn{
    height:46px!important;
    min-height:46px!important;
    width:auto!important;
    min-width:92px!important;
    border:1px solid #fecaca!important;
    border-radius:12px!important;
    padding:0 14px!important;
    background:#fee2e2!important;
    color:#b91c1c!important;
    font-weight:900!important;
    font-size:15px!important;
    cursor:pointer!important;
    white-space:nowrap!important;
    margin:0!important;
}
.floatingSelectionBar .dangerCompactBtn:hover{background:#fecaca!important;}
.floatingSelectionBar .dangerCompactBtn:disabled{opacity:.55!important;cursor:not-allowed!important;}
@media(max-width:720px){
    .floatingSelectionBar .dangerCompactBtn{
        width:auto!important;
        min-width:84px!important;
        padding:0 12px!important;
    }
}

/* Fix: mobile user edit department access layout */
@media (max-width: 760px){
    .adminUsersPage,
    .adminUsersPage .panel,
    .adminUsersPage .compactList,
    .adminUsersPage .adminDetails,
    .adminUsersPage .detailsBody,
    .adminUsersPage .userEditBody{
        max-width:100%!important;
        width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
        overflow-x:hidden!important;
    }

    .adminUsersPage .userFormGrid{
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:10px!important;
        width:100%!important;
        min-width:0!important;
    }

    .adminUsersPage .userFormGrid > *,
    .adminUsersPage .userEditBody input,
    .adminUsersPage .userEditBody select,
    .adminUsersPage .userCreatePanel input,
    .adminUsersPage .userCreatePanel select{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
    }

    .adminUsersPage .departmentAccessBox{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
        overflow:hidden!important;
        padding:14px!important;
    }

    .adminUsersPage .departmentAccessBox b{
        display:block!important;
        margin-bottom:12px!important;
        font-size:22px!important;
        line-height:1.2!important;
    }

    .adminUsersPage .deptAccessGrid{
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:12px!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    .adminUsersPage .deptCheck{
        display:grid!important;
        grid-template-columns:56px minmax(0,1fr)!important;
        align-items:center!important;
        justify-content:start!important;
        gap:12px!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        min-height:58px!important;
        margin:0!important;
        padding:0!important;
        box-sizing:border-box!important;
        overflow:visible!important;
        white-space:normal!important;
        text-align:left!important;
        font-size:20px!important;
        line-height:1.25!important;
        color:#151515!important;
    }

    .adminUsersPage .deptCheck input{
        grid-column:1!important;
        width:46px!important;
        height:46px!important;
        min-width:46px!important;
        margin:0!important;
        justify-self:start!important;
        align-self:center!important;
        accent-color:#24a148!important;
    }

    .adminUsersPage .userDetails[open]{
        overflow:hidden!important;
    }

    .adminUsersPage .userDetails[open] summary{
        border-bottom:1px solid #e6ebf0!important;
    }

    .adminUsersPage .smallPrimary,
    .adminUsersPage .detailsDanger .linkbtn{
        width:100%!important;
        max-width:100%!important;
    }
}

/* Fix: department access labels on mobile user edit */
@media (max-width: 900px){
    .adminUsersPage .departmentAccessBox{
        overflow:visible!important;
        max-width:100%!important;
    }
    .adminUsersPage .deptAccessGrid{
        display:flex!important;
        flex-direction:column!important;
        gap:14px!important;
        width:100%!important;
        max-width:100%!important;
        overflow:visible!important;
    }
    .adminUsersPage .deptCheck{
        display:flex!important;
        flex-direction:row!important;
        align-items:center!important;
        justify-content:flex-start!important;
        gap:14px!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        min-height:58px!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
        white-space:normal!important;
        text-align:left!important;
    }
    .adminUsersPage .deptCheck input{
        flex:0 0 48px!important;
        width:48px!important;
        height:48px!important;
        min-width:48px!important;
        margin:0!important;
    }
    .adminUsersPage .deptCheck .deptName{
        display:block!important;
        flex:1 1 auto!important;
        min-width:0!important;
        max-width:calc(100% - 64px)!important;
        overflow:visible!important;
        white-space:normal!important;
        word-break:break-word!important;
        color:#151515!important;
        font-size:20px!important;
        line-height:1.25!important;
        text-align:left!important;
    }
}


/* Total: full product name in opened card on mobile */
.mobileFullProductName{
    display:none;
}
@media(max-width:640px){
    .totalDetails .mobileFullProductName{
        display:block!important;
        font-size:18px!important;
        font-weight:900!important;
        line-height:1.25!important;
        color:#151515!important;
        margin:0 0 8px 0!important;
        white-space:normal!important;
        word-break:break-word!important;
    }
    .totalItem[open] .productTitleText{
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
    }
}

/* Fix: show full product title in opened Total card on mobile */
@media(max-width:640px){
    .compactTotalPage .totalItem[open] summary{
        grid-template-columns:50px minmax(0,1fr) 18px!important;
        align-items:start!important;
        row-gap:4px!important;
    }
    .compactTotalPage .totalItem[open] summary:after{
        grid-column:3!important;
        grid-row:1!important;
        align-self:center!important;
    }
    .compactTotalPage .totalItem[open] .totalItemName{
        grid-column:2!important;
        min-width:0!important;
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
        line-height:1.2!important;
    }
    .compactTotalPage .totalItem[open] .productTitleText{
        display:block!important;
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
        word-break:break-word!important;
        overflow-wrap:anywhere!important;
        max-width:100%!important;
    }
    .compactTotalPage .totalItem[open] .quantityInline,
    .compactTotalPage .totalItem[open] .buyerCommentInline{
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
        word-break:break-word!important;
        overflow-wrap:anywhere!important;
    }
    .compactTotalPage .totalItem[open] .totalItemDepartments{
        grid-column:2!important;
        grid-row:2!important;
        text-align:left!important;
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
        font-size:13px!important;
        color:#666!important;
    }
    .compactTotalPage .totalDetails .mobileFullProductName{
        display:block!important;
        font-size:20px!important;
        font-weight:900!important;
        line-height:1.25!important;
        color:#151515!important;
        margin:0 0 10px 0!important;
        white-space:normal!important;
        word-break:break-word!important;
        overflow-wrap:anywhere!important;
    }
}

/* Total: realtime/text view update */
.totalHeaderActions{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
}
.totalHeaderActions form{margin:0!important;}
.iconTextView{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:58px!important;
    height:58px!important;
    border:0!important;
    border-radius:18px!important;
    background:#e8f2ff!important;
    color:#1d4ed8!important;
    font-size:28px!important;
    font-weight:900!important;
    cursor:pointer!important;
    box-shadow:none!important;
}
.iconTextView:hover{background:#dbeafe!important;}
.totalTextModal{
    position:fixed!important;
    inset:0!important;
    z-index:10000!important;
    display:none!important;
}
.totalTextModal.open{display:block!important;}
.totalTextModalBackdrop{
    position:absolute!important;
    inset:0!important;
    background:rgba(15,23,42,.55)!important;
}
.totalTextModalPanel{
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:min(720px, calc(100vw - 28px))!important;
    max-height:min(76vh, 760px)!important;
    background:#fff!important;
    border-radius:22px!important;
    box-shadow:0 24px 60px rgba(0,0,0,.3)!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
}
.totalTextModalHead{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    padding:18px 20px 10px 20px!important;
    border-bottom:1px solid #e6ebf0!important;
}
.totalTextModalHead h2{
    margin:0!important;
    font-size:28px!important;
    line-height:1.15!important;
}
.totalTextClose{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:42px!important;
    height:42px!important;
    border:1px solid #d6dde4!important;
    border-radius:12px!important;
    background:#fff!important;
    color:#111!important;
    font-size:30px!important;
    font-weight:700!important;
    line-height:1!important;
    cursor:pointer!important;
}
.totalTextHint{
    padding:12px 20px!important;
    color:#66717c!important;
    font-size:15px!important;
    font-weight:700!important;
    background:#f8fafc!important;
    border-bottom:1px solid #e6ebf0!important;
}
.totalTextBody{
    padding:12px 20px 20px 20px!important;
    overflow:auto!important;
    -webkit-overflow-scrolling:touch!important;
}
.totalTextLine{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:8px!important;
    padding:9px 0!important;
    border-bottom:1px solid #eef2f6!important;
    font-size:18px!important;
    line-height:1.3!important;
    color:#151515!important;
}
.totalTextLine span{
    color:#66717c!important;
    font-weight:800!important;
}
.totalTextLine div{
    font-weight:800!important;
    word-break:break-word!important;
    overflow-wrap:anywhere!important;
}
.totalTextEmpty{
    padding:24px!important;
    border:1px dashed #cbd5e1!important;
    border-radius:16px!important;
    color:#66717c!important;
    font-size:18px!important;
    font-weight:800!important;
    text-align:center!important;
}
@media(max-width:640px){
    .compactTotalHeader{
        gap:10px!important;
    }
    .iconTextView,
    .iconDanger{
        width:54px!important;
        height:54px!important;
        border-radius:16px!important;
        font-size:26px!important;
    }
    .totalTextModalPanel{
        left:10px!important;
        right:10px!important;
        top:calc(env(safe-area-inset-top, 0px) + 20px)!important;
        bottom:calc(env(safe-area-inset-bottom, 0px) + 86px)!important;
        transform:none!important;
        width:auto!important;
        max-height:none!important;
        border-radius:18px!important;
    }
    .totalTextModalHead h2{font-size:24px!important;}
    .totalTextLine{font-size:16px!important;grid-template-columns:30px minmax(0,1fr)!important;}
}

/* Stores feature */
.storeOpenButton{display:inline-flex!important;align-items:center;justify-content:center;text-decoration:none;margin:8px 0;width:auto!important;min-width:180px}.storeTopLinks{display:flex;gap:12px;flex-wrap:wrap;margin:8px 0 14px}.storeSectionsList{margin-bottom:18px}.storeProductsArea h3,.storeTotalSectionTitle{font-size:20px;font-weight:800;margin:18px 4px 8px}.storeProductList{display:grid;gap:8px;min-height:20px}.storeProductItem{display:grid;grid-template-columns:42px 36px minmax(0,1fr) auto;gap:10px;align-items:center;background:#fff;border:1px solid #dfe4ea;border-radius:14px;padding:10px;box-shadow:0 2px 8px #0000000d}.storeProductItem.dragging{opacity:.55;border:2px dashed #24a148}.storeProductName{font-size:18px;font-weight:700;line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis}.storeProductSelect{width:28px;height:28px;accent-color:#24a148}.storeTotalTabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 12px;margin:0 0 8px}.storeTotalTabs a{flex:0 0 auto;text-decoration:none;color:#2b7a3d;background:#fff;border:1px solid #dbe2e8;border-radius:12px;font-weight:800;padding:10px 14px}.storeTotalTabs a.active{background:#24a148;color:#fff;border-color:#24a148}.totalModeBtn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:12px;background:#fff;color:#2b7a3d;text-decoration:none;font-weight:800;border:1px solid #dbe2e8}.storeTotalSectionTitle{background:#ffe17a;border:1px solid #d5bd55;border-radius:10px;padding:10px 14px;margin-top:12px}.adminStoresPage .storeEditBody form{margin:8px 0}.adminStoreManagePage .panel select{width:100%;min-height:56px;border:1px solid #d5dbe1;border-radius:12px;margin:7px 0;padding:10px 12px;font-size:18px;background:#fff;color:#151515}
@media(max-width:640px){.storeProductItem{grid-template-columns:42px 34px minmax(0,1fr);}.storeProductItem .removeStoreProduct{grid-column:3;justify-self:start}.storeTotalTabs{padding:0 0 10px}.storeTotalTabs a{padding:9px 12px;font-size:15px}.storeTotalSectionTitle{font-size:18px}.totalHeaderActions{gap:8px}.storeTopLinks{display:grid}.storeOpenButton{width:100%!important}.storeProductName{white-space:normal;overflow:visible}.adminTabs{overflow-x:auto}.adminTabs a{min-width:118px}}

/* Store manage improved layout */
.adminStoreManagePage .storeWideBlock,
.adminStoreManagePage .panel,
.adminStoreManagePage .storeSectionsList,
.adminStoreManagePage .storeProductsArea{
    width:100%!important;
    max-width:100%!important;
}
.adminStoreManagePage .storeSectionsList{display:grid;gap:8px;}
.adminStoreManagePage .storeSectionDetails summary{
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) 24px!important;
    gap:10px!important;
    align-items:center!important;
    min-height:56px!important;
}
.adminStoreManagePage .storeSectionDetails summary:after{grid-column:3!important;}
.adminStoreManagePage .storeSectionDetails.dragging{opacity:.55;border:2px dashed #24a148!important;}
.adminStoreManagePage .storeSectionName{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.storeProductsSection{margin:14px 0 20px;}
.storeProductsSection h3{font-size:22px;font-weight:900;margin:14px 4px 8px;}
.adminStoreManagePage .storeProductList{
    display:grid!important;
    gap:8px!important;
    min-height:58px!important;
}
.adminStoreManagePage .storeProductItem{
    display:grid!important;
    grid-template-columns:42px 36px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:center!important;
    min-height:62px!important;
}
.adminStoreManagePage .storeProductItem .multiSelectWrap{display:flex;align-items:center;justify-content:center;margin:0!important;}
.adminStoreManagePage .storeProductName{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.adminStoreManagePage .storeListEmpty{grid-column:1/-1;margin:0!important;}
.adminStoreManagePage .storeListEmpty[hidden]{display:none!important;}
.adminStoreManagePage .floatingSelectionBar{right:22px!important;left:auto!important;max-width:min(760px,calc(100vw - 44px))!important;}
.adminStoreManagePage .floatingSelectionBar select{min-width:260px!important;}
@media(max-width:640px){
    .adminStoreManagePage .storeSectionDetails summary{grid-template-columns:42px minmax(0,1fr) 22px!important;}
    .adminStoreManagePage .storeProductItem{grid-template-columns:42px 34px minmax(0,1fr)!important;padding:9px!important;}
    .adminStoreManagePage .floatingSelectionBar{left:10px!important;right:10px!important;max-width:none!important;}
    .adminStoreManagePage .floatingSelectionBar select{min-width:0!important;width:100%!important;}
}

.adminSettingsPage .panel { max-width: 900px; }
.mutedText { color:#666; font-size:16px; margin: 0 0 14px; }
.bigSelect { width:100%; min-height:56px; font-size:22px; border:1px solid #d7dde4; border-radius:14px; padding:0 16px; background:#fff; margin-bottom:16px; }
@media (max-width: 700px){
    .bigSelect { font-size:20px; min-height:58px; }
}

/* Store admin UI fixes */
.adminStoresPage .storeCreateForm,
.adminStoresPage .storesList,
.adminStoreManagePage .storeWideBlock,
.adminStoreManagePage .panel,
.adminStoreManagePage .storeSectionsList,
.adminStoreManagePage .storeProductsArea{
    width:100%!important;
    max-width:900px!important;
    box-sizing:border-box!important;
}
.adminStoresPage .storeCreateForm input{
    width:100%!important;
    box-sizing:border-box!important;
}
.adminStoresPage .storeDetails summary.storeSummary{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto 22px!important;
    align-items:center!important;
    gap:12px!important;
}
.adminStoresPage .storeSummaryMain{
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    flex-wrap:wrap!important;
}
.adminStoresPage .storeSummaryName{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}
.adminStoresPage .storeOpenButtonInSummary{
    margin:0!important;
    min-width:150px!important;
    width:auto!important;
    min-height:44px!important;
    padding:0 14px!important;
    border-radius:12px!important;
    font-size:16px!important;
    white-space:nowrap!important;
}
.adminStoresPage .storeDetails .storeEditBody{
    display:block!important;
    max-width:none!important;
    padding:12px!important;
}
.adminStoresPage .storeEditForm{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:8px!important;
    align-items:center!important;
    width:100%!important;
    margin:0 0 8px!important;
}
.adminStoresPage .storeEditForm input{
    width:100%!important;
    min-height:56px!important;
    box-sizing:border-box!important;
    margin:0!important;
}
.adminStoresPage .storeEditForm .smallPrimary{
    min-height:54px!important;
    margin:0!important;
    white-space:nowrap!important;
}
.adminStoresPage .ajaxStoreDeleteForm{margin:6px 0 0!important;}
.adminStoreManagePage .storeTopLinks,
.adminStoreManagePage .storeWideBlock,
.adminStoreManagePage h2{
    max-width:900px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
.adminStoreManagePage .panel input,
.adminStoreManagePage .panel button,
.adminStoreManagePage .panel select{
    width:100%!important;
    box-sizing:border-box!important;
}
.adminStoreManagePage .muted.storeWideBlock{
    background:#fff!important;
    border:1px solid #dfe4ea!important;
    border-radius:14px!important;
    padding:12px 14px!important;
    line-height:1.35!important;
}
@media(max-width:640px){
    .adminStoresPage .storeDetails summary.storeSummary{
        grid-template-columns:minmax(0,1fr) 22px!important;
    }
    .adminStoresPage .storeOpenButtonInSummary{
        grid-column:1/-1!important;
        width:100%!important;
        min-width:0!important;
    }
    .adminStoresPage .storeSummaryMain{
        display:block!important;
    }
    .adminStoresPage .storeSummaryMain small{
        display:block!important;
        margin-top:3px!important;
    }
    .adminStoresPage .storeEditForm{
        grid-template-columns:1fr!important;
    }
    .adminStoresPage .storeEditForm .smallPrimary{width:100%!important;}
}

/* Store admin UI fixes */
.storeTopLinks{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:10px 0 22px;max-width:980px}
.storeTopLinks .linkbtn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border-radius:12px;border:1px solid #dbe2e8;background:#fff;color:#287a39;text-decoration:none;font-weight:800;line-height:1.2}
.storeTopLinks .storeOpenButton{background:#24a148;color:#fff;border-color:#24a148}
.adminStoreManagePage .storeWideBlock{max-width:980px;width:100%}
.adminStoreManagePage .compactList.storeWideBlock{max-width:980px;width:100%}
.storeSectionDetails summary{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px}
.storeSectionDetails .detailsBody{display:grid;gap:10px;padding:14px}
.storeSectionDetails .detailsBody input{width:100%;min-height:54px;border:1px solid #d5dbe1;border-radius:12px;padding:10px 12px;font-size:18px;box-sizing:border-box}
.storeProductItem{touch-action:none}
.storeProductItem.dragging,.storeSectionDetails.dragging{opacity:.55;border:2px dashed #24a148}
@media(max-width:700px){.storeTopLinks{display:grid;grid-template-columns:1fr;gap:8px}.storeTopLinks .linkbtn{width:100%;box-sizing:border-box}.adminTabs{overflow-x:auto;scrollbar-width:none}.adminTabs a{min-width:140px;flex:0 0 auto}.storeSectionDetails summary{grid-template-columns:44px 1fr 22px}.storeSectionDetails .detailsBody{padding:12px}.storeProductItem{grid-template-columns:44px 44px 1fr!important}}
