.company-file-admin-tabs {
  margin-bottom: 12px;
}

.company-file-admin-toolbar {
  margin-bottom: 10px;
}

.company-file-admin-table td:first-child {
  min-width: 210px;
}

.company-file-admin-table td small {
  display: block;
  margin-top: 4px;
  color: #8a9099;
}

.company-file-inline-category {
  width: 100%;
  min-width: 88px;
  height: 30px;
  border: 1px solid #dfe3e8;
  border-radius: 4px;
  background: #fff;
  padding: 0 7px;
  color: #30363d;
  font-size: 11px;
}

.company-file-inline-category:focus-visible {
  border-color: #cf0a2c;
  outline: 2px solid rgba(207, 10, 44, 0.12);
  outline-offset: 1px;
}

.company-file-inline-category:disabled {
  background: #f4f5f7;
  color: #8a9099;
}

.company-file-name-link {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}

.company-file-name-link strong {
  color: #252a31;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.company-file-name-link:hover strong,
.company-file-name-link:focus-visible strong {
  color: #bd0b2b;
  text-decoration-color: #e4a4b0;
}

.company-file-admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.company-file-admin-actions button {
  border: 0;
  background: transparent;
  color: #555c67;
  padding: 0;
  font-size: 11px;
}

.company-file-admin-actions button:hover,
.company-file-admin-actions .primary-text {
  color: #cf0a2c;
}

.company-file-admin-actions button:disabled {
  color: #b5bac1;
  cursor: not-allowed;
}

.company-file-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid #e1e4e8;
  border-radius: 5px;
  background: #fff;
  padding: 14px;
}

.company-file-flow span {
  border-radius: 4px;
  background: #f0f1f3;
  color: #5f6670;
  padding: 6px 14px;
}

.company-file-flow span.done {
  background: #fff1f3;
  color: #cf0a2c;
}

.company-file-flow i {
  width: 54px;
  height: 1px;
  background: #d8dce1;
}

.company-file-admin-note {
  margin-top: 12px;
}

.company-file-rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr);
  gap: 14px;
  align-items: start;
}

.company-file-rules-grid h2 {
  margin: 0;
  font-size: 14px;
}

.company-file-rules-grid p {
  margin: 0;
  color: #7c838d;
  font-size: 10px;
}

.company-file-category-head,
.company-file-rule-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.company-file-category-head {
  align-items: center;
}

.company-file-category-create {
  display: flex;
  gap: 8px;
  width: min(310px, 48%);
}

.company-file-category-create input,
.company-file-category-edit-input {
  min-width: 0;
  border: 1px solid #d9dde2;
  border-radius: 4px;
  background: #fff;
  padding: 8px 10px;
  font-size: 10px;
}

.company-file-category-create input {
  flex: 1;
}

.company-file-category-create button,
.company-file-rule-heading > button {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 9px;
}

.company-file-category-edit-input {
  width: min(220px, 100%);
}

.company-file-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.company-file-category-actions button {
  border: 0;
  background: transparent;
  padding: 2px 0;
  color: #59616c;
  font-size: 9px;
}

.company-file-category-actions button:hover,
.company-file-category-actions .primary-text {
  color: #cf0a2c;
}

.company-file-rule-card {
  padding: 18px;
}

.company-file-editor-dialog {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  border: 0;
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 20px 55px rgba(25, 29, 36, 0.2);
}

.company-file-editor-dialog::backdrop {
  background: rgba(25, 29, 36, 0.46);
}

.company-file-editor-dialog header,
.company-file-editor-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e5e8;
  padding: 16px 20px;
}

.company-file-editor-dialog footer {
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e2e5e8;
  border-bottom: 0;
}

.company-file-editor-dialog header p,
.company-file-editor-dialog header h2 {
  margin: 0;
}

.company-file-editor-dialog header p {
  color: #cf0a2c;
  font-size: 10px;
}

.company-file-editor-dialog header h2 {
  margin-top: 4px;
  font-size: 18px;
}

.company-file-editor-dialog header button,
.company-file-editor-dialog footer button {
  min-height: 34px;
  border: 1px solid #dfe2e6;
  border-radius: 4px;
  background: #fff;
  padding: 6px 14px;
}

.company-file-editor-dialog footer .primary {
  border-color: #cf0a2c;
  background: #cf0a2c;
  color: #fff;
}

.company-file-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.company-file-editor-grid > section,
.company-file-editor-grid > aside {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.company-file-editor-grid > aside {
  border-left: 1px solid #e2e5e8;
  background: #fafafa;
}

.company-file-editor-grid label {
  display: grid;
  gap: 6px;
  color: #343940;
  font-weight: 600;
}

.company-file-editor-grid input,
.company-file-editor-grid textarea,
.company-file-editor-grid select {
  width: 100%;
  border: 1px solid #d9dde2;
  border-radius: 4px;
  background: #fff;
  padding: 8px 10px;
  color: #292d33;
  font: inherit;
}

.company-file-editor-grid textarea {
  resize: vertical;
}

.company-file-editor-grid .company-file-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-file-editor-grid .company-file-check input {
  width: auto;
}

.company-file-upload small {
  color: #858b94;
  font-size: 10px;
  font-weight: 400;
}

@media (max-width: 980px) {
  .company-file-rules-grid,
  .company-file-editor-grid {
    grid-template-columns: 1fr;
  }

  .company-file-category-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-file-category-create {
    width: 100%;
  }

  .company-file-editor-grid > aside {
    border-top: 1px solid #e2e5e8;
    border-left: 0;
  }
}

.company-file-rule-heading {
  align-items: start;
  margin-bottom: 16px;
}

.company-file-rule-heading > div {
  display: grid;
  gap: 4px;
}

.company-file-rule-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.company-file-rule-card label > span {
  font-size: 10px;
  font-weight: 700;
}

.company-file-rule-card label > small {
  color: #7c838d;
  font-size: 9px;
  line-height: 1.5;
}

.company-file-rule-card input {
  width: 100%;
  border: 1px solid #d9dde2;
  border-radius: 3px;
  background: #fff;
  padding: 9px 10px;
  font-size: 10px;
}

.company-file-rule-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
}

.company-file-input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d9dde2;
  border-radius: 4px;
  background: #fff;
}

.company-file-rule-card .company-file-input-suffix input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding-right: 4px;
}

.company-file-input-suffix b {
  padding: 0 10px 0 6px;
  color: #7c838d;
  font-size: 9px;
  font-weight: 500;
}

.company-file-input-suffix:focus-within {
  border-color: rgba(207, 10, 44, .72);
  box-shadow: 0 0 0 3px rgba(207, 10, 44, .09);
}

@media (max-width: 980px) {
  .company-file-rule-fields {
    grid-template-columns: 1fr;
  }
}

.company-file-editor-dialog {
  width: min(1120px, calc(100vw - 48px));
}

.company-file-editor-dialog > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 48px);
}

.company-file-editor-dialog header span {
  display: block;
  margin-top: 4px;
  color: #7c838d;
  font-size: 10px;
}

.company-file-editor-dialog footer > span {
  margin-right: auto;
  color: #7b828c;
  font-size: 10px;
}

.company-file-editor-dialog footer button:disabled {
  border-color: #e1e4e8;
  background: #f0f1f3;
  color: #a8adb5;
  cursor: not-allowed;
}

.company-file-editor-grid {
  min-height: 0;
  overflow: auto;
}

.company-file-editor-content {
  background: #f6f7f9;
}

.company-file-editor-block,
.company-file-source-panel {
  display: grid;
  gap: 13px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  padding: 15px;
}

.company-file-editor-block-heading,
.company-file-settings-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.company-file-editor-block-heading > div,
.company-file-settings-heading {
  display: grid;
  gap: 3px;
}

.company-file-editor-block-heading span,
.company-file-editor-block-heading small,
.company-file-settings-heading span {
  color: #818893;
  font-size: 9px;
  font-weight: 400;
}

.company-file-primary-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.8fr);
  gap: 12px;
}

.company-file-editor-grid label > span b {
  color: #cf0a2c;
  font-size: 9px;
}

.company-file-editor-grid label > span em {
  color: #9298a1;
  font-size: 9px;
  font-style: normal;
  font-weight: 400;
}

.company-file-editor-grid aside > label small {
  color: #858b94;
  font-size: 9px;
  font-weight: 400;
}

.company-file-content-mode,
.company-file-upload-type {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  border: 0;
  padding: 0;
}

.company-file-upload-type {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-file-content-mode legend,
.company-file-upload-type legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.company-file-content-mode label,
.company-file-upload-type label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  background: #fafbfc;
  padding: 10px;
  cursor: pointer;
}

.company-file-content-mode label:has(input:checked),
.company-file-upload-type label:has(input:checked) {
  border-color: #cf0a2c;
  background: #fff5f6;
}

.company-file-content-mode input,
.company-file-upload-type input {
  width: auto;
  accent-color: #cf0a2c;
}

.company-file-content-mode span,
.company-file-upload-type span {
  display: grid;
  gap: 3px;
}

.company-file-content-mode small,
.company-file-upload-type small {
  color: #818893;
  font-size: 9px;
  font-weight: 400;
}

.company-file-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-file-source-actions button,
.company-file-editor-toolbar button,
.company-file-source-list button {
  min-height: 31px;
  border: 1px solid #d7dce1;
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  color: #4a515b;
}

.company-file-source-actions .primary-text {
  border-color: #e9a8b5;
  color: #bd0b2b;
}

.company-file-source-state {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.company-file-source-state > div {
  display: grid;
  gap: 4px;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background: #fafbfc;
  padding: 9px 10px;
}

.company-file-source-state span,
.company-file-source-list small {
  color: #878e98;
  font-size: 9px;
}

.company-file-source-list {
  display: grid;
  gap: 8px;
}

.company-file-source-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e0e4e8;
  border-radius: 4px;
  padding: 8px;
}

.company-file-source-list article > b,
.company-file-source-list article > img {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  background: #fff0f2;
  color: #cf0a2c;
  object-fit: cover;
}

.company-file-source-list article > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.company-file-source-list article strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-file-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid #dfe3e8;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #f7f8fa;
  padding: 7px;
}

.company-file-editor-toolbar button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 10px;
}

.company-file-rich-editor {
  min-height: 280px;
  overflow: auto;
  border: 1px solid #dfe3e8;
  border-radius: 0 0 4px 4px;
  background: #fff;
  padding: 18px;
  line-height: 1.75;
}

.company-file-rich-editor:focus {
  border-color: #c5cad1;
  outline: 0;
}

.company-file-sign-dialog {
  width: min(520px, calc(100vw - 40px));
  border: 0;
  border-radius: 7px;
  padding: 0;
  box-shadow: 0 20px 55px rgba(25, 29, 36, 0.22);
}

.company-file-sign-dialog::backdrop {
  background: rgba(25, 29, 36, 0.46);
}

.company-file-sign-dialog header,
.company-file-sign-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e5e8;
  padding: 16px 18px;
}

.company-file-sign-dialog header p,
.company-file-sign-dialog header h2 {
  margin: 0;
}

.company-file-sign-dialog header p {
  color: #cf0a2c;
  font-size: 10px;
}

.company-file-sign-dialog header h2 {
  margin-top: 4px;
  font-size: 18px;
}

.company-file-sign-dialog header button,
.company-file-sign-dialog footer button {
  min-height: 34px;
  border: 1px solid #dfe2e6;
  border-radius: 4px;
  background: #fff;
  padding: 6px 14px;
}

.company-file-sign-dialog > form > section {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.company-file-sign-target {
  display: grid;
  gap: 4px;
  border: 1px solid #e0e4e8;
  border-radius: 5px;
  background: #f8f9fb;
  padding: 12px 14px;
}

.company-file-sign-target span,
.company-file-sign-target small {
  color: #7d848e;
  font-size: 10px;
}

.company-file-sign-dialog label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}

.company-file-sign-dialog label b {
  color: #cf0a2c;
  font-size: 9px;
}

.company-file-sign-dialog input {
  min-height: 40px;
  border: 1px solid #d5dae0;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
}

.company-file-action-dialog textarea,
.company-file-action-dialog input {
  width: 100%;
  border: 1px solid #d5dae0;
  border-radius: 4px;
  padding: 9px 10px;
  font: inherit;
  resize: vertical;
}

.company-file-sign-dialog footer {
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e2e5e8;
  border-bottom: 0;
}

.company-file-sign-dialog footer .primary {
  border-color: #cf0a2c;
  background: #cf0a2c;
  color: #fff;
}

.company-file-review-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  border: 0;
  border-radius: 7px;
  padding: 0;
  box-shadow: 0 20px 55px rgba(25, 29, 36, 0.22);
}

.company-file-review-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.company-file-review-dialog::backdrop {
  background: rgba(25, 29, 36, 0.48);
}

.company-file-review-dialog > header,
.company-file-review-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e1e4e8;
  background: #fff;
  padding: 15px 18px;
}

.company-file-review-dialog > header p,
.company-file-review-dialog > header h2 {
  margin: 0;
}

.company-file-review-dialog > header p {
  color: #cf0a2c;
  font-size: 10px;
}

.company-file-review-dialog > header h2 {
  margin-top: 4px;
  font-size: 19px;
}

.company-file-review-dialog > header span {
  display: block;
  margin-top: 4px;
  color: #7d848e;
  font-size: 10px;
}

.company-file-review-dialog > header button,
.company-file-review-dialog > footer button {
  min-height: 34px;
  border: 1px solid #d9dde2;
  border-radius: 4px;
  background: #fff;
  padding: 6px 13px;
}

.company-file-review-dialog > footer {
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e1e4e8;
  border-bottom: 0;
}

.company-file-review-dialog > footer .primary {
  border-color: #cf0a2c;
  background: #cf0a2c;
  color: #fff;
}

.company-file-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 0;
  overflow: hidden;
  background: #f4f5f7;
}

.company-file-review-layout > main {
  min-width: 0;
  overflow: auto;
  padding: 18px;
}

.company-file-review-layout > aside {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  border-left: 1px solid #dfe3e8;
  background: #fafbfc;
  padding: 18px;
}

.company-file-review-layout > aside section,
.company-file-review-comment {
  display: grid;
  gap: 9px;
  border: 1px solid #e0e4e8;
  border-radius: 5px;
  background: #fff;
  padding: 12px;
}

.company-file-review-layout h3 {
  margin: 0;
  font-size: 12px;
}

.company-file-review-layout dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.company-file-review-layout dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.company-file-review-layout dt {
  color: #858c96;
  font-size: 9px;
}

.company-file-review-layout dd {
  margin: 0;
  color: #33383f;
  text-align: right;
}

.company-file-review-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  background: #fff;
  padding: 11px 13px;
}

.company-file-review-source-head > div {
  display: grid;
  gap: 3px;
}

.company-file-review-source-head span,
.company-file-review-source-head small {
  color: #78808b;
  font-size: 9px;
}

.company-file-review-source-head a,
.company-file-review-unavailable a {
  border: 1px solid #d4d9df;
  border-radius: 4px;
  background: #fff;
  padding: 7px 10px;
  color: #b20b2b;
  font-size: 10px;
  text-decoration: none;
}

.company-file-review-pdf,
.company-file-review-images,
.company-file-review-rich {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  background: #fff;
}

.company-file-review-pdf-page,
.company-file-review-images figure {
  width: 100%;
  margin: 0;
  background: #fff;
}

.company-file-review-pdf-page + .company-file-review-pdf-page,
.company-file-review-images figure + figure {
  border-top: 10px solid #eef0f2;
}

.company-file-review-pdf-page img,
.company-file-review-images img {
  display: block;
  width: 100%;
  height: auto;
}

.company-file-review-rich {
  padding: 28px 34px;
  line-height: 1.8;
}

.company-file-review-rich table {
  width: 100%;
  border-collapse: collapse;
}

.company-file-review-rich th,
.company-file-review-rich td {
  border: 1px solid #dfe3e8;
  padding: 9px;
  text-align: left;
}

.company-file-review-loading,
.company-file-review-unavailable {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #767e89;
}

.company-file-review-attachments {
  display: grid;
  gap: 7px;
}

.company-file-review-attachments a {
  display: grid;
  gap: 3px;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  padding: 8px;
  color: #343940;
  text-decoration: none;
}

.company-file-review-attachments small {
  color: #858c96;
  font-size: 9px;
}

.company-file-review-comment span {
  font-weight: 700;
}

.company-file-review-comment textarea {
  border: 1px solid #d8dde2;
  border-radius: 4px;
  padding: 8px;
  resize: vertical;
  font: inherit;
}

@media (max-width: 980px) {
  .company-file-primary-fields,
  .company-file-content-mode {
    grid-template-columns: 1fr;
  }

  .company-file-review-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .company-file-review-layout > main,
  .company-file-review-layout > aside {
    overflow: visible;
  }

  .company-file-review-layout > aside {
    border-top: 1px solid #dfe3e8;
    border-left: 0;
  }
}
