.directory-metrics{display:flex;gap:16px;margin:20px 0}.directory-metrics>div{flex:1;background:white;border:1px solid #dce3dc;border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:5px}.directory-metrics strong{font-size:30px}.directory-toolbar{display:flex;gap:12px;justify-content:space-between;margin:20px 0}.directory-toolbar input{max-width:440px;width:100%}.directory-list{display:grid;gap:12px}.directory-card{border:1px solid #dce3dc;background:white;border-radius:16px;padding:20px;display:flex;justify-content:space-between;align-items:start;gap:20px}.directory-card h3{margin:0 0 8px}.directory-card p{margin:10px 0;color:#61746a}.directory-card small{line-height:1.6}.directory-role{display:inline-block;background:#eef3e7;padding:5px 10px;border-radius:8px}.directory-actions{display:flex;gap:8px;flex-wrap:wrap}.directory-form{background:white;border:1px solid #b1c5b7;border-radius:16px;padding:24px;margin:20px 0;max-width:900px}.directory-form>label,.directory-form fieldset{display:block;margin:16px 0}.directory-form input:not([type=checkbox]):not([type=radio]),.directory-form select{display:block;width:100%;margin-top:7px}.directory-form fieldset{border:1px solid #dce3dc;border-radius:12px;padding:14px;max-height:260px;overflow:auto}.access-check{display:flex!important;align-items:center;gap:10px;padding:8px 0}.access-check input{width:20px;height:20px}.catalog-row{display:flex;gap:10px;margin:10px 0}.catalog-row input:first-child{max-width:150px}#accessInvite{margin:20px 0;padding:24px;background:white;border:1px solid #b1c5b7;border-radius:16px}#accessInvite input{display:block;width:100%;margin:12px 0}.legacy-access{margin:28px 0}.network-production{display:flex;align-items:center;gap:16px;margin:16px 0}.network-production select{max-width:500px;width:100%}@media(max-width:650px){.directory-card{flex-direction:column}.directory-toolbar{flex-wrap:wrap}.directory-metrics{gap:8px}.directory-metrics>div{padding:12px}.directory-metrics strong{font-size:24px}.directory-form{padding:16px}.directory-actions button{flex:1}.network-production{display:block}}

.fold{margin:12px 0;border:1px solid var(--line,#d5ddd7);border-radius:14px;background:#fff;overflow:clip}.fold>summary{cursor:pointer;min-height:48px;padding:14px 16px;font-weight:650;list-style:none;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.fold>summary::-webkit-details-marker{display:none}.fold>summary:before{content:'›';font-size:24px;line-height:1;transition:transform .15s}.fold[open]>summary:before{transform:rotate(90deg)}.fold>summary:focus-visible{outline:3px solid #3276df;outline-offset:-3px}.fold-body{padding:0 16px 16px}.fold>summary span{font-size:13px;font-weight:400;color:#52645b;margin-left:auto;max-width:100%;overflow-wrap:anywhere}.scope-tools{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.scope-tools button{font-size:13px;min-height:44px}.scope-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:4px}.scope-options .access-check{margin:0;padding:10px 6px;min-height:46px;align-items:center}.scope-options [hidden]{display:none!important}.scope-picker input[type=search]{width:100%;min-height:44px}.grant-fold .scope-picker{margin-bottom:0}.compact-fold{border:0;background:transparent}.compact-fold>summary{padding:8px 0;font-size:14px}.directory-form>.directory-actions{position:sticky;bottom:0;background:#fff;padding:12px 0;border-top:1px solid var(--line);z-index:2}.directory-form>.directory-actions button{flex:1}.directory-form>p{margin:10px 0}.grant-fold{margin:8px 0}@media(max-width:600px){.fold>summary{padding:12px}.fold-body{padding:0 12px 12px}.scope-options{grid-template-columns:1fr}.directory-form{padding:14px!important}.scope-selection{flex-basis:100%;padding-left:20px}.directory-card{min-width:0}.compact-fold>summary{overflow-wrap:anywhere}}@media print{.fold>summary{display:none}.fold:not([open])>div{display:block!important}}

.access-check input[type=radio],.access-check input[type=checkbox]{flex:0 0 20px;margin:0;width:20px;height:20px}

@media(max-width:600px){
 .directory-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.directory-metrics>div{min-width:0;padding:10px 8px;font-size:12px;overflow-wrap:anywhere}
 .directory-card{padding:16px;gap:12px}.directory-card>*,.directory-form,.fold-body{min-width:0;max-width:100%}
 .directory-actions{width:100%;display:flex;flex-wrap:wrap}.directory-actions button{min-width:0;flex:1 1 130px;min-height:44px;padding:10px 8px;overflow-wrap:anywhere}
 .directory-toolbar input{max-width:100%}.catalog-row{flex-wrap:wrap}.catalog-row input{flex:1 1 120px;min-width:0}
 .fold>summary{overflow-wrap:anywhere}.access-check{overflow-wrap:anywhere}.directory-role{max-width:100%;overflow-wrap:anywhere}
 #accessInvite{padding:14px}#accessInvite svg{max-width:100%;height:auto}
}

/* Compact store summary, with product detail on demand. */
#managerOverview table{table-layout:fixed;white-space:normal;font-variant-numeric:tabular-nums}
#managerOverview th:first-child{width:43%}#managerOverview td:first-child{min-width:0}
#managerOverview th,#managerOverview td{padding:10px 8px;font-size:13px;overflow-wrap:anywhere}
.summary-store td{font-weight:650}.summary-status{font-weight:400;font-size:11px!important}
.summary-store.missing .summary-status{color:#8d5714}.summary-store.missing{background:#fff8e9}
.summary-store.difference{background:#fff0ed}.summary-store.difference .summary-status{color:#a43731;font-weight:700}
.summary-store.complete .summary-status{color:#256346}.summary-store.complete{background:#f0f8f2}
#managerOverview .summary-details td{padding:0 8px 5px}.summary-details summary{font-size:12px;min-height:44px;display:flex;align-items:center;color:var(--green)}
.summary-details details{white-space:normal}.summary-details p{font-size:11px;margin:8px 0}.summary-product{display:flex;justify-content:space-between;gap:8px;padding:7px 0;font-size:12px}.summary-product b{white-space:nowrap}.summary-product span{min-width:0}
.summary-total{background:#e4eee7;font-weight:750}.summary-total td{border-top:2px solid #b1c5b7}
@media(max-width:600px){#managerOverview>.fold-body{padding:0 8px 12px}#managerOverview th,#managerOverview td{padding:8px 4px;font-size:12px}#managerOverview th{font-size:11px}#managerOverview .summary-details td{padding:0 4px 3px}#managerOverview .table-scroll{margin-top:12px}.summary-product{flex-wrap:wrap}#managerOverview .fold-body>p{font-size:11px;margin-top:12px}}
.summary-pulse{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0 12px}.summary-pulse>div{background:#eff5f0;border:1px solid #d9e5db;border-radius:12px;padding:14px}.summary-pulse>div:first-child{background:#1b5943;color:white}.summary-pulse>div:first-child small{color:#daeee2}.summary-pulse strong{display:block;font-size:28px;margin:4px 0}.summary-pulse strong span{font-size:14px;font-weight:400}.summary-pulse p{font-size:11px}.summary-attention{display:flex;gap:8px;flex-wrap:wrap;background:#fff3de;color:#80500e;padding:10px 12px;border-radius:10px;font-size:12px}.summary-attention span{flex:1 1 200px}.summary-mix{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}.summary-mix>div{padding:10px;border-radius:10px;background:#f5f6f3;border-left:3px solid #93b29e;font-size:12px}.summary-mix b{display:block;font-size:17px}.summary-name{border:0;background:transparent;padding:0;min-height:32px;text-align:left;font-weight:750;max-width:100%}.summary-status{display:inline-block!important;width:fit-content;padding:3px 6px;border-radius:5px;background:#edf0ed;margin:3px 0 5px!important}.cooking .summary-status,.transit .summary-status{background:#e6f0fb;color:#315d85}.ready .summary-status{background:#e6f3e8;color:#266141}.summary-composition{display:flex;flex-wrap:wrap;gap:3px 8px;font-size:11px;font-weight:400;color:#637269}.summary-composition span{white-space:normal}.summary-composition b{color:#20352e}.summary-store td{vertical-align:top}.summary-store td:not(:first-child){padding-top:18px!important}#managerOverview .summary-store td{border-bottom:1px solid #dce5df}
@media(max-width:600px){.summary-pulse{gap:5px}.summary-pulse>div{padding:9px 7px}.summary-pulse small{font-size:10px;display:block;line-height:1.3;min-height:26px}.summary-pulse strong{font-size:23px}.summary-pulse p{font-size:10px}.summary-mix{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.summary-mix>div{display:flex;justify-content:space-between;align-items:center;gap:5px;padding:7px;font-size:11px}.summary-mix b{font-size:14px;white-space:nowrap}.summary-composition{font-size:10px;gap:2px}.summary-composition span{flex-basis:100%}.summary-name{font-size:12px}.summary-status{font-size:10px!important}}

.catalog-row select[name=productUnit]{width:80px;flex-shrink:0}

/* Mobile summary: each table row is a store card; keep desktop columns intact. */
@media screen and (max-width:700px){
 #managerOverview .table-scroll{overflow:visible}
 #managerOverview table,#managerRows{display:block;width:100%;min-width:0;table-layout:auto}
 #managerHead{display:none}
 #managerRows>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;margin:0 0 12px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
 #managerRows>tr.complete{background:#f1f7f3}
 #managerRows>tr>td{display:block;width:auto!important;min-width:0;text-align:left!important;border:0!important;padding:12px!important;white-space:normal;overflow-wrap:anywhere}
 #managerRows>tr>td:first-child{grid-column:1/-1;border-bottom:1px solid var(--line)!important}
 #managerRows>tr>td:nth-child(2){grid-column:1/-1;border-bottom:1px solid var(--line)!important}
 #managerRows>tr>td:nth-child(3)::before,#managerRows>tr>td:nth-child(4)::before{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-bottom:4px}
 #managerRows>tr>td:nth-child(3)::before{content:'Выдано'}
 #managerRows>tr>td:nth-child(4)::before{content:'Принято'}
 #managerRows .summary-order-part{white-space:normal;font-size:14px;display:flex;justify-content:space-between;gap:12px}
 #managerRows .summary-order-part b{text-align:right;min-width:0}
 #managerRows .summary-name{font-size:17px}
 #managerRows .summary-composition{font-size:13px}
 #managerRows .summary-composition-group>b{font-size:13px}
 #managerRows .summary-status{font-size:12px!important;margin-left:8px!important}
 #managerRows .summary-total{background:#e6efe8}
}

@media(max-width:700px){#managerRows>tr>td:nth-child(5){grid-column:1/-1}#managerRows>tr>td:nth-child(5)::before{content:'Осталось принять';display:block;font-size:12px;color:var(--muted);margin-bottom:4px}}
