/* Пользовательские справочники: собственные правила по замерам старых форм МС. */
.ms-custom { position:relative; padding:20px 32px 40px; color:#222; font:12px/normal "Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; }
.ms-custom-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.ms-custom-head h1 { font:700 20px/24px Arial,sans-serif; margin:0; }
.ms-custom-head nav { display:flex; flex-wrap:wrap; gap:16px; }
.ms-custom-tools { display:flex; flex-wrap:wrap; align-items:center; gap:0; margin:0 0 16px; }
.ms-custom-tools .ms-btn { margin:0 10px 0 0; }
.ms-custom-tools form { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0; }
.ms-custom-tools input[type="search"] { box-sizing:border-box; width:206px; height:21px; margin:0 0 0 4px; padding:2px; border:1px solid #bfbfbf; border-radius:3px; color:#000; background:#fff; font:12px/normal Arial,sans-serif; }
.ms-custom-tools input[type="search"]:focus { border-color:#bfbfbf; outline:0; box-shadow:none; }
.ms-custom input::placeholder, .ms-custom textarea::placeholder { color:#888; opacity:1; }
.ms-custom-notice { background:#fff7df; border-left:3px solid #d6a52a; padding:10px 12px; max-width:900px; line-height:18px; }
.ms-custom-errors { background:#fff0ef; color:#912f2a; padding:12px 28px; max-width:600px; }
.ms-custom-scroll { overflow-x:auto; }
.ms-custom-table { width:100%; border-collapse:collapse; font:11px/15px Tahoma,Arial,sans-serif; }
.ms-custom-table th, .ms-custom-table td { text-align:left; vertical-align:middle; padding:7px; border-bottom:1px solid #ddd; }
.ms-custom-table th { padding:5px 7px; background:#e3e3e3; border-right:1px solid #fff; font-weight:400; }
.ms-custom-table tbody tr:hover { background:#fffb8c; }
.ms-custom-table a { color:#186999; }
.ms-custom-table a:hover { color:#f88001; }
.ms-custom-description { white-space:pre-wrap; max-width:500px; overflow-wrap:anywhere; }
.ms-custom:has(.ms-custom-form) > .ms-custom-head { position:absolute; top:20px; right:32px; margin:0; min-height:28px; }
.ms-custom:has(.ms-custom-form) > .ms-custom-head h1 { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.ms-custom-form { max-width:776px; margin:0; }
.ms-custom-form .ms-custom-form-toolbar { min-height:28px; margin:0 0 38px; }
.ms-custom-form-toolbar .ms-btn { box-sizing:border-box; width:99px; height:28px; }
.ms-custom-form .ms-custom-name { display:block; margin:0 0 32px; }
.ms-custom-name > span { display:block; color:#888; font:12px/14px Arial,sans-serif; margin-bottom:10px; }
.ms-custom-required { color:red; }
.ms-custom-form .ms-custom-name input.ms-input { box-sizing:border-box; display:block; width:600px; max-width:100%; height:29px; margin:0; padding:1px 1px 1px 5px; border:1px solid #bfbfbf; border-radius:0; color:#000; background:#fff; font:700 20px/normal Arial,sans-serif; }
.ms-custom-block { box-sizing:border-box; width:464px; max-width:100%; margin:0 0 12px; padding:0 32px 12px; border-radius:2px; background:#f7f7f7; }
.ms-custom-block h2 { margin:0; padding:14px 0 16px; font:700 14px/16px Arial,sans-serif; }
.ms-custom-form .ms-custom-field { display:grid; grid-template-columns:140px minmax(0,250px); align-items:center; gap:10px; margin:0 0 5px; min-height:21px; color:#888; font:12px/14px Arial,sans-serif; }
.ms-custom-form .ms-custom-field-area { align-items:start; }
.ms-custom-field-area > span { padding-top:4px; }
.ms-custom-form .ms-custom-field > .ms-input,
.ms-custom-form .ms-custom-field > .ms-select { box-sizing:border-box; width:250px; max-width:100%; height:21px; margin:0; padding:1px 3px; border:1px solid #bfbfbf; border-radius:0; background:#fff; color:#000; font:12px/normal Arial,sans-serif; }
.ms-custom-form .ms-custom-field > .ms-sel { max-width:100%; }
.ms-custom-form .ms-custom-field > textarea.ms-input { height:78px; min-height:64px; padding:3px; resize:vertical; }
.ms-custom-form .ms-input:focus, .ms-custom-form .ms-select:focus { border-color:#2f9bff; outline:1px solid #2f9bff; box-shadow:none; }
.ms-custom-form .ms-custom-name input.ms-input:focus { border-color:#2f9bff; outline:1px solid #2f9bff; }
.ms-custom-form .ms-custom-name input.ms-input:disabled, .ms-custom-form .ms-input:disabled, .ms-custom-form .ms-select:disabled { color:#888; background:#f0f0f0; }
.ms-custom-form .ms-input[aria-invalid="true"], .ms-custom-form .ms-input:user-invalid,
.ms-custom-form .ms-select[aria-invalid="true"] { border-color:red; }
.ms-custom-form .ms-custom-name input.ms-input[aria-invalid="true"],
.ms-custom-form .ms-custom-name input.ms-input:user-invalid { border-color:red; }
.ms-custom-form [hidden] { display:none !important; }
.ms-custom-form .ms-custom-check { display:flex; align-items:center; gap:5px; margin:12px 0 0; color:#222; font:12px/16px Arial,sans-serif; }
.ms-custom-form .ms-custom-check > input[type="checkbox"] { flex:none; margin:0; }
.ms-custom-fixed { box-sizing:border-box; min-height:21px; padding:3px; color:#888; background:#f0f0f0; font-weight:400; overflow-wrap:anywhere; }
.ms-custom-hint { color:#888; font:12px/16px Arial,sans-serif; }
.ms-custom-block > .ms-custom-hint { margin:12px 0; }
.ms-custom-block > .ms-custom-notice { margin:0; padding-top:12px; }
.ms-custom-delete { max-width:776px; margin:28px 0 0; padding-top:16px; border-top:1px solid #ddd; display:flex; align-items:center; gap:12px; }
.ms-custom-delete .ms-btn { flex:none; margin:0; }
.ms-custom-owners { line-height:2; }
@media (max-width:899px) {
  .ms-custom { padding:20px 20px 32px; }
  .ms-custom:has(.ms-custom-form) > .ms-custom-head { position:static; justify-content:flex-end; margin-bottom:16px; }
  .ms-custom-form .ms-custom-form-toolbar { margin-bottom:28px; }
  .ms-custom-delete { align-items:flex-start; }
  .ms-custom-table { min-width:520px; }
}
@media (max-width:520px) {
  .ms-custom { padding-right:12px; padding-left:12px; }
  .ms-custom-head nav { gap:12px; }
  .ms-custom-tools { row-gap:10px; }
  .ms-custom-tools input[type="search"] { margin-left:0; }
  .ms-custom-block { padding:0 16px 16px; }
  .ms-custom-form .ms-custom-field { grid-template-columns:minmax(0,1fr); gap:5px; margin-bottom:12px; }
  .ms-custom-field-area > span { padding:0; }
  .ms-custom-delete { flex-direction:column; }
}
