/* Shared in-app presentation. Landing/manual never opt into .ui-app. Layout and business controls stay owned by their renderers. */
body.ui-app{--bg:#f5f7fa;--panel:#fff;--text:#243246;--muted:#5e6c80;--line:#dce3ed;--blue:#315bd7;--green:#27654b;--yellow:#805f20;--red:#a42e32;--ui-soft:#f7f9fc;--ui-radius:10px;--ui-control-radius:7px;--ui-space:20px;margin:0;background:var(--bg);color:var(--text);font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.ui-app *{box-sizing:border-box}
body.ui-app [hidden]{display:none!important}
body.ui-app .shell{max-width:1320px;padding:24px;margin:0 auto}
body.ui-app :is(h1,h2,h3,h4){color:var(--text);line-height:1.35;font-weight:650;overflow-wrap:anywhere}
body.ui-app h1{font-size:24px;margin:0 0 12px}body.ui-app h2{font-size:19px;margin:0 0 12px}body.ui-app h3{font-size:16px;margin:0 0 12px}
body.ui-app :is(p,li,dt,dd){overflow-wrap:anywhere}
body.ui-app :is(.muted,small,.field-help){color:var(--muted);font-size:13px;line-height:1.5}
body.ui-app .field-help{margin:8px 0 12px;font-weight:400}
body.ui-app :is(.panel,.loading){border:1px solid var(--line);border-radius:var(--ui-radius);background:var(--panel);padding:var(--ui-space);max-width:100%;min-width:0;box-shadow:none}
body.ui-app section.loading{max-width:720px;margin:24px auto}body.ui-app .loading strong{display:block;font-size:19px;margin-bottom:10px}
body.ui-app #stock-check-results{padding:var(--ui-space)}
body.ui-app .subscription{padding:12px 16px;background:#fafbfd}body.ui-app .subscription strong{font-weight:600}
body.ui-app :is(.draft,.check-entry,.stock-slot,.email-toggle){border-radius:var(--ui-radius);border-color:var(--line);background:var(--ui-soft)}
body.ui-app #stock-check-history .check-entry{background:var(--ui-soft);border-color:var(--line)}
body.ui-app #stock-check-history .check-entry:has([aria-expanded=true]){border-color:#97ade2;background:#f5f8ff}
body.ui-app :is(button,.button,a[data-history-close]){display:inline-flex;align-items:center;justify-content:center;min-height:44px!important;max-width:100%;padding:10px 14px!important;border:1px solid var(--control-border,var(--blue))!important;border-radius:var(--ui-control-radius)!important;background:var(--control-bg,var(--blue))!important;color:var(--control-fg,#fff)!important;font:600 14px/1.4 system-ui,sans-serif!important;text-decoration:none!important;white-space:normal;overflow-wrap:anywhere;cursor:pointer;box-shadow:none}
body.ui-app :is(.ui-secondary,.pagination button,[data-editor-nav] a,[data-history-open],[data-history-close],[data-check-table] button,#check-reset,#add-stock-slot,[data-remove-slot],.top .button,[data-editor-choice=stay],[data-editor-choice=discard],#bulk-prev,#bulk-next,#bulk-prev-top,#bulk-next-top,#bulk-refresh,form:has([name=operation][value=remove]) button){--control-bg:#fff;--control-fg:#38558a;--control-border:#cdd8e9}
body.ui-app #bulk-form:has(#bulk-confirmation:not([hidden])) #bulk-preview{--control-bg:#fff;--control-fg:#38558a;--control-border:#cdd8e9}
body.ui-app :is(button,.button,a[data-history-close]):hover:not(:disabled):not([aria-disabled=true]){filter:brightness(.96)}
body.ui-app :is(button,input,select):disabled,body.ui-app [aria-disabled=true]{opacity:.55;cursor:not-allowed}
body.ui-app :is(input,select,textarea):not([type=checkbox]):not([type=hidden]){min-height:44px!important;min-width:0;max-width:100%;border:1px solid #cbd5e3;border-radius:var(--ui-control-radius);background:#fff;color:var(--text);font:400 15px/1.4 system-ui,sans-serif;padding:10px 12px}
body.ui-app :is(input,select,textarea):disabled{background:#f1f4f8}
body.ui-app input[type=checkbox]{accent-color:var(--blue)}
body.ui-app label{font-size:13px;font-weight:600;color:var(--text);gap:8px}
body.ui-app :focus-visible{outline:3px solid #2454d6!important;outline-offset:3px}
body.ui-app :is(.badge,.check-entry-status){font-size:12px!important;line-height:1.4;padding:4px 9px;border:1px solid var(--line);border-radius:6px!important;color:#54647a;background:#f5f7fa}
body.ui-app .badge:is(.safe,.warn){color:#54647a;border-color:var(--line);background:#f5f7fa}
body.ui-app :is(.error,.ok,.success,.notice,.empty),body.ui-app #editor-feedback,body.ui-app #bulk-progress{border:1px solid var(--line);border-radius:var(--ui-radius);padding:14px 16px;margin:12px 0;line-height:1.5;overflow-wrap:anywhere}
body.ui-app :is(.notice,.empty,#bulk-progress){background:#f4f7fc;color:#455b7a;border-color:#d7e1ef}
body.ui-app :is(.error,#editor-feedback.error){background:#fff3f2;color:var(--red);border-color:#edc5c3}
body.ui-app :is(.ok,.success){background:#f0f8f3;color:var(--green);border-color:#c5dfd0}
body.ui-app .check-entry-note.is-failed{color:var(--red)}
body.ui-app .metric strong{font-size:26px;font-weight:650}body.ui-app .metric span{font-size:13px}
body.ui-app table{font-size:14px}
/* Real data rows only. Paging/filtering uses [hidden]; nth-child(of ...) counts the displayed DOM order, not stale hidden siblings. Tbody replacement/sorting needs no JS hook. */
body.ui-app table:not([role=presentation])>tbody>tr:where(:not([hidden]):not(.empty):not(:has(>th)):has(>td:nth-child(2))){--ui-row-stripe:#fff;--ui-row-state:initial;background-color:var(--ui-row-state,var(--ui-row-stripe))}
body.ui-app table:not([role=presentation])>tbody>tr:where(:nth-child(even of tr:not([hidden]):not(.empty):not(:has(>th)):has(>td:nth-child(2)))){--ui-row-stripe:#f3f5f7}
body.ui-app table:not([role=presentation])>tbody>tr:where(:not([hidden]):not(.empty):not(:has(>th)):has(>td:nth-child(2)))>td:not(.error):not([aria-invalid=true]){background-color:inherit}
@media(hover:hover){body.ui-app table:not([role=presentation])>tbody>tr:where(:hover){--ui-row-state:#eaf0f6}}
/* Out-of-range presentation overrides ordinary stripes/hover. Focus, selection and real errors below retain priority; the range label stays visible in those states. */
body.ui-app table:not([role=presentation])>tbody>tr:where(.ui-below-min){--ui-row-state:#fff1f0;--ui-range-label:"Ниже минимума";--ui-range-ink:#9e3530;--ui-range-fill:#ffe3df}
body.ui-app table:not([role=presentation])>tbody>tr:where(.ui-above-max){--ui-row-state:#fff6df;--ui-range-label:"Выше максимума";--ui-range-ink:#785817;--ui-range-fill:#ffe9b5}
@media(hover:hover){body.ui-app table:not([role=presentation])>tbody>tr:where(.ui-below-min:hover){--ui-row-state:#ffe7e3}body.ui-app table:not([role=presentation])>tbody>tr:where(.ui-above-max:hover){--ui-row-state:#ffefd0}}
/* Generated labels leave numeric textContent intact for existing snapshot sorting/filtering. */
body.ui-app tr:is(.ui-below-min,.ui-above-max)>td:is([data-label^="Остаток"],[data-label="Текущий остаток"])::after{content:var(--ui-range-label);display:block;box-sizing:border-box;width:fit-content;min-width:min-content;max-width:100%;margin-top:6px;padding:3px 4px;border-radius:4px;background:var(--ui-range-fill);color:var(--ui-range-ink);font:600 12px/1.4 system-ui,sans-serif;white-space:normal;overflow-wrap:normal;word-break:normal}
body.ui-app table:not([role=presentation])>tbody>tr:where(:focus-within){--ui-row-state:#e7eefc;box-shadow:inset 0 0 0 2px #799ce8}
body.ui-app table:not([role=presentation])>tbody>tr:where(:has(input[type=checkbox]:checked),[aria-selected=true]){--ui-row-state:#dce8fc}
body.ui-app table:not([role=presentation])>tbody>tr:where(.error,[aria-invalid=true],:has([aria-invalid=true])){--ui-row-state:#fff0ef}
body.ui-app :is(th,td){padding:12px 10px;border-color:#e5eaf1}body.ui-app th{font-size:12px;font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted);background:#fafbfd}
body.ui-app [data-check-table] th button{padding:8px!important;text-align:left;justify-content:flex-start;--control-bg:#fafbfd;--control-border:#e0e6ef;--control-fg:#455b7a}
body.ui-app .pagination{gap:10px;margin:16px 0;font-size:13px;color:var(--muted)}
body.ui-app #editor-leave-dialog{padding:24px;border:1px solid var(--line);border-radius:12px;color:var(--text);background:var(--panel);box-shadow:0 16px 48px #17294426}
body.ui-app #editor-leave-dialog::backdrop{background:#1e2d4566}
/* Native inline disclosures, not hover-only tooltips or popovers. Critical alerts never use this class. */
body.ui-app details.ui-help,body.ui-app #stock-check-results details.ui-help{margin:10px 0 16px;padding:0;border:0;color:var(--muted);font-size:13px;min-width:0}
body.ui-app details.ui-help>summary,body.ui-app #stock-check-results details.ui-help>summary{display:flex;align-items:flex-start;gap:8px;min-height:36px;padding:8px 0;cursor:pointer;list-style:none;font-weight:500;line-height:1.5;color:#526783;overflow-wrap:anywhere}
body.ui-app details.ui-help>summary::-webkit-details-marker{display:none}
body.ui-app details.ui-help>summary::before{content:'ⓘ';flex:0 0 auto;font-size:15px;line-height:1.3;color:#617a9b}
body.ui-app details.ui-help[open]>summary{color:#294e91}
body.ui-app details.ui-help>.ui-help-content{padding:12px 14px;border-left:2px solid #cbd8eb;background:#f7f9fc;border-radius:0 7px 7px 0;overflow-wrap:anywhere}
body.ui-app .subscription details.ui-help{margin:0}body.ui-app .subscription details.ui-help>summary{min-height:32px;padding:4px 0}
body.ui-app details.ui-help p{margin:0 0 8px}body.ui-app details.ui-help p:last-child{margin-bottom:0}
body.ui-app .settings-head{align-items:start;gap:16px}body.ui-app .settings-head>button{align-self:start;margin-top:27px}
body.ui-app .settings-table .ui-help{margin:4px 0 0;font-size:12px}body.ui-app .settings-table .ui-help>summary{min-height:32px;font-size:12px}
body.ui-app #bulk-editor td:first-child .check{white-space:nowrap}
body.ui-app #bulk-editor>.button{margin-bottom:16px}body.ui-app #bulk-count{font-weight:600}body.ui-app #bulk-confirmation h3{margin-top:0}
@media(max-width:1040px){body.ui-app .settings-head{grid-template-columns:minmax(0,1fr)}body.ui-app .settings-head>button{margin-top:0;justify-self:start}body.ui-app form.filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){body.ui-app{--ui-space:14px}body.ui-app .shell{padding:14px}body.ui-app h1{font-size:21px}body.ui-app section.loading{margin:14px}body.ui-app :is(input,select,textarea):not([type=checkbox]):not([type=hidden]){font-size:16px}body.ui-app .subscription{padding:12px 14px}body.ui-app form.filters{grid-template-columns:minmax(0,1fr)}body.ui-app :is(.settings-table,.paged-table,#bulk-editor table) td{padding:0}body.ui-app .settings-table tr{gap:12px}body.ui-app .top>.button{margin-top:12px}body.ui-app #editor-leave-dialog{padding:18px}body.ui-app .pagination button{flex:0 1 auto}body.ui-app .check-entry-main .check-entry-count{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){body.ui-app *,body.ui-app *::before{scroll-behavior:auto!important;transition:none!important}}

/* UI/UX candidate: calm workspace, compact rows and explicit stages. No data/control suppression. */
body.ui-app{--ui-space:16px;--ui-radius:8px;--ui-control-radius:6px;--bg:#f4f5f7}
body.ui-app .shell{padding:24px;max-width:1320px}
body.ui-app h1{font-size:22px;margin-bottom:8px}body.ui-app h2{font-size:16px}body.ui-app h3{font-size:16px}
body.ui-app .workspace-nav{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid var(--line);padding:0 0 16px;margin-bottom:16px}
body.ui-app :is(.workspace-nav a,.plan-text-link){display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;color:#244fba;text-decoration:underline;text-underline-offset:4px;font-weight:600;border-radius:6px}
body.ui-app .workspace-nav a:hover{background:#eaf0f6}
body.ui-app :is(#document-plan,#minimum-editor,#created-documents,#stock-check-history,#stock-check-detail,#stock-check-results,#plan-finance,#plan-positions){scroll-margin-top:16px}
/* Let a short final result scroll above host overlays. The finite cap prevents an autoheight/vh feedback loop. */
body.ui-app #stock-check-result-host:has(#stock-check-detail){padding-bottom:min(100vh,960px)}
body.ui-app .grid.metrics{gap:8px;margin:16px 0}body.ui-app .metric{padding:12px 16px}body.ui-app .metric strong{font-size:22px}
body.ui-app form.filters{grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:16px}
body.ui-app [data-plan-work]{margin-top:16px}
body.ui-app .plan-selection-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body.ui-app .plan-selection-actions>.button{margin-left:auto}
body.ui-app [data-picked]{font-size:14px;font-weight:600;margin:8px 0 16px}
body.ui-app .plan-finance{margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}
body.ui-app .plan-requisites{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:16px;margin-bottom:16px}
body.ui-app .plan-review{margin-top:16px;padding:16px;border:1px solid #cad6ee;border-radius:8px;background:#f8faff}
body.ui-app .plan-safety{font-size:13px;max-width:76ch}
body.ui-app .ui-field-help{font-size:13px;color:#526176;line-height:1.5}
body.ui-app .plan-table-viewport{max-height:600px;overflow:auto;overscroll-behavior:auto;border:1px solid var(--line);border-radius:6px;scroll-padding:8px}
body.ui-app [data-plan-table]{table-layout:fixed}
body.ui-app [data-plan-table] th:first-child{width:64px}
body.ui-app [data-plan-table] th:nth-child(2){width:46%}
body.ui-app [data-plan-table] :is(td,th){padding:8px;vertical-align:top}
body.ui-app .plan-product{display:block;font-weight:600;font-size:14px}
body.ui-app .plan-route{display:block;font-size:13px;margin-top:4px;overflow-wrap:anywhere}
body.ui-app .plan-row-ids{margin:0;font-size:13px;color:#526176}
body.ui-app .plan-row-ids summary{cursor:pointer;min-height:44px;display:flex;align-items:center;width:fit-content;text-decoration:underline;text-underline-offset:3px}
body.ui-app .plan-row-ids small{display:block;overflow-wrap:anywhere;padding-bottom:8px}
body.ui-app .plan-pick-target{display:flex;width:44px;height:44px;align-items:center;justify-content:center;cursor:pointer}
body.ui-app #document-plan input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:0}
body.ui-app .plan-zero{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;font-weight:400;line-height:1.3}
body.ui-app [data-plan-table] input[type=number]{text-align:right;font-variant-numeric:tabular-nums;padding:8px!important}
body.ui-app [data-plan-table] td>small{display:block;font-size:13px;text-align:right;margin-top:4px}
body.ui-app :is(th,td){padding:8px;font-variant-numeric:tabular-nums}
body.ui-app :is(.settings-table,[data-check-table]) td:nth-child(n+3){text-align:right}
body.ui-app .settings-table input{text-align:right}
body.ui-app .pagination{gap:8px;margin:8px 0;justify-content:space-between}
body.ui-app .pagination span{flex:1;text-align:center;min-width:0}
body.ui-app details.ui-help>summary,body.ui-app #stock-check-results details.ui-help>summary{min-height:44px;align-items:center}
body.ui-app details.ui-help>summary::before{content:'+';font-size:16px}
body.ui-app details.ui-help[open]>summary::before{content:'−'}
/* Keep range warnings visible without painting every row red. Retain zebra and all stronger states. */
body.ui-app table:not([role=presentation])>tbody>tr:where(.ui-below-min,.ui-above-max){--ui-row-state:initial}
@media(hover:hover){body.ui-app table:not([role=presentation])>tbody>tr:where(.ui-below-min:hover,.ui-above-max:hover){--ui-row-state:#eaf0f6}}
body.ui-app table:not([role=presentation])>tbody>tr:where(:focus-within){--ui-row-state:#e7eefc}
body.ui-app table:not([role=presentation])>tbody>tr:where(:has(input[type=checkbox]:checked),[aria-selected=true]){--ui-row-state:#dce8fc}
body.ui-app table:not([role=presentation])>tbody>tr:where(.error,[aria-invalid=true],:has([aria-invalid=true])){--ui-row-state:#fff0ef}
body.ui-app tr:is(.ui-below-min,.ui-above-max)>td:is([data-label^="Остаток"],[data-label="Текущий остаток"])::after{margin-left:auto;border:1px solid currentColor;padding:3px 6px}
@media(max-width:1040px){body.ui-app .plan-requisites{grid-template-columns:repeat(2,minmax(0,1fr))}body.ui-app form.filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){
 body.ui-app .shell{padding:8px}body.ui-app{--ui-space:12px}
 body.ui-app .workspace-nav{gap:4px;padding-bottom:8px}body.ui-app .workspace-nav a{padding:8px}
 body.ui-app .grid.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.ui-app .plan-requisites,body.ui-app form.filters{grid-template-columns:minmax(0,1fr)}
 body.ui-app .plan-selection-actions>.button{margin-left:0}
 body.ui-app .plan-table-viewport{max-height:560px}
 body.ui-app [data-plan-table],body.ui-app [data-plan-table] tbody{display:block;width:100%}
 body.ui-app [data-plan-table] tr{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(0,1fr);gap:8px;padding:8px;margin:0}
 body.ui-app [data-plan-table] td{padding:0;border:0}
 body.ui-app [data-plan-table] td:first-child{grid-column:1;grid-row:1}
 body.ui-app [data-plan-table] td:nth-child(2){grid-column:2 / 4;grid-row:1}
 body.ui-app [data-plan-table] td:nth-child(3){grid-column:1 / 3}
 body.ui-app [data-plan-table] td:nth-child(4){grid-column:3}
 body.ui-app [data-plan-table] td:nth-child(-n+2)::before{display:none}
 body.ui-app [data-plan-table] td::before{font-size:13px;margin-bottom:4px}
 body.ui-app .plan-row-ids summary{min-height:44px}
 body.ui-app .settings-table tr{padding:8px;gap:8px;margin:0}
 body.ui-app .settings-table td{padding:0}
 body.ui-app .pagination{flex-wrap:wrap}.ui-app [data-plan-pages] span{flex-basis:calc(100% - 200px)}
}

/* Visual review pass: remove repeated setup chrome from the working viewport. */
body.ui-app .panel:has(>.account-connected){display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:12px 16px}
body.ui-app .panel:has(>.account-connected)>h2{margin:0;font-size:14px}
body.ui-app .account-connected{padding:0;margin:0;border:0;background:transparent;font-size:13px}
body.ui-app .subscription{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
body.ui-app .subscription>p{margin:0}body.ui-app .subscription>details{margin-left:auto}
body.ui-app .plan-scroll-hint{font-size:13px;color:#526176;margin:8px 0}
body.ui-app .editor-table-viewport{max-height:600px;overflow:auto;border:1px solid var(--line);border-radius:6px;scroll-padding:8px}
body.ui-app #minimum-editor-panel{margin-top:16px}
body.ui-app #minimum-editor-panel details.ui-help{margin:4px 0 8px}
body.ui-app #minimum-editor-panel .settings-head{margin-bottom:16px}
@media(max-width:620px){body.ui-app .subscription>details{margin-left:0}body.ui-app .editor-table-viewport{max-height:560px}body.ui-app .settings-table input{padding:8px!important;font-size:14px!important}}

/* Focused polish 2: compact healthy chrome; real anchors, no hidden alerts. */
body.ui-app .shell{padding-top:16px}
body.ui-app .top{margin-bottom:8px;align-items:center}
body.ui-app .top>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
body.ui-app .top h1{margin:0}
body.ui-app .top .statusbar{margin:0}
body.ui-app .workspace-nav{gap:8px;padding-bottom:8px;margin-bottom:8px}
body.ui-app .workspace-nav a{border:1px solid #ced7e4;background:#fff;text-decoration:none;border-radius:6px;padding:8px 14px}
body.ui-app .workspace-nav a:hover{background:#eaf0f9;border-color:#9badca}
body.ui-app .panel:has(>.account-connected){padding:0 12px;gap:8px 12px;margin-bottom:8px!important;overflow:visible}
body.ui-app .account-identity{margin:0!important}
body.ui-app .account-identity>p{max-width:70ch;overflow-wrap:anywhere}
body.ui-app .subscription{padding:0 12px;margin-bottom:8px!important;min-height:44px}
body.ui-app .subscription>.error{flex-basis:100%}
body.ui-app .subscription details.ui-help>summary{min-height:44px}
body.ui-app .grid.metrics{display:flex;flex-wrap:wrap;gap:8px 20px;margin:8px 0}
body.ui-app .metric{display:flex;gap:6px;align-items:baseline;padding:4px 0;border:0;background:transparent}
body.ui-app .metric strong{font-size:15px}
body.ui-app #recommendation-filters{padding:12px}
body.ui-app #document-plan{margin-top:8px!important}
body.ui-app #document-plan>main>h2{margin:0 0 8px}
body.ui-app #document-plan>main>p:first-of-type{margin:8px 0;font-size:13px}
body.ui-app [data-plan-status]:empty{margin:0}
body.ui-app [data-plan-work]{margin-top:8px}
body.ui-app [data-picked]{margin:8px 0}
@media(max-width:620px){body.ui-app .workspace-nav{gap:6px}body.ui-app .workspace-nav a{padding:8px 10px}body.ui-app .grid.metrics{gap:4px 16px}body.ui-app .top>div{gap:8px}}

body.ui-app .plan-positions-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
body.ui-app .plan-positions-head>h3{margin:0}
body.ui-app .plan-positions-head>details{margin:0!important}
body.ui-app #document-plan [data-plan-status]{margin:6px 0}
body.ui-app #recommendation-filters>h2{margin:0 0 8px}

@media(min-width:1041px){body.ui-app .workspace-account-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}}

body.ui-app .plan-requisites{align-items:start}

/* Document preview/result cards only. */
#document-plan .plan-document h4{margin:0 0 8px;font-size:16px}
#document-plan .plan-document-status{margin:0 0 12px;font-weight:600}
#document-plan .plan-document-facts{display:flex;flex-wrap:wrap;gap:4px 20px;margin-bottom:12px}
#document-plan .plan-document-facts p{margin:0;overflow-wrap:anywhere}
#document-plan .plan-document-items{list-style:none;padding:0;margin:12px 0}
#document-plan .plan-document-items li{padding:10px 12px;background:#fff;overflow-wrap:anywhere}
#document-plan .plan-document-items li:nth-child(even){background:#f0f2f5}
#document-plan .plan-document-items li:hover{background:#e9eef7}
#document-plan .plan-document-items strong{margin:0 0 4px}
#document-plan .plan-document-total{font-weight:600}
#document-plan .plan-document-technical{margin-top:12px;color:var(--muted)}
#document-plan .plan-document-technical summary{cursor:pointer}
#document-plan .plan-document-technical pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}

/* Quality9: one restrained visual language for the embedded working app. */
body.ui-app{--blue:#2854c5;--text:#243246;--muted:#526176;--line:#dce3ec;--bg:#f3f5f8;--ui-radius:10px}
body.ui-app .top h1{font-size:23px;letter-spacing:-.5px}
body.ui-app h2{font-size:18px;letter-spacing:-.2px}
body.ui-app .workspace-nav a[aria-current=location]{background:#e9efff;border-color:#9bb2e6;color:#2347a3;box-shadow:inset 0 -2px #2854c5}
body.ui-app .panel{box-shadow:0 1px 2px #24324605}
body.ui-app .plan-positions-head h3,body.ui-app .plan-finance h3,body.ui-app .plan-review h3{font-size:16px;letter-spacing:-.15px}
body.ui-app [data-plan-results]:not(:empty){margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
body.ui-app #document-plan .plan-document{background:#fff;border:1px solid #d5deeb;border-left:3px solid #839cca;border-radius:10px;padding:18px;margin:14px 0}
body.ui-app #document-plan .plan-document h4{font-size:17px;letter-spacing:-.2px;margin-bottom:10px}
body.ui-app #document-plan .plan-document-status{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border-radius:6px;background:#edf2fc;color:#304f8c;font-size:13px;margin:0 0 14px}
body.ui-app #document-plan .plan-document[data-state=created]{border-left-color:#398062}
body.ui-app #document-plan .plan-document[data-state=created] .plan-document-status{background:#edf7f0;color:#27654b}
body.ui-app #document-plan .plan-document:is([data-state=unknown],[data-state=sending]){border-left-color:#b43e37}
body.ui-app #document-plan .plan-document[data-state=not_sent] .plan-document-status{background:#f1f3f6;color:#526176}
body.ui-app #document-plan .plan-document-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 20px;padding-bottom:12px;border-bottom:1px solid #e5eaf1;font-size:13px}
body.ui-app #document-plan .plan-document-items{border:1px solid #e0e6ef;border-radius:7px;overflow:hidden}
body.ui-app #document-plan .plan-document-items li{padding:12px 14px}
body.ui-app #document-plan .plan-document-items strong{display:block;font-size:14px}
body.ui-app #document-plan .plan-item-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 16px;font-size:13px;font-variant-numeric:tabular-nums}
body.ui-app #document-plan .plan-document-total{font-size:15px;margin:14px 0 6px;font-variant-numeric:tabular-nums}
body.ui-app #document-plan .plan-document-technical{margin-top:4px;font-size:13px}
body.ui-app #document-plan .plan-document-technical summary{min-height:44px;padding:12px 0;width:fit-content}
body.ui-app #document-plan .plan-document-technical pre{padding:12px;border:1px solid var(--line);border-radius:6px;background:#f6f8fb}
body.ui-app #document-plan .plan-cause{font-size:13px;color:#8b302c;margin:12px 0}
body.ui-app #document-plan .plan-confirmation{display:flex;align-items:flex-start;gap:12px;max-width:90ch;padding:16px;background:#f4f7fe;border:1px solid #cedaf3;border-radius:8px;line-height:1.6;margin:20px 0 12px;cursor:pointer}
body.ui-app #document-plan .plan-confirmation input{margin-top:3px}
body.ui-app #document-plan .plan-history-list{display:grid;gap:10px}
body.ui-app #document-plan .plan-history-list button{justify-content:space-between;text-align:left}
body.ui-app :is(.error,.notice){border-left-width:3px}
body.ui-app [aria-invalid=true]{border-color:#b43e37!important;outline:2px solid #f4ccc8;outline-offset:1px}
body.ui-app .plan-requisites input[readonly]{background:#f1f5fb;border-style:dashed;color:#344b70}
body.ui-app #document-plan .plan-pick-target:has(input:disabled){cursor:not-allowed}
body.ui-app #minimum-editor-panel .settings-head{gap:12px}
body.ui-app #minimum-editor-panel .settings-head .field-help{margin-top:0}
body.ui-app #created-documents [data-doc-controls]{padding:12px;background:#f6f8fb;border:1px solid var(--line);border-radius:8px;margin:12px 0}
@media(max-width:1040px){body.ui-app #document-plan .plan-document-facts{grid-template-columns:repeat(2,minmax(0,1fr))}body.ui-app #document-plan .plan-item-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){
 body.ui-app .top h1{font-size:21px}
 body.ui-app #document-plan .plan-document{padding:12px;border-radius:8px}
 body.ui-app #document-plan .plan-document h4{font-size:16px}
 body.ui-app #document-plan .plan-document-facts{grid-template-columns:minmax(0,1fr);gap:6px}
 body.ui-app #document-plan .plan-item-metrics{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
 body.ui-app #document-plan .plan-document-items li{padding:10px}
 body.ui-app #document-plan .plan-confirmation{padding:12px}
 body.ui-app #document-plan [data-confirm]{width:100%}
 body.ui-app .plan-finance{margin-top:20px;padding-top:20px}
 body.ui-app .plan-review{padding:12px}
 body.ui-app #minimum-editor-panel .settings-head{gap:8px}
}

/* Parent review iteration4: compact chooser chrome, never hide errors. */
body.ui-app .plan-toolbar{display:flex;flex-wrap:wrap;gap:6px}
body.ui-app .plan-toolbar button{padding:8px 10px;font-size:13px}
body.ui-app .plan-selection-actions{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
body.ui-app .plan-selection-actions :is(button,a){min-height:44px;padding:8px;font-size:13px;white-space:nowrap}
body.ui-app .plan-page-stack{flex:1;min-width:0;text-align:center;line-height:1.4}
body.ui-app .plan-page-stack [data-picked]{margin:0;font-size:13px}
body.ui-app [data-plan-range]{font-size:12px}
body.ui-app [data-plan-pages]{flex-wrap:nowrap}
body.ui-app [data-plan-pages] button{padding:8px;font-size:13px}
body.ui-app #document-plan [data-plan-status]:empty{margin:0}
body.ui-app .plan-positions>details.ui-help{margin:8px 0 0}
@media(max-width:620px){body.ui-app [data-plan-pages]>span{flex-basis:auto}body.ui-app .plan-positions-head{margin-bottom:4px}}

/* Release quality: document flow and evidence have distinct hierarchy. */
body.ui-app .plan-flow{font-size:12px;font-weight:600;letter-spacing:.02em;color:#526176;margin:0 0 8px}
body.ui-app #document-plan .plan-provider-total{font-size:19px;font-weight:650;font-variant-numeric:tabular-nums;color:#27654b;margin:16px 0 4px;padding-top:12px;border-top:1px solid var(--line)}
body.ui-app #document-plan .plan-document[data-state=created_unverified]{border-left-color:#956714}
body.ui-app #document-plan .plan-document-items li:nth-child(even of :not([hidden])){background:#f3f5f7}
body.ui-app #document-plan .plan-document-items li:nth-child(odd of :not([hidden])){background:#fff}
@media(hover:hover){body.ui-app #document-plan .plan-document-items li:not([hidden]):hover{background:#eaf0f6}}
body.ui-app #document-plan [data-plan-back]{margin-top:12px}
body.ui-app #document-plan .plan-document>a{display:inline-flex;align-items:center;min-height:44px;padding:6px 0;font-weight:600;text-underline-offset:3px}
body.ui-app #created-documents [data-doc-controls]>label{min-width:0;flex:1 1 210px}
body.ui-app #created-documents [data-doc-controls] select{width:100%}
body.ui-app #created-documents td small{display:block;margin-top:6px;font-weight:400}
body.ui-app #document-plan [data-plan-results]{scroll-margin-top:16px}
@media(max-width:620px){
 body.ui-app #document-plan .plan-document-total{font-size:14px}
 body.ui-app #document-plan .plan-provider-total{font-size:18px}
 body.ui-app #created-documents [data-doc-controls]>label{flex-basis:100%}
 body.ui-app #created-documents [data-doc-refresh]{width:100%}
 body.ui-app #document-plan .plan-selection-actions :is(button,a){white-space:normal}
}

/* Tablet norms: six cramped columns become two readable rows, with the same inputs. */
@media(min-width:621px) and (max-width:1040px){
 body.ui-app .settings-table,body.ui-app .settings-table tbody{display:block;width:100%}
 body.ui-app .settings-table thead{display:none}
 body.ui-app .settings-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:12px;border-bottom:1px solid var(--line)}
 body.ui-app .settings-table td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
 body.ui-app .settings-table td::before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
 body.ui-app .settings-table input{width:100%;min-width:0}
}
@media(max-width:620px){
 /* Full-width summary avoids letter-by-letter wrapping between pager buttons. */
 body.ui-app .pagination:not([data-plan-pages])>span{flex:1 0 100%;order:-1;text-align:center}
}

@media(max-width:900px){
 /* Status gets a full line; supplier names and warnings must not become narrow columns. */
 body.ui-app #created-documents table,body.ui-app #created-documents tbody{display:block;width:100%}
 body.ui-app #created-documents thead{display:none}
 body.ui-app #created-documents tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px;border-bottom:1px solid var(--line)}
 body.ui-app #created-documents td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
 body.ui-app #created-documents td::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;color:var(--muted);margin-bottom:4px}
 body.ui-app #created-documents td:nth-child(3){grid-column:1 / -1;grid-row:2}
 body.ui-app #created-documents td:nth-child(4){grid-column:1;grid-row:3}
 body.ui-app #created-documents td:nth-child(5){grid-column:2;grid-row:3}
}

/* UX 2026-09-14: searchable full snapshot; local filters never hide selected-count context. */
body.ui-app .plan-search-controls{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:8px 16px;align-items:end;margin:8px 0}
body.ui-app .plan-search-controls>label:first-child{display:grid;gap:4px}
body.ui-app .plan-search-controls input[type=search]{width:100%;font-size:16px}
body.ui-app .plan-selected-filter{display:flex;align-items:center;min-height:44px;cursor:pointer;font-weight:500}
body.ui-app #plan-search-help{grid-column:1/-1;margin:0;font-size:12px;font-weight:400}
body.ui-app .plan-reload-warning>strong{display:block}
body.ui-app .plan-reload-warning button{margin:4px 8px 0 0}
body.ui-app #document-plan [data-picked]{font-weight:600}
@media(max-width:620px){
 body.ui-app .plan-search-controls{grid-template-columns:minmax(0,1fr);gap:6px}
 body.ui-app .plan-search-controls>button{justify-self:start}
 body.ui-app .plan-reload-warning button{width:100%;margin:6px 0 0}
}

/* Search is an explicit disclosure: optional controls must not push the first mobile item below the task. */
body.ui-app .plan-search-disclosure{margin:0;border:1px solid var(--line);border-radius:6px;padding:0 10px;background:#fafbfd}
body.ui-app .plan-search-disclosure>summary{min-height:44px;padding:11px 0;font-weight:600;color:#38558a;cursor:pointer}
body.ui-app .plan-search-disclosure[open]{padding-bottom:10px}
@media(max-width:620px){
 body.ui-app .plan-search-controls{grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
 body.ui-app .plan-search-controls>label:first-child{grid-column:1/-1}
 body.ui-app .plan-search-controls>button{justify-self:end}
 body.ui-app .plan-selected-filter{min-width:0}
}

/* Adjacent margins collapse to the pager margin (8px); preserve 44px controls, use a 6px mobile gap. */
@media(max-width:620px){body.ui-app [data-plan-pages]{margin-block:6px}}

/* UI review 2026-09-15: clear document actions, readable history, no hidden safety constraints. */
body.ui-app .ui-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body.ui-app .ui-document-link{gap:8px;min-height:44px}
body.ui-app #document-plan .plan-document>a.ui-document-link{padding:10px 14px;margin-top:12px}
body.ui-app #created-documents .doc-intro{margin:0 0 4px;color:var(--muted);max-width:90ch}
body.ui-app #created-documents .doc-history-help{margin:0 0 12px}
body.ui-app #created-documents .doc-table{width:100%;table-layout:fixed;border-collapse:collapse}
body.ui-app #created-documents th:nth-child(1){width:15%}
body.ui-app #created-documents th:nth-child(2){width:15%}
body.ui-app #created-documents th:nth-child(3){width:36%}
body.ui-app #created-documents th:nth-child(4){width:12%}
body.ui-app #created-documents th:nth-child(5){width:22%}
body.ui-app #created-documents :is(td,th){padding:14px 12px;vertical-align:top;text-align:left;word-break:normal}
body.ui-app #created-documents .doc-date{display:block;white-space:nowrap;font-variant-numeric:tabular-nums}
body.ui-app #created-documents .doc-date small{margin-top:2px}
body.ui-app #created-documents .doc-number{font-weight:600;overflow-wrap:anywhere}
body.ui-app #created-documents .doc-muted{color:var(--muted);font-weight:400;font-size:13px}
body.ui-app #created-documents .doc-status{display:inline-block;padding:4px 8px;border:1px solid #dce3ec;border-radius:6px;font-size:13px;font-weight:600;line-height:1.5;background:#f1f3f6;color:#526176}
body.ui-app #created-documents .doc-status--success{color:#27654b;background:#edf7f0;border-color:#c5dfd0}
body.ui-app #created-documents .doc-status--warning{color:#80541c;background:#fff6e4;border-color:#e9d3a9}
body.ui-app #created-documents .doc-safety{margin:8px 0 0;font-size:13px;font-weight:500;color:#8b302c;max-width:46ch}
body.ui-app #created-documents .doc-diagnostic{font-size:13px;color:var(--muted);margin-top:4px}
body.ui-app #created-documents .doc-diagnostic>summary{display:list-item;cursor:pointer;padding:10px 0;min-height:44px;width:fit-content;color:#38558a}
body.ui-app #created-documents .doc-diagnostic>p{margin:0 0 8px;padding:10px 12px;border-left:2px solid #cbd8e5;background:#f7f9fc;overflow-wrap:anywhere;line-height:1.6}
body.ui-app #created-documents .doc-actions :is(a,button){width:100%;max-width:230px;text-align:center}
body.ui-app #created-documents .doc-actions small{font-size:12px;line-height:1.5}
body.ui-app #created-documents [data-doc-message]{margin:12px 0}
@media(min-width:901px) and (max-width:1100px){
 body.ui-app #created-documents :is(td,th){padding:12px 8px}
 body.ui-app #created-documents th:nth-child(3){width:33%}
 body.ui-app #created-documents th:nth-child(5){width:25%}
}
@media(max-width:900px){
 body.ui-app #created-documents tbody tr{gap:12px 16px;padding:16px 12px}
 body.ui-app #created-documents td{padding:0}
 body.ui-app #created-documents td:nth-child(4){grid-column:1;grid-row:3}
 body.ui-app #created-documents td:nth-child(5){grid-column:1 / -1;grid-row:4}
 body.ui-app #created-documents .doc-actions :is(a,button){width:auto;min-width:190px}
 body.ui-app #created-documents .doc-actions::before{display:none}
 body.ui-app #created-documents .doc-state::before{margin-bottom:6px}
}
@media(max-width:620px){
 body.ui-app #created-documents .doc-actions :is(a,button){width:100%;max-width:none;min-width:0}
 body.ui-app #created-documents .doc-actions small{text-align:center}
 body.ui-app #document-plan .plan-document>a.ui-document-link{width:100%}
}

body.ui-app #document-plan .plan-document-number{font-size:14px;font-weight:600;margin:16px 0 0}
body.ui-app #document-plan .plan-document[data-financial-state=unverified]{border-left-color:#956714}
body.ui-app #document-plan .plan-document[data-financial-state=unverified] .plan-document-status{background:#fff6e4;color:#80541c}

/* Matching account/subscription cards; full-width native disclosures, no clipped expiry. */
body.ui-app .workspace-account-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch;margin-bottom:8px}
body.ui-app .workspace-account-row>.panel{margin:0!important;background:#fff;padding:10px 14px;min-width:0}
body.ui-app .workspace-account-row>.panel:has(>.account-connected){display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start;gap:0 12px}
body.ui-app .workspace-account-row>.panel>h2{font-size:13px;line-height:22px;margin:0;grid-column:1;grid-row:1}
body.ui-app .workspace-account-row .account-connected{font-size:13px;line-height:22px;grid-column:2;grid-row:1;padding:0;margin:0}
body.ui-app .workspace-account-row .account-identity{grid-column:1 / -1;grid-row:2;align-self:end;width:100%}
body.ui-app .workspace-account-row>.subscription{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;gap:0;align-items:start}
body.ui-app .subscription-overview{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 10px;min-width:0;font-size:13px;line-height:22px}
body.ui-app .subscription-overview>strong{font-weight:650}
body.ui-app .subscription-state{color:var(--text)}
body.ui-app .subscription-term{color:var(--muted);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body.ui-app .workspace-account-row .subscription>details{margin:0!important;width:100%;align-self:end}
body.ui-app .workspace-account-row details.ui-help>summary{min-height:44px;padding:10px 0;line-height:22px}
body.ui-app .workspace-account-row details.ui-help>.ui-help-content{margin:0 0 4px;max-width:100%}
@media(max-width:900px){body.ui-app .workspace-account-row{grid-template-columns:minmax(0,1fr)}body.ui-app .workspace-account-row>.panel{padding:10px 12px}}
@media(max-width:380px){body.ui-app .workspace-account-row>.panel:has(>.account-connected){grid-template-columns:minmax(0,1fr)}body.ui-app .workspace-account-row .account-connected{grid-column:1;grid-row:2}body.ui-app .workspace-account-row .account-identity{grid-row:3}}
/* Expanded details must not turn the unrelated status card into an empty tall panel. */
body.ui-app .workspace-account-row:has(details[open]){align-items:start}
/* Journal actions: neutral until explicit confirmation; confirmations stay inside visible iframe. */
body.ui-app .history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px}
body.ui-app .history-heading h3{margin:0}
body.ui-app .history-actions{display:flex;flex-wrap:wrap;gap:8px}
body.ui-app #history-tools-message:empty{display:none}
body.ui-app #history-clear-dialog{box-sizing:border-box;max-width:calc(100% - 28px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:12px;color:var(--text);background:#fff;box-shadow:0 18px 60px #18212f30}
body.ui-app #history-clear-dialog::backdrop{background:#15223566}
body.ui-app #history-clear-dialog h3{margin:0 0 12px}
body.ui-app #history-clear-dialog button{min-height:44px}
body.ui-app #history-clear-dialog [data-history-confirm]{--control-bg:#a52c28;--control-border:#a52c28;--control-fg:#fff}
@media(max-width:620px){body.ui-app .history-actions{width:100%}body.ui-app .history-actions button{flex:1 1 150px}body.ui-app #history-clear-dialog{padding:18px}}

body.ui-app #stock-history-list>.pagination:has(+.history-compact){display:none}

/* A single native sorter replaces six table-header buttons on narrow result screens. */
body.ui-app .check-mobile-sort{display:none}
@media(max-width:620px){body.ui-app .check-mobile-sort{display:block}body.ui-app #stock-check-detail [data-check-table] thead{display:none!important}}

/* UX20262: compact tables and meaningful section hierarchy; no controls or safety warnings suppressed. */
body.ui-app .workspace-nav-group{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
body.ui-app .workspace-nav-group+.workspace-nav-group{border-left:1px solid var(--line);padding-left:12px;margin-left:4px}
body.ui-app .workspace-nav-caption{font-size:12px;color:var(--muted);margin-right:4px}
body.ui-app .workspace-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px;min-width:0}
body.ui-app .workspace-section-heading :is(h2,h3){margin:0;flex:1 1 220px}
body.ui-app .workspace-section-jump{width:205px;font-size:13px!important;flex:0 1 205px}
body.ui-app .history-heading>.workspace-section-heading{flex:1 1 330px;margin:0}
body.ui-app .editor-tools{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
body.ui-app #minimum-editor-panel[data-identifiers=hidden] .settings-table details.ui-help{display:none}
body.ui-app #minimum-editor-panel .settings-table td{padding:8px 10px;vertical-align:middle}
body.ui-app #minimum-editor-panel .settings-table input{min-height:44px!important}
body.ui-app #minimum-editor-panel .settings-table tr:is(.ui-below-min,.ui-above-max)>td[data-label="Текущий остаток"]::after{font-size:12px;line-height:1.25;padding:2px 4px;margin-top:3px}
body.ui-app [data-page-table="Рекомендации"] td{padding:10px;vertical-align:middle;line-height:1.45}
body.ui-app [data-page-table="Рекомендации"] tr>td[data-label^="Остаток"]::after{display:none}
body.ui-app [data-page-table="Рекомендации"] .recommendation-action{font-weight:600;color:#294a7b}
body.ui-app [data-page-table="Рекомендации"] td:last-child{color:var(--muted);font-size:13px}
body.ui-app #document-plan .plan-result-summary{display:grid;gap:8px;padding:12px 14px;margin:0 0 14px;background:#f5f8fc;border:1px solid var(--line);border-radius:7px}
body.ui-app #document-plan .plan-result-summary>p{margin:0}
body.ui-app #document-plan .plan-result-summary>.ui-document-link{justify-self:start}
body.ui-app #document-plan .plan-result-summary .plan-provider-total{font-size:19px;font-weight:650;line-height:1.4}
body.ui-app #document-plan .plan-result-summary .plan-provider-authority{font-size:13px;color:var(--muted)}
body.ui-app #document-plan .plan-document-facts>p{margin:0}
body.ui-app #document-plan .plan-composition-title{font-size:14px;font-weight:650;margin:16px 0 8px}
body.ui-app #document-plan .plan-document-items{margin-top:0}
body.ui-app #document-plan .plan-document-total{padding:10px 12px;background:#f6f7f9;border-radius:6px;font-size:14px}
body.ui-app #stock-check-results .stock-slot{padding:10px 12px;margin:0;gap:10px}
body.ui-app #stock-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:850px}
body.ui-app #stock-check-results .stock-slot label{flex:1 1 120px}
body.ui-app #stock-check-results .stock-slot input{width:100%}
body.ui-app #stock-check-results .check-group{margin-top:20px;padding-top:20px}
body.ui-app #stock-check-results .email-toggle{padding:12px;gap:12px;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;max-width:850px}
body.ui-app #stock-check-results .email-toggle .form-actions{margin:0}
body.ui-app #stock-check-results .email-add{margin:16px 0}
body.ui-app #stock-check-results .email-unavailable strong{display:block;margin-bottom:4px}
body.ui-app #bulk-editor :is(.panel,section){scroll-margin-top:12px}
body.ui-app #bulk-confirmation{padding:14px}
body.ui-app #bulk-confirmation h3{margin:0 0 8px}
body.ui-app #bulk-confirmation p{margin:8px 0}
@media(max-width:1040px){body.ui-app #stock-slots{grid-template-columns:minmax(0,1fr);max-width:600px}}
@media(max-width:620px){
 body.ui-app .workspace-nav-group{width:100%;gap:6px}
 body.ui-app .workspace-nav-group+.workspace-nav-group{border-left:0;padding-left:0;margin-left:0}
 body.ui-app .workspace-nav-caption{min-width:65px}
 body.ui-app .workspace-section-heading{gap:8px}
 body.ui-app .workspace-section-heading :is(h2,h3){flex-basis:100%}
 body.ui-app .workspace-section-jump{flex:1 1 100%;width:100%;font-size:16px!important}
 body.ui-app #minimum-editor-panel .settings-table td{padding:0}
 body.ui-app #minimum-editor-panel .settings-table tr{gap:8px;padding:10px}
 body.ui-app [data-page-table="Рекомендации"] td{padding:0}
 body.ui-app [data-page-table="Рекомендации"] tr{padding:10px;gap:8px}
 body.ui-app [data-page-table="Рекомендации"] td:last-child{grid-column:1 / -1}
 body.ui-app #document-plan .plan-result-summary{padding:10px}
 body.ui-app #bulk-editor :is(.panel,section){padding:12px}
 body.ui-app #bulk-editor .field-help{margin:6px 0 10px}
}

body.ui-app #bulk-form .bulk-value-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(88px,.7fr);gap:8px;align-items:start}
body.ui-app #bulk-form .bulk-value-field>span{grid-column:1 / -1}
body.ui-app #bulk-form .bulk-value-field input{text-align:right}

/* Mobile workspace: visible section names with two compact, keyboard-native groups. */
@media(max-width:620px){
 body.ui-app .workspace-nav-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 body.ui-app .workspace-nav-group+.workspace-nav-group{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.ui-app .workspace-nav-caption{grid-column:1/-1;min-width:0;margin:0}
 body.ui-app .workspace-nav a{min-width:0;justify-content:center;text-align:center;padding:8px!important;font-size:13px}
}
