/* Shared alignment contract: peer components share dimensions; spacing belongs to containers. */
:root{--layout-gap:16px;--action-gap:12px;--compact-gap:8px;--panel-inset:24px;--compact-control:32px}
.compact-filter-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--compact-gap)}
.compact-filter-row>.field{flex:0 1 224px;max-width:100%;margin:0}
.compact-filter-row>.checkbox{display:flex;align-items:center;gap:8px;min-height:44px;flex:none;margin:0}
.compact-filter-row>.knowledge-actions{display:grid;grid-template-columns:repeat(2,96px);gap:var(--action-gap);flex:none}
.compact-filter-row>.knowledge-actions>.btn{width:96px;min-width:96px;height:44px;min-height:44px;padding-inline:8px}
.grid,.content-grid{align-items:stretch;gap:24px}
.grid>.panel,.content-grid>.panel{margin:0;display:flex;flex-direction:column}
.panel-head{min-height:76px;padding:20px var(--panel-inset)}
.panel-body{padding:var(--panel-inset);display:flex;flex-direction:column;align-items:stretch;gap:var(--layout-gap);flex:1;min-width:0}
.panel-body>*{margin-block:0}
.panel-body>.btn{align-self:flex-start}
.panel-body>.side-note{padding-top:16px}
.panel-body:empty{display:none}
.field{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.field :is(input:not([type=checkbox]):not([type=radio]),select){height:44px;min-height:44px;flex:none}
/* File selection is shared by table import, the Excel library and materials. */
:root{--file-button-height:36px;--file-button-radius:8px;--file-button-width:144px}
:root input[type=file]:not(.excel-file-input){height:54px;padding:8px;font:inherit;color:var(--color-text-secondary,#56575c);border-radius:10px;max-width:100%;min-width:0}
:root input[type=file]:not(.excel-file-input)::file-selector-button{height:var(--file-button-height);margin:0 12px 0 0;padding:0 16px;min-width:var(--file-button-width);font:inherit;font-weight:500;color:var(--color-text,#303238);background:#fff;border:1px solid var(--color-line,#e0ddd8);border-radius:var(--file-button-radius);cursor:pointer;transition:background .15s,border-color .15s}
:root input[type=file]:not(.excel-file-input):not(:disabled)::file-selector-button:hover,.excel-file-picker:not(.is-disabled):hover .btn{background:#fff1e8;border-color:#b94320}
:root input[type=file]:disabled::file-selector-button{cursor:default;opacity:.55}
.field textarea{min-height:110px}
.btn{min-height:44px;line-height:20px;padding:11px 16px;overflow-wrap:anywhere}
.btn.small{min-height:36px;padding:7px 12px}
.row,.toolbar,.modal-actions,.report-bar,.product-tools{gap:var(--action-gap)}
/* Only peer action groups become equal columns; metadata rows retain their layout. */
.action-group,.row:has(>.btn):not(:has(>:not(.btn))),.modal-actions{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;align-items:stretch;gap:var(--action-gap)}
.action-group>.btn,.row:has(>.btn):not(:has(>:not(.btn)))>.btn,.modal-actions>.btn{width:100%;height:100%;min-width:0}
.action-group{margin-top:16px}
.modal-actions{padding:20px 24px}
.panel-body>.action-group{align-self:flex-start;margin:0}
.panel-head>.btn{flex-shrink:0}
.segmented{padding:8px;gap:8px;display:grid;grid-auto-flow:column;grid-auto-columns:1fr}
.segmented :is(button,a){min-height:36px;display:flex;align-items:center;justify-content:center;text-align:center}
.comment>:is(.btn,.row),.ai-answer>.btn,.ws-inspector-empty>.ws-button{margin-top:12px}
.comment>.btn+.btn{margin-left:12px}
.top-controls{gap:8px}.top-controls select{height:32px;min-height:32px}
.topbar{padding-block:8px;min-height:54px}
.sidebar-toggle{min-height:44px}.sidebar .nav-link{margin-block:8px}
.workspace-page{height:calc(100dvh - 54px)}
.workspace-page .ws-commandbar>.ws-actions{padding:8px;gap:8px;max-width:calc(100% - 24px)}
.ws-button{min-height:32px;padding:7px 10px;line-height:16px;box-sizing:border-box}
.ws-commandbar .ws-button{height:32px;min-height:32px}
.ws-commandbar>.ws-actions:first-child>.ws-button:first-child{padding:7px 10px;border:1px solid transparent}
.ws-commandbar .ws-button:not([aria-label]){width:112px;min-width:112px;flex:none}.ws-commandbar>.ws-actions:first-child .ws-button:not([aria-label]){width:88px;min-width:88px}
.ws-commandbar .ws-button[aria-label]{width:32px;min-width:32px;padding:0}
.ws-actions{gap:8px}
.ws-zoom{height:32px;min-width:40px}
.ws-pages{padding:8px 16px;gap:8px;min-height:48px}
.ws-pages .ws-button{min-height:32px;padding:7px 10px}
.ws-formulabar{height:48px;padding:8px 16px;gap:8px}
.ws-formulabar .ws-button{height:32px;min-height:32px;padding:7px 10px}
#workspace-editor .ws-formulabar input{height:32px;min-height:32px}
.workspace-page .ws-commandbar>.ws-actions:first-child{top:108px}
.workspace-page .ws-editor:has(.ws-formulabar.is-empty) .ws-commandbar>.ws-actions:first-child{top:60px}
.workspace-page .ws-editor.ws-board .ws-commandbar>.ws-actions:first-child{top:108px}
.ws-properties .ws-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;gap:8px;margin:12px 0 16px}
.ws-properties .ws-actions .ws-button{width:100%;height:100%;white-space:normal;min-height:40px}
.ws-table-footer{padding:8px 40px 8px 12px;gap:8px;flex-wrap:wrap;min-height:49px}
.ws-table-footer .ws-actions{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px;flex:1 1 240px}
.ws-table-footer .ws-button{width:100%;min-height:32px;padding:7px 8px;white-space:nowrap}
.ws-object-resize{right:8px;bottom:8px}
.ws-canvas-empty .ws-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ws-canvas-empty .ws-actions>.ws-button{min-height:44px;height:100%;padding:10px;white-space:normal}
.ws-context-menu{padding:8px;display:flex;flex-direction:column;gap:8px}
.ws-context-menu button{min-height:64px;flex-shrink:0}
.ws-context-menu hr{margin:0 4px;flex-shrink:0}
@media(max-width:900px){.grid,.content-grid{gap:20px}.workspace-page{height:calc(100dvh - 54px)}}
@media(max-width:700px){.topbar{min-height:86px}.workspace-page{height:calc(100dvh - 86px)}}
@media(max-width:600px){.panel-head,.panel-body{padding:20px}.action-group,.row:has(>.btn):not(:has(>:not(.btn))){grid-auto-flow:row;grid-template-columns:1fr;width:100%}.modal-actions{padding:16px;grid-auto-flow:row;grid-template-columns:1fr}.panel-head>.btn{max-width:100%}.ws-canvas-empty .ws-actions{grid-template-columns:1fr}}

/* Keep floating navigation outside the properties and object panels. */
.workspace-page .ws-editor:not(.inspector-hidden) .ws-commandbar>.ws-actions:last-child{right:250px;max-width:calc(100% - 274px)}
.workspace-page .ws-editor:not(.objects-hidden) .ws-commandbar>.ws-actions:first-child{left:180px;max-width:calc(100% - 192px)}
@media(max-width:900px){.workspace-page .ws-editor:not(.inspector-hidden) .ws-commandbar>.ws-actions:last-child{right:232px;max-width:calc(100% - 244px)}.workspace-page .ws-editor:not(.objects-hidden) .ws-commandbar>.ws-actions:first-child{left:162px;max-width:calc(100% - 174px)}}
@media(max-width:600px){.workspace-page .ws-editor:not(.inspector-hidden) .ws-commandbar>.ws-actions:last-child{right:242px;max-width:calc(100% - 254px)}}

/* Navigation is a fixed icon rail. Expansion only reveals labels to its right. */
.sidebar,.nav-collapsed .sidebar{padding:16px 8px 12px;overflow:hidden}
.sidebar #navigation{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin}

.product-bar .compact-tabs{overflow-x:auto;white-space:nowrap;flex-wrap:nowrap}
.product-bar .compact-tabs>a{flex:none}
.product-section{min-width:0;width:100%}
.ws-note[data-note-color="yellow"],.sticky-swatch[data-note-color="yellow"]{background:#fff5bd;border-color:#e8d680}
.ws-note[data-note-color="red"],.sticky-swatch[data-note-color="red"]{background:#ffe1dc;border-color:#eab1a6}
.ws-note[data-note-color="green"],.sticky-swatch[data-note-color="green"]{background:#e1f1dc;border-color:#b6d2ab}
.ws-note[data-note-color="blue"],.sticky-swatch[data-note-color="blue"]{background:#dfedff;border-color:#adc9e9}
.ws-note[data-note-color="purple"],.sticky-swatch[data-note-color="purple"]{background:#eee1fa;border-color:#cdb4e0}
.ws-note[data-note-color="gray"],.sticky-swatch[data-note-color="gray"]{background:#eeece9;border-color:#cec9c1}
.ws-note{border-radius:8px;overflow-wrap:anywhere;z-index:5}
.ws-note:focus{outline:3px solid #b74322;outline-offset:4px}
.ws-note .sticky-heading,.ws-note footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ws-note .sticky-heading small,.sticky-author{font-size:var(--font-caption)}
.ws-note footer{margin-top:16px}
.sticky-palette{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;border:1px solid var(--color-line);border-radius:8px}
.sticky-palette label{display:flex;align-items:center;gap:8px;min-height:36px;cursor:pointer}
.sticky-palette input,.sticky-people input{width:16px;height:16px;flex:none}
.sticky-swatch{display:inline-block;width:20px;height:20px;flex:none;border:1px solid;border-radius:4px;vertical-align:middle}
.sticky-legend-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sticky-legend-fields .field>span{display:flex;gap:8px;align-items:center}
.sticky-people{display:grid;gap:8px;max-height:190px;overflow:auto;border:1px solid var(--color-line);padding:16px;border-radius:8px}
.sticky-people label{display:flex;align-items:center;gap:12px;min-height:36px;cursor:pointer}
.sticky-people label[hidden]{display:none}
@media(max-width:600px){.sticky-palette{grid-template-columns:repeat(2,minmax(0,1fr))}.sticky-legend-fields{grid-template-columns:1fr}}
.product-page>.product-section .page-head{display:flex}
.product-page>.product-section .overview-head{display:flex}
.product-page>.product-section .page-head h1{font-size:22px}
.portfolio-filter{width:min(360px,100%);margin-bottom:24px}
.portfolio-product-group{display:grid;gap:16px;min-width:0;margin-bottom:32px}
.portfolio-product-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--color-line)}
.portfolio-product-head h2{margin:0;font-size:20px;min-width:0;overflow-wrap:break-word}
.portfolio-product-head>.btn{min-width:180px;text-align:center;justify-content:center}
.sidebar .sidebar-toggle,.sidebar .nav-link,.nav-collapsed .sidebar .sidebar-toggle,.nav-collapsed .sidebar .nav-link{display:grid;grid-template-columns:20px minmax(0,1fr);column-gap:12px;align-items:center;justify-content:initial;height:44px;min-height:44px;max-height:44px;padding:12px 14px;line-height:20px;flex:none;text-align:left;overflow:hidden}
.sidebar .nav-link{margin:8px 0}
.sidebar .sidebar-toggle>.app-icon,.sidebar .nav-link>.app-icon{display:block;width:20px;height:20px;min-width:20px;max-width:20px;min-height:20px;max-height:20px;justify-self:start;flex:none;transform:none;animation:none}
.sidebar .nav-label,.sidebar .sidebar-toggle-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;margin:0}
.nav-collapsed .sidebar .sidebar-toggle,.nav-collapsed .sidebar .nav-link{column-gap:0}
.sidebar .nav-caption,.nav-collapsed .sidebar .nav-caption{display:block;height:32px;min-height:32px;max-height:32px;padding:8px 14px;font-size:var(--font-caption);line-height:16px;white-space:nowrap;overflow:hidden}
.nav-collapsed .sidebar .nav-caption{visibility:hidden}
.sidebar .sidebar-bottom,.nav-collapsed .sidebar .sidebar-bottom{display:none}
@media(max-width:900px){.app{grid-template-columns:208px minmax(0,1fr)}.app.nav-collapsed{grid-template-columns:64px minmax(0,1fr)}.nav-collapsed .sidebar{width:64px}.menu-toggle{display:none}}

/* Collections grow in rows; they are not a single pair of actions. */
.action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));grid-auto-rows:1fr;gap:12px;min-width:0}
.action-list>.btn{width:100%;height:100%;min-width:0;text-align:left;justify-content:flex-start}
.workspace-mode .workspace{height:100dvh;display:flex;flex-direction:column;min-width:0}
.workspace-mode .topbar{flex:none}
.workspace-mode .workspace-page{height:auto;flex:1;min-height:0}

/* On narrow screens tool strips have their own rows, outside the canvas and panels. */
@media(max-width:900px){
 .workspace-page .ws-commandbar{display:flex;flex-direction:column;gap:8px;padding:8px;flex:none;min-width:0}
 .workspace-page #workspace-editor .ws-commandbar>.ws-actions{position:static;max-width:100%;width:100%;flex-wrap:nowrap;overflow-x:auto;flex-shrink:0;box-shadow:none;border-radius:6px;scrollbar-width:thin}
 .workspace-page .ws-editor .ws-body{position:relative;display:block;min-height:120px;overflow:hidden}
 .workspace-page .ws-body>.ws-viewport{height:100%;width:100%;min-height:0}
 .workspace-page .ws-objects,.workspace-page .ws-inspector{position:absolute;top:0;bottom:0;height:auto;z-index:7;max-width:100%;box-shadow:0 3px 12px #4c301b12}
 .workspace-page .ws-objects{left:0;width:168px;display:flex}
 .workspace-page .ws-inspector{right:0;width:224px}
 .workspace-page .objects-hidden .ws-objects,.workspace-page .inspector-hidden .ws-inspector{display:none}
 .ws-zoom{flex:none}
 .workspace-page .ws-status{height:26px;overflow:hidden;flex:none}
 .workspace-page .workspace-period-note{max-width:100%;overflow:hidden;white-space:nowrap;right:0}
 .product-bar .compact-tabs{overflow-x:auto;overflow-y:hidden;min-height:44px;height:44px;white-space:nowrap}
 .product-bar .compact-tabs a{flex:none}
}

/* Always reachable return-to-content control, including a scrolled narrow toolbar. */
.ws-commandbar [data-ws="fit"]{position:sticky;left:8px;z-index:2;background:#fff0e5;color:#b94320;border-color:#ecc4ab;flex:none}
.report-filter{max-width:440px;margin-bottom:24px}
#report-preview{margin-top:24px}
.ws-editor .ws-table{border:1.5px solid #c9b9aa;border-radius:12px;box-shadow:0 4px 6px #49382908,0 16px 36px #49382914;transition:box-shadow .15s,border-color .15s}
.ws-editor .ws-table:hover{border-color:#b68d71;box-shadow:0 6px 10px #4938290d,0 18px 40px #4938291f}
.ws-editor .ws-table.is-selected{outline:3px solid #dd673e;outline-offset:3px;border-color:#dd673e;box-shadow:0 0 0 7px #ed9f7124,0 18px 40px #4938291a;z-index:4}
.ws-editor .ws-table-head{height:56px;padding:12px 16px;background:#fcf8f3;border-bottom:1px solid #e9ddd1}
.ws-editor .ws-table-head strong{font-size:13px;font-weight:600;line-height:1.4}.ws-editor .ws-table-icon{border-radius:7px;width:28px;height:28px;flex-shrink:0}
.ws-editor .ws-table-footer{min-height:42px;padding:8px 48px 8px 16px;background:#fcfaf7}
.ws-editor .ws-object-resize{right:8px;bottom:8px;width:26px;height:26px;opacity:.75;background:#fff0e3;border:1px solid #d6aa8c;border-radius:6px;color:#a34220}
.ws-editor .is-selected .ws-object-resize{opacity:1;background:#d75b30;color:white;border-color:#d75b30}
.ws-edge-resize{position:absolute;z-index:7;display:block;opacity:0;touch-action:none;border:1px solid #d4774c;background:#fff5eb;border-radius:5px}
.ws-edge-right{right:1px;top:45%;width:8px;height:52px;cursor:ew-resize}.ws-edge-bottom{bottom:1px;left:45%;height:8px;width:52px;cursor:ns-resize}
.ws-table:hover .ws-edge-resize,.ws-table.is-selected .ws-edge-resize,.ws-edge-resize:focus-visible{opacity:1}
.ws-editor.ws-focused .ws-table{border-radius:8px}.ws-editor.ws-focused .ws-table.is-selected{outline:0}

/* Color identifies each card; selection remains an orange outer contour. */
.ws-editor .ws-table{--card-head:#f9d4b7;--card-ink:#66371f;--card-accent:#cc7141}
.ws-editor .ws-table[data-header-tone="1"]{--card-head:#cfe3f5;--card-ink:#233f63;--card-accent:#568bc1}
.ws-editor .ws-table[data-header-tone="2"]{--card-head:#e3d8f6;--card-ink:#4e376e;--card-accent:#9670c1}
.ws-editor .ws-table[data-header-tone="3"]{--card-head:#f5dfaa;--card-ink:#624817;--card-accent:#bf923b}
.ws-editor .ws-table[data-header-tone="4"]{--card-head:#f3d4df;--card-ink:#68384d;--card-accent:#be7893}
.ws-editor .ws-table[data-header-tone="5"]{--card-head:#cce8e5;--card-ink:#285652;--card-accent:#559b92}
.ws-editor .ws-table[data-header-tone="6"]{--card-head:#d9def6;--card-ink:#3c456f;--card-accent:#7c89c2}
.ws-editor .ws-table[data-header-tone="7"]{--card-head:#efdbc9;--card-ink:#654632;--card-accent:#b58663}
.ws-editor .ws-table-head{height:auto;min-height:64px;padding:8px 16px;gap:12px;background:var(--card-head);border-top:4px solid var(--card-accent);border-bottom:1px solid var(--card-accent);color:var(--card-ink)}
.ws-editor .ws-table-head>div{flex:1;min-width:0}
.ws-editor .ws-table-head strong{display:block;font-size:16px;line-height:1.35;font-weight:650;letter-spacing:0;color:var(--card-ink);overflow-wrap:anywhere}
.ws-editor .ws-table-head small{font-size:var(--font-caption);line-height:1.4;color:var(--card-ink);margin-top:4px}
.ws-editor .ws-table-icon{width:36px;height:36px;background:#ffffff70;color:var(--card-ink);border:1px solid #ffffff80;border-radius:9px}
.ws-editor .ws-table-head>.ws-button{width:32px;height:32px;min-width:32px;min-height:32px;flex-shrink:0;padding:0;margin-left:0;background:#ffffff80;color:var(--card-ink);border:1px solid #ffffffa0;border-radius:8px}
.ws-editor .ws-table-head>.ws-button:hover{background:#fff}
.ws-editor.ws-focused .ws-stage,.ws-editor.ws-focused .ws-stage-wrap{width:100%!important;height:100%!important}
.ws-editor.ws-focused .ws-table{height:calc(100% - 68px)!important}
#workspace-editor .ws-timeline :is(input,textarea){height:72px;min-height:72px;border:0;border-radius:0;box-shadow:none;display:block;margin:0}
#workspace-editor .ws-timeline :is(input,textarea):focus{outline:2px solid #b94320;outline-offset:-2px;background:#fff9f1}
.ws-timeline-slot button[aria-pressed=true] span:empty::after{content:none}
.ws-context-layer .ws-context-menu{width:248px;padding:8px;gap:2px;border-radius:12px;box-shadow:0 12px 40px #3a2b2026}
.ws-context-layer .ws-context-caption{padding:8px 10px;margin:0 0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ws-context-layer .ws-context-menu button{min-height:34px;padding:8px 10px;line-height:18px;justify-content:center;font-size:12px}
.ws-context-layer .ws-context-menu hr{margin:4px 8px}
.ws-context-layer .ws-context-footer{padding:8px 10px 4px;margin-top:4px;font-size:var(--font-caption)}
.ws-context-layer [data-context="delete"]{color:#b13d28}
.ws-context-layer .ws-insert-menu{width:340px;padding:16px;gap:14px}
.ws-insert-heading{display:flex;gap:12px;align-items:center}
.ws-insert-heading>div{flex:1}.ws-insert-heading strong{display:block;font-size:16px;font-weight:600}
.ws-insert-heading output{display:block;color:#9b5835;font-size:12px;margin-top:4px;font-variant-numeric:tabular-nums}
.ws-insert-icon{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:9px;background:#fff0e5;color:#b94320}
.ws-context-layer .ws-insert-menu [data-insert-close]{width:28px;height:28px;min-height:28px;padding:0;font-size:20px;text-align:center;align-items:center}
.ws-size-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;padding:2px}
.ws-context-layer .ws-size-grid button{width:100%;height:auto;min-height:0;aspect-ratio:1;border:1px solid #d9d2c9;border-radius:3px;background:#f8f6f3;padding:0}
.ws-context-layer .ws-size-grid button.is-filled{background:#f9d8bf;border-color:#cf865b}
.ws-context-layer .ws-size-grid button:hover,.ws-context-layer .ws-size-grid button:focus-visible{outline:2px solid #b94320;outline-offset:1px}
.ws-size-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ws-size-fields label{font-size:var(--font-caption);color:#68615c;display:grid;gap:6px}
#workspace-editor .ws-size-fields input{width:100%;height:36px;min-height:36px;padding:8px 10px;border:1px solid #d9d2c9;border-radius:6px;background:white;font-size:13px;color:#303238}
.ws-context-layer .ws-insert-menu .ws-insert-submit{min-height:40px;text-align:center;align-items:center;background:#b94320;color:#fff;border-radius:7px;font-weight:500}
.ws-context-layer .ws-insert-menu .ws-insert-submit:hover{background:#9e3618;outline-color:#9e3618}
.ws-insert-alternatives{border-top:1px solid #eee7df;padding-top:8px;display:grid;gap:8px}
.ws-context-layer .ws-insert-alternatives button{flex-direction:row;align-items:center;justify-content:space-between;min-height:36px}
.ws-insert-alternatives button span{color:#9c8170}
.ws-size-error{font-size:var(--font-caption);line-height:1.5;color:#b13d28;margin:0}.ws-size-error[hidden]{display:none}

/* Shared dialog treatment: forms, confirmations, help and expanded widgets. */
#modal{border:1px solid #e8dfd5;border-radius:20px;background:#fff;box-shadow:0 24px 80px #372b2933,0 4px 16px #372b2914;}
#modal::backdrop{background:#302b374d;backdrop-filter:blur(3px)}
#modal .modal-head{background:linear-gradient(120deg,#fff7ef 0%,#fffdfb 70%);border-bottom-color:#eee5dc;border-radius:19px 19px 0 0;align-items:center}
#modal .modal-head h2{line-height:1.3}
#modal #modal-close{display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;flex:none;padding:0;border:1px solid #e8dfd5;border-radius:10px;background:#ffffffb3;color:#6b6057}
#modal #modal-close:hover{background:#fff0e5;border-color:#dfbba5;color:#a13f22}
#modal :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-radius:10px;border-color:#dcd3c9;background:#fff;transition:border-color .15s,box-shadow .15s}
#modal :is(input:not([type=checkbox]):not([type=radio]),select,textarea):hover{border-color:#bfae9f}
#modal :is(input,select,textarea):focus-visible{outline:2px solid #b94320;outline-offset:2px}
#modal :is(input,select,textarea):disabled{background:#f7f5f2;border-color:#e8e1da}
#modal .btn{border-radius:10px;clip-path:none}
#modal .modal-actions{background:#fbf9f6;border-top-color:#eee5dc;border-radius:0 0 19px 19px}
#modal .widget-preview{border-radius:14px}
@media(prefers-reduced-motion:reduce){#modal :is(input,select,textarea){transition:none}}

/* Product summaries have a bounded preview, while full descriptions stay intact. */
.product-card .product-summary{line-height:1.6;min-height:6.4em;max-height:6.4em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;overflow-wrap:anywhere}
#modal textarea[name=shortDescription]{min-height:88px;resize:vertical}
.product-summary-count{text-align:right;font-variant-numeric:tabular-nums}

/* Product actions keep the workspace header compact. */
.product-menu-button{flex:none;width:36px;min-width:36px;height:36px;padding:0;font-size:24px;line-height:1}
.product-bar>.product-menu-button{margin-left:auto}
.product-action-menu .btn{width:100%;min-height:44px}
.workspace-page .ws-editor:has(.ws-formatbar):not(.ws-focused) .ws-commandbar>.ws-actions:first-child{top:158px}
.workspace-page .ws-editor:has(.ws-formulabar.is-empty):has(.ws-formatbar):not(.ws-focused) .ws-commandbar>.ws-actions:first-child{top:110px}

.sticky-heading{cursor:grab;touch-action:none}.is-grabbing .sticky-heading{cursor:grabbing}

/* Keep sticker actions available while the text and people list scroll. */
#modal[open]:has(.sticky-palette){display:flex;flex-direction:column;overflow:hidden}
#modal:has(.sticky-palette) .modal-head{flex:none}
#modal:has(.sticky-palette) #modal-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#modal:has(.sticky-palette) .modal-body{overflow:auto;min-height:0}
#modal:has(.sticky-palette) .modal-actions{flex:none}

.ws-sheet{display:inline-flex;align-items:center;gap:8px;flex:none;padding:8px;border:1px solid var(--color-line);border-radius:10px}
.ws-trash-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid var(--color-line)}
.ws-note-menu{position:relative}.ws-note-menu>summary{width:32px;height:32px;display:grid;place-items:center;cursor:pointer}
.ws-note-menu[open]>div{position:absolute;right:0;bottom:40px;display:grid;gap:8px;min-width:190px;background:white;border:1px solid var(--color-line);border-radius:10px;padding:12px;z-index:45}
.ws-note-menu button{min-height:36px}

/* Current product navigation and workspace controls use the interface type scale. */
.product-bar .tabs a{font-size:14px;line-height:1.4;min-height:44px;display:flex;align-items:center;padding:10px 12px}
.product-extra{padding:16px 0}.product-extra>summary{font-size:14px;cursor:pointer}.product-extra>div,.product-extra>dl{margin-top:16px}
.workspace-page #workspace-editor .ws-commandbar{position:static;display:flex;flex-direction:row;gap:8px;padding:0;flex:none;min-width:0;min-height:52px;border:0}
.workspace-page #workspace-editor .ws-commandbar>.ws-actions{position:static!important;left:auto;right:auto;top:auto;bottom:auto;max-width:100%;width:auto;padding:8px;gap:8px;flex-wrap:nowrap;overflow-x:auto;flex-shrink:0;box-shadow:none;border:0;border-radius:0;scrollbar-width:thin}
#workspace-editor .ws-commandbar .ws-button{font-size:14px;height:36px;min-height:36px}
#workspace-editor .ws-commandbar .ws-button:not([aria-label]){width:104px;min-width:104px;flex:none}
#workspace-editor .ws-commandbar .ws-button[aria-label]{width:36px;min-width:36px}
#workspace-editor .ws-pages .ws-button{font-size:14px;min-height:36px}
#workspace-editor .ws-pages{flex-wrap:nowrap;overflow-x:auto;min-height:52px;flex:none;align-items:center;padding:8px;gap:8px}
#workspace-editor .ws-sheet{padding:0;border:1px solid transparent;border-radius:6px;background:transparent;gap:0;flex:none}
#workspace-editor .ws-sheet:has([aria-pressed="true"]){background:#fff0e4;border-color:#ecc4ab}
#workspace-editor .ws-sheet .ws-button{border:0;background:transparent;box-shadow:none}
#workspace-editor .ws-sheet [data-ws="sheet-options"]{width:28px;min-width:28px;padding:0;font-size:18px}
#workspace-editor .ws-formulabar{height:44px;min-height:44px;flex:0 0 400px;flex-wrap:nowrap;padding:4px 8px;border:0}
#workspace-editor .ws-formulabar input{font-family:inherit;font-size:14px;min-width:120px;flex:1}
#workspace-editor .ws-cell-label,#workspace-editor .ws-address,#workspace-editor .ws-result{font-size:13px}
#workspace-editor .ws-fx{font-family:inherit;font-size:16px}
#workspace-editor .ws-inspector :is(label,input,select),#workspace-editor .ws-status{font-size:13px}
#workspace-editor .ws-section-caption{font-size:12px}
#workspace-editor .ws-commandbar .ws-zoom{width:64px;min-width:64px}

#workspace-editor .ws-commandbar .ws-button.ws-zoom{width:72px;min-width:72px}

.record-actions{position:relative}.record-actions>summary{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--color-line);border-radius:8px;cursor:pointer;list-style:none}
.record-actions[open]{z-index:30}.record-actions>div{position:absolute;top:44px;right:0;min-width:210px;display:grid;gap:12px;padding:16px;border:1px solid var(--color-line);border-radius:12px;background:white;box-shadow:0 8px 32px #18332e22}
.record-actions .btn{width:100%;min-height:44px}.report-row-actions{display:flex;align-items:center;gap:12px;justify-content:flex-end}
.report-list-filter{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:16px 0}.report-list-filter>.search{flex:1;min-width:200px}.report-list-filter label:not(.search):not(.checkbox){display:grid;gap:8px;font-size:13px}

.product-section .definition{font-size:16px;line-height:1.6}.product-section .panel-body>p{font-size:16px}

/* The product frame keeps the same coordinates on every product tab. */
html{scrollbar-gutter:stable}
.top-controls [hidden]{display:none!important}
.period-menu{position:relative;flex:none;font-size:12px}
.period-menu>summary{height:36px;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--color-line);border-radius:6px;cursor:pointer;list-style:none;white-space:nowrap}
.period-menu>summary::after{content:'⌄'}
.period-menu>.period-fields{position:absolute;right:0;top:44px;z-index:100;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:16px;width:min(340px,calc(100vw - 32px));background:white;border:1px solid var(--color-line);border-radius:10px;box-shadow:0 8px 24px #18332e22}
.period-fields>.period-label{display:block;grid-column:1/-1;font-size:13px}
.period-fields #period-year,.period-fields #period-type,.period-fields #global-period{width:100%;max-width:none}
.period-fields #global-period{grid-column:1/-1}
.topbar{flex-wrap:nowrap!important;height:54px;min-height:54px;gap:12px}
.top-controls{flex-wrap:nowrap!important;min-width:0}
@media(max-width:1050px){.host-account>span{display:none}.topbar .header-brand{width:88px;flex-basis:88px}}
@media(max-width:600px){.topbar{gap:8px;padding-inline:8px}.topbar .header-brand{width:64px;flex-basis:64px}.period-menu>summary{font-size:var(--font-caption);padding-inline:8px}.topbar .menu-toggle{display:none}}
.workspace{--product-page-gutter:36px;--product-nav-inset:16px}
.product-page{width:100%;max-width:1600px;margin:0 auto;padding:0 var(--product-page-gutter) 64px}
.product-page>.product-bar{padding-inline:var(--product-nav-inset)}
/* Account and product actions share one trailing edge; divider geometry stays in its container. */
.workspace:has(>.product-page)>.topbar{padding-inline-end:calc(max(0px,(100% - 1600px)/2) + var(--product-page-gutter) + var(--product-nav-inset))}
.product-page>.product-bar,.product-page:not(.workspace-page)>.product-bar{margin:14px 0 24px}
.product-page.workspace-page{padding-bottom:0}
.ws-note-menu-button{width:32px;min-width:32px;height:32px;min-height:32px;padding:0;border:0;background:transparent;border-radius:6px;font:inherit;cursor:pointer}
.ws-note{width:calc(310px * var(--note-scale,1));padding:calc(24px * var(--note-scale,1))}
.ws-note h3{font-size:calc(17px * var(--note-scale,1));margin:calc(8px * var(--note-scale,1)) 0;line-height:1.4}
.ws-note p{font-size:calc(12px * var(--note-scale,1));margin:calc(8px * var(--note-scale,1)) 0;line-height:1.7}
.ws-note .ws-kicker{font-size:calc(9px * var(--note-scale,1))}
.ws-note .sticky-heading small,.ws-note .sticky-author{font-size:calc(10px * var(--note-scale,1))}
.ws-note footer{margin-top:calc(16px * var(--note-scale,1))}
.ws-note-resize{position:absolute;right:4px;bottom:4px;width:20px;height:20px;padding:0;border:0;background:transparent;color:currentColor;cursor:nwse-resize;touch-action:none;opacity:.6}
.ws-note:hover .ws-note-resize,.ws-note:focus-within .ws-note-resize{opacity:1}
.ws-note footer{padding-right:12px}
@media(max-width:1200px){.workspace{--product-page-gutter:24px}}
@media(max-width:600px){.workspace{--product-page-gutter:16px}}

.workspace-page #workspace-editor{overflow-y:auto}
#workspace-editor .ws-body{position:relative;min-height:160px}
#workspace-editor .ws-cell-tools{display:flex;flex:none;align-items:center;overflow-x:auto;border-bottom:1px solid var(--ws-line);scrollbar-width:thin}
#workspace-editor .ws-cell-tools[hidden]{display:none}
#workspace-editor .ws-cell-label,#workspace-editor .ws-result{display:none}
#workspace-editor .ws-address{min-width:80px;white-space:nowrap;border:0;font-size:12px}
#workspace-editor .ws-address::before{content:'Ячейка ';color:var(--color-muted)}
#workspace-editor .ws-fx{display:none;font-family:inherit}
#workspace-editor .ws-formulabar input{font-family:inherit;font-size:14px;height:32px;min-height:32px;padding:4px 8px;border:1px solid var(--ws-line);border-radius:6px;background:white}
#workspace-editor .ws-formulabar input:focus{outline:2px solid #b9432040;outline-offset:1px;box-shadow:none}
#workspace-editor .ws-formatbar{padding:4px 8px;min-height:44px;border:0;overflow:visible;gap:8px}
#workspace-editor .ws-formatbar [data-ws="calculate"]{width:auto;padding:0 10px!important;white-space:nowrap}
#workspace-editor .ws-canvas-tools{position:absolute;z-index:8;right:12px;bottom:12px;max-width:calc(100% - 24px);display:flex;flex-wrap:nowrap;gap:8px;padding:8px;background:#fffffff5;border:1px solid var(--ws-line);border-radius:10px;box-shadow:0 3px 12px #4c301b12;overflow-x:auto;scrollbar-width:thin}
#workspace-editor .ws-canvas-tools .ws-button{height:36px;min-height:36px;flex:none;font-size:13px;white-space:nowrap}
#workspace-editor .ws-canvas-tools .ws-button[aria-label]{width:36px;min-width:36px;padding:0}
#workspace-editor .ws-canvas-tools .ws-zoom{width:64px;min-width:64px}
#workspace-editor .ws-canvas-tools [data-ws="arrange"],#workspace-editor .ws-canvas-tools [data-ws="board"]{width:132px;min-width:132px}
#workspace-editor .ws-canvas-tools [data-ws="fit"]{background:#fff0e5;color:#b94320;border-color:#ecc4ab}
#workspace-editor:not(.objects-hidden) .ws-canvas-tools{max-width:calc(100% - 192px)}
#workspace-editor:not(.inspector-hidden) .ws-canvas-tools{right:250px;max-width:calc(100% - 262px)}
#workspace-editor:not(.objects-hidden):not(.inspector-hidden) .ws-canvas-tools{max-width:calc(100% - 430px)}
@media(max-width:900px){#workspace-editor:not(.objects-hidden) .ws-canvas-tools{max-width:calc(100% - 174px)}#workspace-editor:not(.inspector-hidden) .ws-canvas-tools{right:232px;max-width:calc(100% - 244px)}}
@media(max-width:600px){#workspace-editor .ws-canvas-tools{right:8px;bottom:8px;max-width:calc(100% - 16px)}#workspace-editor:not(.objects-hidden) .ws-canvas-tools{max-width:calc(100% - 185px)}#workspace-editor:not(.inspector-hidden) .ws-canvas-tools{right:242px;max-width:calc(100% - 250px)}}

/* Product sections and report provenance keep navigation in place. */
.portfolio-product-group>summary.portfolio-product-head{justify-content:flex-start;flex-wrap:nowrap;min-height:52px}
.report-origin-details{margin:16px 0;padding:12px 16px;border:1px solid var(--color-line);border-radius:8px;font-size:13px}
.report-origin-details summary{cursor:pointer;font-weight:500}.report-origin-details p{margin:12px 0 0}

.alignment-guides{position:fixed;inset:0;pointer-events:none;z-index:10000;overflow:hidden}
.alignment-guide,.alignment-reference{position:absolute;display:block;pointer-events:none}
.alignment-guide.x{width:1px;border-left:1px dashed #d04b27}.alignment-guide.y{height:1px;border-top:1px dashed #d04b27}
.alignment-reference{border:1px solid #d04b27;border-radius:4px;box-shadow:0 0 0 1px #fff9}

/* Shared readable typography. Cell formatting and canvas scale remain user-controlled. */
.sidebar .nav-link,.sidebar-toggle-label{font-size:var(--font-meta)}
.btn,.ws-editor .ws-button,.ws-context-layer .ws-context-menu button{font-family:var(--font-family);font-size:var(--font-meta)}
.field>span,.field>label{font-size:var(--font-meta)}
.field :is(input,textarea,select){font-family:var(--font-family);font-size:var(--font-body)}
#content .dashboard-cards .overview-panel-head h2{font-size:var(--font-lead);line-height:1.4}
#content .dashboard-cards .overview-panel-head p,#content .dashboard-cards .overview-dept small,#content .dashboard-cards .widget-origin-footer a{font-size:var(--font-caption);line-height:1.5}
#content .dashboard-cards .overview-dept,#content .dashboard-cards .overview-quarter>div,#content .dashboard-cards .overview-effect>div,#content .dashboard-cards .overview-composition dt,#content .dashboard-cards .overview-money span{font-size:var(--font-body);line-height:1.5}
#content .dashboard-cards .overview-dept .overview-progress>strong{font-size:var(--font-meta)}
#content .dashboard-cards .overview-legend,#content .dashboard-cards .overview-year>strong,#content .dashboard-cards .overview-column-pair>div{font-size:var(--font-caption)}
#content .dashboard-cards .overview-kpi>span{font-size:var(--font-body);line-height:1.4}
#content .dashboard-cards .overview-kpi>small,#content .dashboard-cards .overview-panel td small{font-size:var(--font-caption)}
#content .overview-panel td,#content .widget-data-table td{font-size:var(--font-body);line-height:1.5}
#content .overview-panel th,#content .widget-data-table th{font-size:var(--font-caption);line-height:1.5}
.ws-context-menu .sticky-swatch{margin-right:8px}

/* Sticky surface drag and three independent resize grips. */
.ws-note{width:var(--note-width,310px);height:var(--note-height,auto);padding:0}
.ws-note-content{height:auto;box-sizing:border-box;overflow:visible;padding:calc(24px * var(--note-scale,1))}
.ws-note[data-note-draggable="true"]{cursor:grab;touch-action:none;user-select:none}
.ws-note[data-note-draggable="true"] .sticky-heading{cursor:inherit}
.ws-editor.is-grabbing .ws-note{cursor:grabbing}
.ws-note-edge{position:absolute;z-index:7;touch-action:none}
.ws-note-edge-right{right:0;top:25%;width:10px;height:50%;cursor:ew-resize}
.ws-note-edge-bottom{bottom:0;left:25%;height:10px;width:50%;cursor:ns-resize}
.ws-note-edge::after{content:"";position:absolute;background:currentColor;opacity:0;border-radius:3px}
.ws-note-edge-right::after{width:3px;height:28px;right:2px;top:calc(50% - 14px)}
.ws-note-edge-bottom::after{height:3px;width:28px;bottom:2px;left:calc(50% - 14px)}
.ws-note:hover .ws-note-edge::after,.ws-note-edge:focus-visible::after{opacity:.5}

.ws-note[data-note-fixed-size="true"]>.ws-note-content{height:100%;overflow:auto}

/* Excel library shares the materials catalogue's surfaces and spacing. */
.excel-import{display:grid;gap:24px;min-width:0;margin-bottom:24px}
.excel-upload-card{border:1px solid var(--color-line);border-radius:14px;background:#fff;padding:24px;min-width:0}
.excel-upload-card>.section-head{margin-bottom:20px}.excel-import h2{font-size:22px;margin:0;line-height:1.4}
.excel-import .panel-body{padding:0;display:grid;gap:16px;min-width:0}
.excel-file-picker{position:relative;display:flex;align-items:center;gap:16px;border:1px solid var(--color-line);border-radius:10px;padding:16px;cursor:pointer;background:#faf9f7;min-width:0}
.excel-file-caption{display:grid;gap:4px;flex:1;min-width:0}.excel-file-caption strong{font-size:15px;font-weight:500}.excel-file-caption>span{font-size:13px;color:var(--color-text-secondary)}
.excel-file-picker .btn{height:var(--file-button-height);min-height:var(--file-button-height);min-width:var(--file-button-width);display:flex;align-items:center;justify-content:center;flex:none;font:inherit;font-weight:500;padding:0 16px;border-radius:var(--file-button-radius)}
.excel-file-picker:focus-within{outline:2px solid #b94320;outline-offset:3px}.excel-file-picker.is-disabled{opacity:.55;cursor:default}
.excel-file-picker input.excel-file-input{position:absolute;width:1px;min-width:1px;height:1px;min-height:1px;padding:0;border:0;clip-path:inset(50%);opacity:0}
.excel-import fieldset{border-radius:10px;margin:0}.excel-import fieldset label{display:flex;align-items:center;gap:8px}.excel-import fieldset br{display:none}
.excel-import .table-wrap{border:1px solid var(--color-line);border-radius:10px;overflow:auto}.excel-import .table-wrap table{margin:0}
.excel-import-history{min-width:0}.excel-import-history>.section-head{margin-bottom:16px}.excel-import-history>.section-head>.muted{font-size:13px}
.excel-history-list{border:1px solid var(--color-line);border-radius:14px;background:#fff}
.excel-history-head,.excel-history-item>summary{display:grid;grid-template-columns:minmax(0,1fr) 112px 200px 20px;align-items:center;gap:16px;padding:16px}
.excel-history-head{border-bottom:1px solid var(--color-line);background:#faf9f7;border-radius:14px 14px 0 0;padding-block:12px;color:var(--color-text-secondary);font-size:12px}
.excel-history-item{border-bottom:1px solid var(--color-line)}.excel-history-item:last-child{border-bottom:0}
.excel-history-item>summary{cursor:pointer;list-style:none;min-height:76px;font-size:13px}.excel-history-item>summary::-webkit-details-marker{display:none}.excel-history-item>summary:hover{background:#fdfcfb}
.excel-book-name{display:flex;align-items:center;gap:16px;min-width:0}.excel-book-name strong{font-size:15px;font-weight:500;overflow-wrap:anywhere}.excel-book-name .knowledge-format{flex:none;color:#346b58;background:#f0f7f3}
.excel-history-item time{font-size:13px;color:var(--color-text-secondary)}.excel-book-count{font-size:13px}.excel-history-chevron{font-size:18px;transition:transform .15s}.excel-history-item[open]>summary .excel-history-chevron{transform:rotate(180deg)}
.excel-history-body{padding:0 24px 24px 76px;display:grid;gap:16px}.excel-history-body h3{font-size:15px;font-weight:500;margin:0}
.excel-import-products{display:flex;gap:12px;flex-wrap:wrap}.excel-import-products a{font-size:13px;line-height:1.5;padding:8px 12px;border:1px solid var(--color-line);border-radius:8px;text-decoration:none;color:var(--color-text);max-width:100%;overflow-wrap:anywhere}.excel-import-products a:hover{color:#b94320;border-color:#b94320;background:#fff4ec}
.excel-history-warnings{font-size:13px}.excel-history-warnings>summary{cursor:pointer;color:var(--color-text-secondary)}.excel-history-warnings ul{margin:12px 0 0;padding-left:20px;display:grid;gap:8px;line-height:1.6}
@media(max-width:850px){.excel-upload-card{padding:16px}.excel-history-head,.excel-history-item>summary{grid-template-columns:minmax(0,1fr) 80px 160px 16px;gap:12px}.excel-history-body{padding:0 16px 16px}.excel-book-name{gap:12px}}
@media(max-width:650px){.excel-file-picker{flex-wrap:wrap}.excel-file-picker .btn{width:100%}.excel-file-caption{flex-basis:calc(100% - 60px)}.excel-history-head{display:none}.excel-history-item>summary{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.excel-book-name{grid-column:1;grid-row:1}.excel-history-chevron{grid-column:2;grid-row:1}.excel-book-count{grid-column:1;grid-row:2}.excel-book-count::before{content:'Продуктов: '}.excel-history-item time{grid-column:1;grid-row:3}.excel-import h2{font-size:20px}}

/* Two action shapes: cut primary, rounded secondary. State keeps geometry. */
body .btn,body .ws-button,body .record-menu>summary,body .dashboard-widget-menu>summary,body .knowledge-menu>summary{border-radius:8px}
body .btn.primary{border-radius:0;clip-path:polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px)}
body .btn.primary:disabled{clip-path:polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px)}
body .field input,body .field select,body .report-list-filter select,body .report-list-filter input{border-radius:8px}
.excel-upload-purpose{font-size:15px;color:var(--color-text-secondary);line-height:1.6;margin:0 0 20px}
.report-catalogue{display:grid;gap:20px}.report-catalogue-tools{padding:16px;border:1px solid var(--color-line);border-radius:14px;display:grid;gap:16px}.report-catalogue-tools .report-filter{margin:0;max-width:360px}.report-catalogue-tools .report-filter label{margin:0}.report-catalogue-tools .report-list-filter{margin:0;display:flex;align-items:end;gap:12px;flex-wrap:wrap}.report-catalogue-tools .search{flex:1 1 300px}.report-catalogue-tools label{display:grid;gap:8px;font-size:13px}.report-catalogue-tools :is(select,input:not([type=checkbox]),button){height:44px}.report-catalogue-tools .checkbox{display:flex;align-items:center;min-height:44px}.report-catalogue-list{border:1px solid var(--color-line);border-radius:14px;overflow:hidden}.report-catalogue-list .table-wrap{margin:0;border:0}.report-catalogue-list td{padding:20px 16px;font-size:15px}.report-catalogue-list td small{display:block;margin-top:6px;font-size:13px}.report-catalogue-list th{font-size:13px;padding:16px;background:#faf9f7}.report-catalogue-list tr:last-child td{border-bottom:0}.report-catalogue-list .report-row-actions>a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 16px;border:1px solid var(--color-control);border-radius:8px;text-decoration:none;font-size:13px}
@media(max-width:700px){.report-catalogue-tools .report-filter{max-width:none}.report-catalogue-tools .report-list-filter>.search{flex-basis:100%}.report-catalogue-tools .report-list-filter>label:not(.search){flex:1 1 120px}}

body .report-catalogue-tools .search input{border-radius:8px}

/* Product details use one aligned form and keep navigation outside its scroll area. */
#modal[open]:has(.product-details-form){display:flex;flex-direction:column;width:min(900px,calc(100% - 48px));max-height:calc(100dvh - 48px);overflow:hidden}
#modal:has(.product-details-form) :is(.modal-head,.modal-body,.modal-actions){scrollbar-gutter:stable;scrollbar-width:thin;overflow-y:auto}
#modal:has(.product-details-form) .modal-head{flex:none;padding:20px 24px}
#modal:has(.product-details-form) .modal-head h2{margin:0;font-size:24px}
#modal:has(.product-details-form) #modal-context:empty{display:none}
#modal:has(.product-details-form) #modal-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#modal:has(.product-details-form) .modal-body{min-height:0;overflow:auto;padding:24px;overscroll-behavior:contain}
.product-details-form{display:grid;gap:24px;min-width:0}
.product-form-section{display:grid;gap:16px;min-width:0}
.product-form-section+.product-form-section{border-top:1px solid var(--color-line);padding-top:24px}
.product-form-section h3{font-size:16px;font-weight:500;line-height:1.5;margin:0}
.product-details-form .field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.product-details-form .field{margin:0;gap:8px;justify-content:flex-start}
.product-details-form .field>span{font-size:14px;line-height:1.5}
#modal .product-details-form .field :is(input,select,textarea){font-family:var(--font-family);font-size:15px;line-height:1.5;border-radius:8px}
#modal .product-details-form .field :is(input,select){height:44px;min-height:44px}
#modal .product-details-form textarea{height:132px;min-height:132px;resize:vertical}
#modal .product-details-form textarea[name=shortDescription]{height:88px;min-height:88px}
.product-details-form .field:has(textarea[name=audience]),.product-details-form .field:has(textarea[name=purpose]){grid-column:auto}
.product-details-form .product-summary-count{font-size:12px;line-height:1.5}
#modal:has(.product-details-form) .modal-actions{flex:none;grid-auto-flow:column;grid-template-columns:repeat(2,minmax(0,1fr));padding:20px 24px;gap:12px}
#modal:has(.product-details-form) .modal-actions>.btn{height:44px;min-height:44px;padding:10px 16px;font-size:14px;border-radius:8px}
#modal:has(.product-details-form) #modal-error{flex:none;margin:12px 24px}
@media(max-width:600px){
 #modal[open]:has(.product-details-form){width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
 #modal:has(.product-details-form) .modal-head{padding:16px;gap:12px}
 #modal:has(.product-details-form) .modal-head h2{font-size:20px}
 #modal:has(.product-details-form) .modal-body{padding:16px}
 .product-details-form .field-grid{grid-template-columns:minmax(0,1fr)}
 #modal:has(.product-details-form) .modal-actions{padding:16px}
 #modal:has(.product-details-form) #modal-error{margin:12px 16px}
}

/* Approved outlined platform wordmark; keep the full two-line master. */
.topbar .header-brand[data-brand="vitrina"]{width:150px;flex-basis:150px;flex-shrink:0}
.header-brand[data-brand="vitrina"] picture{display:block}
@media(max-width:600px){.topbar .header-brand[data-brand="vitrina"]{width:144px;flex-basis:144px}.topbar:has(.header-brand[data-brand="vitrina"]) .top-controls{gap:8px}.topbar:has(.header-brand[data-brand="vitrina"]) .period-menu>summary{max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* The expanded mobile menu overlays the page; content keeps usable width. */
@media(max-width:600px){
 .app,.app.nav-collapsed{grid-template-columns:64px minmax(0,1fr)}
 .app:not(.nav-collapsed)>.sidebar{position:fixed;inset:0 auto 0 0;width:208px;z-index:50}
 .topbar .header-brand[data-brand="vitrina"]{width:128px;flex-basis:128px}
 .topbar:has(.header-brand[data-brand="vitrina"]) .period-menu>summary{max-width:64px}
}

/* Workspace uses the available desktop width; other product pages keep their reading width. */
.workspace-mode #content.workspace-page{width:100%;max-width:none;margin-inline:0}
body.workspace-focus-mode{overflow:hidden}
.workspace-focus-mode #sidebar,.workspace-focus-mode .topbar,.workspace-focus-mode .product-bar,.workspace-focus-mode .app-footer{display:none!important}
.workspace-focus-mode #workspace-editor.ws-board{position:fixed;inset:0;z-index:55;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;display:flex;flex-direction:column}
.workspace-focus-mode #workspace-editor.ws-board>.ws-body{flex:1;min-height:0;height:auto}
#workspace-editor .ws-canvas-tools .ws-button[data-ws="board"]{width:auto;min-width:160px;padding:0 12px}
