/* Shared form geometry. Adapt to the space available inside pages and drawers. */
html input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
html select:not([multiple]){height:48px;line-height:1.5}
html input,html select,html textarea{min-width:0}
html .fields>div,html .task-form-grid>div,html .flow-properties>label,
html .task-filter-fields>div,html .task-properties>div,html .task-list-row>div{min-width:0;overflow-wrap:anywhere}
html .fields>div{display:flex;flex-direction:column;justify-content:flex-end}
html .task-form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
html .task-properties{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
html .flow-properties{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))}
html .task-filter-fields,html .task-more-filters .task-filter-fields{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
html .task-filter-fields>div:first-child{grid-column:auto}
html .task-main #task-filters{align-items:flex-end}
html .task-main #task-filters>button{height:48px;margin:0}
html .task-more-filters summary{min-height:48px;display:flex;align-items:center}
html .task-extra-tools{flex-wrap:wrap}
html .task-extra-tools>details{flex:1 1 220px;min-width:0}
html .task-comment-send,html .flow-footer,html .flow-created{flex-wrap:wrap}
html .task-list-row,html .task-list-head{grid-template-columns:minmax(0,2.5fr) minmax(0,1fr) 110px 105px minmax(120px,1fr)}
html .task-list-person,html .task-list small{overflow-wrap:anywhere}
html .task-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}
html .task-editor-heading h1{margin:0}
/* Inline actions own their spacing; form/dialog defaults must not offset a button. */
html header>form,html .task-toolbar form,html .task-row-actions form,
html .task-editor-actions form{display:flex;flex-direction:column;margin:0}
html header button,html .task-toolbar button,html .task-toolbar .button,
html .task-row-actions button,html .task-editor-actions button,
html .task-peek-bar button,html .task-comment-send button,
html .protocol-buttons button,html .review-toolbar button,
html .review-detail-heading button{margin:0}
html .task-editor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
html .task-editor-actions button,html .task-toolbar button,html .task-toolbar .button{
  min-height:44px;padding:10px 14px;font-size:13px;line-height:22px
}
html .task-toolbar .task-text-button{font-size:13px}
html .task-peek-bar strong{min-width:0}
html .task-peek-bar button{flex-shrink:0}
html main h1,html main h2,html main h3,html main summary{overflow-wrap:anywhere}
@media(max-width:1050px){
  html .task-list-row,html .task-list-head{grid-template-columns:minmax(0,2fr) minmax(0,1fr) 100px 100px}
}
@media(max-width:720px){
  html .meeting-table{min-width:0;width:100%}
  html .meeting-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  html .meeting-table tbody{display:block}
  html .meeting-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:12px 0;border-bottom:1px solid var(--border)}
  html .meeting-table td{border:0;padding:6px 4px;min-width:0}
  html .meeting-table td:first-child{grid-column:1/-1;min-width:0}
  html .meeting-table td:last-child{text-align:right}
  html .meeting-table td[colspan]{text-align:left}
  html .task-list-head{display:none}
  html .task-list-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:16px 0}
  html .task-list-title{grid-column:1/-1}
  html .task-list-person:before{content:'Исполнитель: ';color:var(--text-muted);font-size:11px}
  html .task-list-due{justify-self:end}
  html .task-row-actions{grid-column:2;justify-content:flex-end}
  html .task-main #task-filters{display:flex}
  html .task-main #task-filters>.task-filter-fields{flex-basis:100%}
}
@media(max-width:400px){
  html .task-peek-bar{flex-wrap:wrap}
  html .task-peek-bar strong{flex:1}
  html .task-peek-bar a{order:3;flex-basis:100%;margin-left:0}
}

@media(max-width:600px){
 html .review-row{grid-template-columns:24px minmax(0,1fr)}
 html .review-person-cell,html .review-date-cell,html .review-state-cell{grid-column:2}
 html .review-state-cell{grid-template-columns:minmax(0,1fr)}
 html .review-state-cell>*{grid-column:auto}
}
