/* Settings use three reading widths: a single form, a master/detail view, and data tables. */
body.outlook-modern #workspace > .management-page {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: 76rem;
  min-inline-size: 0;
  margin-inline: auto;
  --field-gap: 8px 14px;
}
body.outlook-modern #workspace > :is(#microsoft,#system,#audit).management-page {max-inline-size:56rem}
body.outlook-modern #workspace > :is(#tariff-workspace,#price-logic,#usage-statistics,#processing-statistics).management-page {max-inline-size:86rem}
body.outlook-modern #workspace .management-page :where(fieldset,form,article,section,label,.table-scroll,.panel-card) {min-inline-size:0}
body.outlook-modern #workspace .management-page :where(p,.panel-muted,.panel-heading small) {max-inline-size:85ch}
body.outlook-modern #workspace .management-page :where(input,select,textarea) {max-inline-size:100%;box-sizing:border-box}
body.outlook-modern #workspace .management-page input:is([type=number],[type=time],[type=date]) {width:min(100%,13em)}
body.outlook-modern #workspace .management-page :where(.actions,.workflow-record-actions,.rules-actions) {flex-wrap:wrap;justify-content:flex-start;gap:6px}
body.outlook-modern #workspace .management-page :where(.table-scroll,.pl-table-scroll,.pl-heavy-scroll) {max-inline-size:100%;overflow:auto}
body.outlook-modern #workspace .management-page .panel-heading {gap:8px 16px;flex-wrap:wrap}
body.outlook-modern #workspace .management-page :where(input,select,textarea,button,summary):focus-visible {outline:2px solid #216bbc;outline-offset:2px}
body.outlook-modern #workspace-settings .settings-hub {gap:14px}
body.outlook-modern #workspace-settings .settings-hub-title {background:#f6f8fb;align-items:center;padding:9px 12px}
body.outlook-modern #workspace-settings .settings-hub-groups {grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:12px}
body.outlook-modern #workspace-settings .settings-hub-groups>.settings-link-group {grid-column:auto}
body.outlook-modern main #workspace-settings button.settings-hub-link {
  display:grid;grid-template-columns:20px minmax(0,1fr) 12px;align-items:center;gap:10px;
  width:100%;min-height:44px;padding:8px 12px;border:0;border-bottom:1px solid var(--om-line-soft);
  border-radius:0;background:transparent;text-align:start;white-space:normal;color:var(--om-ink)
}
body.outlook-modern main #workspace-settings button.settings-hub-link::after {content:'›';color:var(--om-accent);font-size:18px}
body.outlook-modern main #workspace-settings button.settings-hub-link:hover {background:var(--om-hover)}
body.outlook-modern #workspace-settings .settings-hub-link :is(strong,small){display:block}
body.outlook-modern #workspace .management-page :is(.rule-settings-grid,.workflow-dialogue-fields,.user-rights-grid,.firm-fields-grid) {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));align-items:start;gap:var(--field-gap)
}
body.outlook-modern #workspace .management-page :is(.rule-settings-grid,.workflow-dialogue-fields,.firm-fields-grid) {max-inline-size:54rem}
body.outlook-modern #settings .rule-settings-grid .wide {grid-column:1/-1}
body.outlook-modern #workspace .management-page :is(.settings-savebar,.pl-publish-controls){justify-content:flex-start}
body.outlook-modern #workspace .management-page :is(.ai-settings-card,.process-control,.pl-panel){min-width:0}
body.outlook-modern #ai .ai-settings-grid {gap:12px}
body.outlook-modern #ai .ai-settings-card {padding:14px}
body.outlook-modern #ai .ai-settings-form {gap:9px}
body.outlook-modern #ai .ai-settings-form input,body.outlook-modern #ai .ai-settings-form select {height:32px;padding-block:4px}
body.outlook-modern #automation .automation-rule-switches {grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:6px 12px}
body.outlook-modern #workspace .management-page :is(.archive-toolbar,.process-settings-form,.automation-rule-form){max-inline-size:54rem}
body.outlook-modern #workspace .management-page :is(.user-row,.automation-run,.workflow-record){padding-block:7px}
body.outlook-modern #workspace .management-page dl {max-inline-size:48rem}
body.outlook-modern #workspace .management-page :is(.activity-table,.tariff-matrix,.pl-table) :is(td,th){padding-block:5px}
body.outlook-modern #workspace .management-page dialog {box-sizing:border-box;width:min(44rem,calc(100vw - 24px));max-height:85dvh;overflow:auto}
@media(min-width:850px){
  body.outlook-modern #workspace :is(#workflow .workflow-layout,#settings .settings-layout){grid-template-columns:12rem minmax(0,1fr);gap:12px}
  body.outlook-modern #workspace #firms .firms-layout{grid-template-columns:minmax(14rem,19rem) minmax(0,1fr)}
  body.outlook-modern #workspace #imap .imap-settings-grid{grid-template-columns:minmax(15rem,19rem) minmax(0,38rem)}
  body.outlook-modern #workspace #users :is(#user-form,#access-form){max-inline-size:52rem}
  body.outlook-modern #workspace #microsoft #microsoft-form{max-inline-size:44rem;gap:var(--field-gap)}
}
@media(max-width:740px){
  body.outlook-modern #workspace .management-page :is(.ai-settings-grid,.firms-layout,.imap-settings-grid,.process-setup-grid,.automation-process-grid,.settings-layout,.workflow-layout){grid-template-columns:minmax(0,1fr)}
  body.outlook-modern #workspace .management-page :is(.settings-sections,.workflow-sections){display:flex;flex-direction:row;overflow-x:auto}
  body.outlook-modern #workspace .management-page :is(.settings-section-tab,.workflow-section-tab){flex:0 0 auto}
  body.outlook-modern #workspace .management-page .firm-list {max-height:15rem}
  body.outlook-modern #workspace .management-page .panel-heading {align-items:flex-start}
}
body.outlook-modern #workspace .management-page > :is(.panel-heading,.automation-page-head,.pl-header){padding:10px 12px}
body.outlook-modern #workspace .management-page :is(.settings-hub-title,.automation-process-heading){justify-content:flex-start;gap:12px}
body.outlook-modern #workspace .management-page .settings-hub-title > button {margin-inline-start:auto}
body.outlook-modern #workspace :is(#legacy-archive .archive-toolbar,#processing-statistics>form,#users #mailbox-form) {
  display:flex;flex-wrap:wrap;align-items:end;justify-content:flex-start;gap:8px 12px
}
body.outlook-modern #workspace :is(#legacy-archive .archive-toolbar,#processing-statistics>form,#users #mailbox-form)>label {flex:0 1 auto;max-width:100%}
body.outlook-modern #workspace .management-page :is(.tariff-summary,.pl-toolbar,.archive-toolbar){row-gap:6px}
@media(max-width:620px){
  body.outlook-modern #workspace .management-page .settings-hub-title{align-items:flex-start;flex-wrap:wrap}
  body.outlook-modern #workspace .management-page .settings-savebar{position:static;flex-wrap:wrap}
}
