html {
    overflow-y: scroll;
}

/* убираю отсуп */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f6f8;
}

[hidden] {
    display: none !important;
}

html.app-loading {
    overflow: hidden;
}

html.app-loading body > * {
    visibility: hidden;
}

.login-directory-source .directory-top-panel {
    display: none;
}
/* Стили для страницы авторизации */
.auth-page {
    min-height: 100svh;
    display: grid;
    place-items: center;
    background-color: #f4f6f8;
}
/* рамка авторизации */
.auth-form {
    width: min(380px, calc(100% - 40px));
    box-sizing: border-box;
    padding: 30px 30px 10px;
    border-radius: 12px;
    background-color: #2d3b4e;
}
/* вход в систему */
.auth-form h1 {
    margin: 0 0 24px;
    color: #ffffff;
    font-size: 26px;
}
/* логин и пароль надписи */
.auth-form label {
    display: block;
    margin: 14px 0 6px;
    color: #ffffff;
}

/* поля ввода логина и пароля */
.auth-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 0px;
    border-radius: 12px;
    background-color: #f4f6f8;
    font-size: 16px;
}

.auth-submit {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background-color: #455974;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.4s ease;
}

.auth-submit:hover {
    background-color: #597599; 

}


.auth-error {
    height: 20px;
    overflow: hidden;
    margin: 10px 0 0;
    color: #f73022; 
}

.directory-link {
    display: block;
    box-sizing: border-box;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
}


.directory-page {
    min-height: 100vh;
    box-sizing: border-box;
    padding: 40px;
    background-color: #f4f6f8;
}

.directory-content {
    max-width: 1400px;
    margin: 0 auto;
}

.directory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.directory-header h1 {
    margin: 0;
    color: #2d3b4e;
}

.back-link {
    display: inline-block;
    border: none;
    border-radius: 12px;
    background: none;
    padding: 10px;
    color: #000000;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.4s ease;
}

.back-link:hover {
    background-color: #dfe5eb;
}
/* Стили для ссылки "Вернуться ко входу" */
#directory-back-link {
    display: none !important;
    color: #2d3b4e;
}

html:not(.directory-main-source) #directory-back-link {
    display: inline-block !important;
}

.directory-close {
    width: 38px;
    height: 38px;
    margin-left: auto;
    margin-right: -2px;
    border: none;
    border-radius: 10px;
    background: #edf2f8;
    padding: 0;
    color: #1f2a36;
    font-family: Arial, sans-serif;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.directory-close:hover {
    background-color: #dfe7f0;
    transform: scale(1.02);
}

.directory-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.directory-search {
    flex: 1 1 420px;
    min-width: 220px;
    max-width: 330px;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #ccd3db;
    border-radius: 8px;
    background-color: #f4f6f8;
    font-size: 16px;
}

.directory-admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.directory-admin-button,
.directory-modal-button,
.directory-form-button,
.directory-modal-action {
    border: 0;
    border-radius: 12px;
    background-color: #455974;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.directory-admin-button {
    padding: 11px 16px;
}

.directory-admin-button:hover,
.directory-modal-button:hover,
.directory-form-button:hover,
.directory-modal-action:hover {
    background-color: #597599;
}

.directory-table-wrap {
    overflow-x: auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(45, 59, 78, 0.08);
}

.directory-modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(36px, 7vw, 80px);
    background: rgba(22, 30, 39, 0.5);
    z-index: 1000;
}

.directory-modal {
    --directory-modal-gutter: 18px;
    width: min(620px, calc(100% - 36px));
    max-height: none;
    overflow: visible;
    background: #ffffff;
    border: none;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    padding: 0;
}

.directory-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px var(--directory-modal-gutter) 8px;
}

.directory-modal-header h2 {
    margin: 0;
    color: #2d3b4e;
    font-size: 17px;
    line-height: 1.2;
}

#directory-modal-body,
.directory-modal-body {
    padding: 0 var(--directory-modal-gutter) var(--directory-modal-gutter);
    box-sizing: border-box;
}

#directory-modal-body > .directory-form,
#directory-modal-body > .directory-confirm-panel,
.directory-modal-body > .directory-form,
.directory-modal-body > .directory-confirm-panel {
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

#directory-modal-body .directory-form,
.directory-modal .directory-form {
    padding: 0;
    gap: 14px;
    box-sizing: border-box;
}

.directory-modal .directory-form label {
    margin-left: 0;
    margin-right: 0;
    gap: 6px;
}

.directory-modal .directory-form input,
.directory-modal .directory-form select {
    margin-left: 0;
    margin-right: 0;
    margin-top: 2px;
}

.directory-confirm-panel {
    padding: 16px 0 8px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.directory-confirm-panel p {
    margin: 0 0 16px;
    color: #2d3b4e;
    font-size: 16px;
    line-height: 1.5;
}

.directory-form {
    display: grid;
    gap: 12px;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
}

.directory-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.directory-form label {
    display: grid;
    gap: 6px;
    color: #2d3b4e;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
    min-width: 0;
    padding: 0;
}

.directory-form input,
.directory-form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ccd3db;
    border-radius: 8px;
    background-color: #f4f6f8;
    font-size: 13px;
    min-width: 0;
    margin-top: 2px;
}

.directory-form > label {
    width: 100%;
    max-width: 100%;
}

.directory-modal[data-modal-size="compact"] {
    width: min(460px, calc(100% - 26px));
}

.directory-modal[data-modal-size="compact"] .directory-modal-header {
    padding: 12px var(--directory-modal-gutter) 6px;
}

.directory-modal[data-modal-size="compact"] .directory-modal-body {
    padding: 0 var(--directory-modal-gutter) var(--directory-modal-gutter);
}

.directory-modal[data-modal-size="compact"] .directory-form {
    padding: 0;
}

.directory-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-right: 0;
    padding-left: 0;
}

.directory-form-button,
.directory-modal-action {
    padding: 9px 14px;
}

.directory-form-secondary,
.directory-modal-button {
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    background-color: #dfe5eb;
    color: #2d3b4e;
    font-size: 15px;
    cursor: pointer;
}

.directory-form-secondary:hover,
.directory-modal-button:hover {
    background-color: #d0d9e3;
}

.directory-form-single-field {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
}

.directory-form-single-field label {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
}

.directory-form-single-field .directory-select-user {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
}

.directory-select-user {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #ccd3db;
    border-radius: 8px;
    font-size: 14px;
    min-width: 0;
}

.directory-form-single-field label,
.directory-form-single-field .directory-select-user {
    margin-left: 0;
    margin-right: 0;
}

.directory-empty-state {
    color: #2d3b4e;
    margin: 12px 0 0;
}

@media (max-width: 640px) {
    .directory-toolbar {
        align-items: stretch;
    }

    .directory-admin-actions,
    .directory-form-row {
        grid-template-columns: 1fr;
        display: grid;
        width: 100%;
    }

    .directory-admin-button,
    .directory-form-button,
    .directory-form-secondary,
    .directory-modal-button,
    .directory-modal-action {
        width: 100%;
    }
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
    table-layout: fixed;
}

.directory-table th,
.directory-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #e5e9ed;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.directory-table th,
.standards-table th {
    text-align: center;
    vertical-align: middle;
}

.directory-table th:nth-child(1),
.directory-table td:nth-child(1) {
    width: 12%;
}

.directory-table th:nth-child(2),
.directory-table td:nth-child(2) {
    width: 12%;
}

.directory-table th:nth-child(3),
.directory-table td:nth-child(3) {
    width: 28%;
}

.directory-table th:nth-child(4),
.directory-table td:nth-child(4) {
    width: 11%;
}

.directory-table th:nth-child(5),
.directory-table td:nth-child(5) {
    width: 8%;
}

.directory-table th:nth-child(6),
.directory-table td:nth-child(6) {
    width: 9%;
}

.directory-table th:nth-child(7),
.directory-table td:nth-child(7) {
    width: 9%;
}

.directory-table th:nth-child(8),
.directory-table td:nth-child(8) {
    width: 11%;
}

.standards-table th:nth-child(1),
.standards-table td:nth-child(1) {
    width: 13%;
    min-width: 120px;
}

.standards-table th:nth-child(2),
.standards-table td:nth-child(2) {
    width: 14%;
    min-width: 140px;
}

.standards-table th:nth-child(3),
.standards-table td:nth-child(3) {
    width: 32%;
    min-width: 220px;
}

.standards-table th:nth-child(4),
.standards-table td:nth-child(4) {
    width: 10%;
    min-width: 90px;
    padding-left: 14px;
    text-align: center;
}

.standards-table th:nth-child(5),
.standards-table td:nth-child(5) {
    width: 7%;
    min-width: 70px;
    padding-left: 14px;
}

.standards-table th:nth-child(6),
.standards-table td:nth-child(6) {
    width: 10%;
    min-width: 90px;
    padding-left: 14px;
}

.standards-table th:nth-child(7),
.standards-table td:nth-child(7) {
    width: 9%;
    min-width: 85px;
    padding-left: 14px;
}

.standards-table th:nth-child(8),
.standards-table td:nth-child(8) {
    width: 16%;
    min-width: 140px;
    padding-left: 14px;
}

.standards-table .standards-download {
    display: inline-block;
    width: auto;
    min-width: 0;
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0 auto;
}

.directory-table th {
    background-color: #2d3b4e;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
}

.standards-table th {
    text-align: center;
    vertical-align: middle;
}

.directory-table tbody tr:hover {
    background-color: #f7f9fb;
}

.directory-status {
    display: none;
}

@media (max-width: 640px) {
    .directory-page {
        padding: 24px 16px;
    }

    .directory-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


.password-message {
    color: #ffffff;
    line-height: 1.4;
}

/* Стили для верхней панели */
.top-panel {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 30px;
    background-color: #2d3b4e;
}

/* Стили для кнопок в области кнопок */
.knopki button {
    border: none;
    border-radius: 12px;
    background: none;
    padding: 10px 10px;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.4s ease;

}

/* Покрас кнопок при наведении на кнопки */
.knopki button:hover {
    background-color: #455b77; /* фон кнопки */
    
}

/* Кнопки по середине */
.knopki {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Логотип */
.logo {
    grid-column: 1;
    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: bold;
    color: #ffffff;
}

.user-info {
    grid-column: 3;
    justify-self: end;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
}

.document-page-header {
    align-items: center;
}

@media (min-width: 1600px) {
    .document-flow-page .directory-content {
        max-width: 1840px;
    }
}

.document-page-header h1 {
    margin: 0;
    color: #26384a;
}

.document-view-tabs {
    display: flex;
    gap: 4px;
    margin: 4px 0 18px;
    border-bottom: 1px solid #cfd8df;
}

.document-view-tab {
    padding: 10px 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: #526577;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.document-view-tab[aria-selected="true"] {
    border-bottom-color: #297a68;
    color: #215e52;
    font-weight: 700;
}

.document-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.document-search-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    max-width: 720px;
    min-width: 220px;
    gap: 9px;
    padding-left: 12px;
    border: 1px solid #cbd5dc;
    border-radius: 8px;
    background: #fff;
    color: #718394;
    font-size: 23px;
}

.document-search-wrap .directory-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    border: 0;
    background: transparent;
    outline-color: #297a68;
}

.document-toolbar-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.document-primary-button,
.document-secondary-button,
.document-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    box-sizing: border-box;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.document-primary-button {
    background: #286f60;
    color: #fff;
}

.document-primary-button:hover {
    background: #205b4f;
}

.document-secondary-button {
    border-color: #cbd5dc;
    background: #fff;
    color: #31485a;
}

.document-secondary-button:hover {
    background: #edf2f4;
}

.document-secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.document-result-status {
    min-height: 18px;
    margin: 0 0 8px;
    color: #607487;
    font-size: 12px;
}

.document-table-wrap {
    max-height: calc(100vh - 250px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #e0e6ea;
    border-radius: 6px;
}

.document-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.document-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 7px;
    background: #344a5d;
    font-size: 11px;
    text-align: left;
}

.document-table td {
    height: 46px;
    box-sizing: border-box;
    padding: 6px 4px;
    font-size: 10px;
}

.document-table th:nth-child(1), .document-table td:nth-child(1) { width: 12%; }
.document-table th:nth-child(2), .document-table td:nth-child(2),
.document-table th:nth-child(3), .document-table td:nth-child(3) { width: 3%; }
.document-table th:nth-child(4), .document-table td:nth-child(4),
.document-table th:nth-child(5), .document-table td:nth-child(5) { width: 6%; }
.document-table th:nth-child(6), .document-table td:nth-child(6) { width: 9%; }
.document-table th:nth-child(7), .document-table td:nth-child(7) { width: 7%; }
.document-table th:nth-child(8), .document-table td:nth-child(8) { width: 17%; }
.document-table th:nth-child(9), .document-table td:nth-child(9),
.document-table th:nth-child(10), .document-table td:nth-child(10) { width: 5%; }
.document-table th:nth-child(11), .document-table td:nth-child(11) { width: 4%; }
.document-table th:nth-child(12), .document-table td:nth-child(12) { width: 7%; }
.document-table th:nth-child(13), .document-table td:nth-child(13) { width: 9%; }

.document-select-column {
    text-align: center !important;
    vertical-align: middle !important;
}

.document-select-column input {
    width: 16px;
    height: 16px;
    accent-color: #286f60;
    cursor: pointer;
}

.document-number-button {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f6658;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.document-number-button:hover {
    text-decoration: underline;
}

.document-date-caption {
    display: block;
    margin-top: 4px;
    color: #718394;
    font-size: 10px;
}

.document-status-badge {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 4px;
    background: #e9eff2;
    color: #3e5362;
    font-size: 10px;
    line-height: 1.25;
}

.document-status-returned {
    width: 88px;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
}

.document-status-action {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.document-status-action:hover {
    background: #dce9e6;
}

.document-archive-button {
    display: block;
    margin-top: 3px;
    padding: 3px 6px;
    border: 1px solid #cbd5dc;
    border-radius: 4px;
    background: #fff;
    color: #344a5d;
    font: inherit;
    font-size: 9px;
    white-space: nowrap;
    cursor: pointer;
}

.document-archive-button:hover {
    background: #f0f7f4;
}

.document-action-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

.document-icon-button {
    min-width: 38px;
    min-height: 32px;
    padding: 4px 5px;
    border: 1px solid #d6dfe4;
    border-radius: 6px;
    background: #fff;
    color: #375b5b;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.document-icon-button:hover {
    border-color: #6d9b8e;
    background: #f0f7f4;
}

.document-icon-button.document-has-unread {
    border-color: #8fc69b;
    background: #e1f4df;
    color: #245e36;
}

.document-unread-row,
.document-unread-row:hover {
    background: #c7f3c4 !important;
}

.document-empty-state,
.document-empty-modal {
    padding: 26px 16px;
    color: #718394;
    text-align: center;
}

.document-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(25, 39, 49, 0.56);
}

.document-modal {
    width: min(880px, calc(100% - 64px));
    max-height: calc(100vh - 64px);
    overflow: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 72px rgba(13, 29, 40, 0.25);
}

.document-modal[data-modal-size="compact"] {
    width: min(440px, calc(100% - 32px));
}

.document-modal[data-modal-size="wide"] {
    width: min(860px, calc(100% - 64px));
}

.document-modal-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #e4eaed;
    background: #fff;
}

.document-modal-header h2 {
    margin: 0;
    color: #26384a;
    font-size: 18px;
}

.document-modal-body {
    display: grid;
    gap: 16px;
    padding: 18px 20px 22px;
}

.document-form,
.document-comment-form {
    display: grid;
    gap: 14px;
}

.document-form label,
.document-comment-form label,
.document-task-comment {
    display: grid;
    gap: 6px;
    color: #344a5d;
    font-size: 12px;
    font-weight: 700;
}

.document-form input,
.document-form select,
.document-form textarea,
.document-comment-form textarea,
.document-task-comment textarea,
.document-inline-form select,
.document-delegate-control select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #cbd5dc;
    border-radius: 6px;
    background: #fff;
    color: #26384a;
    font: inherit;
    font-size: 13px;
}

.document-form textarea,
.document-comment-form textarea,
.document-task-comment textarea {
    resize: vertical;
}

.document-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.document-type-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.document-type-picker legend {
    margin-bottom: 8px;
    color: #344a5d;
    font-size: 12px;
    font-weight: 700;
}

.document-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.document-type-options label {
    position: relative;
    cursor: pointer;
}

.document-type-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.document-type-options span {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid #cbd5dc;
    border-radius: 6px;
    background: #fff;
    color: #344a5d;
    font-size: 13px;
}

.document-type-options input:checked + span {
    border-color: #286f60;
    background: #e8f3ef;
    color: #205b4f;
}

.document-type-options input:focus-visible + span {
    outline: 2px solid #286f60;
    outline-offset: 2px;
}

.document-form select[multiple] {
    min-height: 118px;
}

.document-file-picker input {
    padding: 8px;
}

.document-hint {
    margin: -6px 0 0;
    color: #718394;
    font-size: 11px;
}

.document-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.document-modal-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fff0ed;
    color: #9c3327;
    font-size: 13px;
}

.document-file-list,
.document-task-list,
.document-activity-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.document-file-list li,
.document-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid #e0e7e9;
    border-radius: 7px;
}

.document-file-list li span {
    display: grid;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.document-file-delete {
    justify-self: start;
    padding: 3px 7px;
    border: 1px solid #d7b7b1;
    border-radius: 4px;
    background: #fffaf9;
    color: #8c3e35;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.document-file-list small,
.document-task-item small {
    color: #718394;
    font-size: 11px;
}

.document-download-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    border-color: #cbd5dc;
    background: #f7faf9;
    color: #245e52;
    font-size: 18px;
}

.document-task-item {
    display: grid;
    align-items: start;
}

.document-task-heading,
.document-task-actions,
.document-delegate-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.document-task-heading {
    justify-content: space-between;
    color: #2b4052;
    font-size: 13px;
}

.document-task-heading span {
    color: #647989;
    font-size: 11px;
}

.document-task-unread {
    border-color: #9bcda5;
    background: #eaf7e8;
}

.document-delegate-control {
    flex: 1 1 100%;
}

.document-delegate-control select {
    flex: 1 1 180px;
}

.document-task-comment {
    margin-top: 8px;
}

.document-task-comment[hidden] {
    display: none;
}

.document-modal-section {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #e4eaed;
}

.document-modal-section h3 {
    margin: 0;
    color: #344a5d;
    font-size: 13px;
}

.document-note-panel {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e4eaed;
}

.document-note-panel h3 {
    margin: 0;
    color: #344a5d;
    font-size: 13px;
}

.document-note-panel label {
    display: grid;
    gap: 5px;
    color: #526577;
    font-size: 11px;
}

.document-note-panel textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 9px;
    border: 1px solid #cbd5dc;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}

.document-activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid #edf0f2;
}

.document-activity-list li > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #344a5d;
    font-size: 12px;
}

.document-activity-list time {
    color: #718394;
    font-size: 10px;
}

.document-activity-list p {
    margin: 6px 0 0;
    color: #405464;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.document-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.document-detail-grid > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.document-detail-grid span {
    color: #718394;
    font-size: 10px;
}

.document-detail-grid strong,
.document-detail-grid p {
    margin: 0;
    color: #2d4254;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.document-detail-grid .document-detail-wide {
    grid-column: 1 / -1;
}

.document-inline-form {
    display: flex;
    gap: 8px;
}

.document-inline-form select {
    max-width: 300px;
}

.document-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.document-detail-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.document-danger-button {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #d8aaa4;
    border-radius: 7px;
    background: #fff8f6;
    color: #9a382e;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.document-danger-button:hover {
    background: #ffefec;
}

.workflow-category-list {
    display: grid;
    gap: 14px;
}

.workflow-stage-group {
    display: grid;
    gap: 7px;
}

.workflow-stage-group h3 {
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #dce4e8;
    color: #344a5d;
    font-size: 12px;
}

.workflow-category {
    min-width: 0;
    border: 1px solid #dce4e8;
    border-radius: 7px;
    background: #fff;
}

.workflow-category summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    color: #344a5d;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.workflow-category summary small {
    color: #718394;
    font-size: 10px;
    font-weight: 400;
}

.workflow-search {
    display: grid;
    gap: 5px;
    padding: 0 12px 10px;
    color: #607487;
    font-size: 10px;
}

.workflow-search input {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid #cbd5dc;
    border-radius: 6px;
    font: inherit;
    font-size: 12px;
}

.workflow-people-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    max-height: 230px;
    overflow-y: auto;
    padding: 0 12px 12px;
}

.workflow-person {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
}

.workflow-person:hover {
    background: #f1f6f4;
}

.workflow-person input {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    margin: 0;
    appearance: none;
    border: 1px solid #9aabb3;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.workflow-person input:checked {
    border: 3px solid #286f60;
}

.workflow-person input:disabled {
    background-color: #e2ece8;
    cursor: default;
}

.document-form .workflow-person-details {
    display: grid;
    gap: 3px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    cursor: pointer;
}

.document-form .workflow-person input {
    width: 11px;
    max-width: 11px;
    height: 11px;
    padding: 0;
    box-sizing: border-box;
}

.workflow-person strong {
    color: #304658;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.workflow-person small {
    color: #718394;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.workflow-person .workflow-person-order {
    color: #267260;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.workflow-person .workflow-person-state {
    color: #7a6250;
    font-size: 10px;
    white-space: nowrap;
}

.workflow-remove-person {
    min-height: 20px;
    padding: 2px 5px;
    border: 1px solid #d7b7b1;
    border-radius: 4px;
    background: #fffaf9;
    color: #8c3e35;
    font: inherit;
    font-size: 9px;
    white-space: nowrap;
    cursor: pointer;
}

.workflow-remove-person:hover {
    background: #ffefec;
}

.workflow-tabs {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    border-bottom: 1px solid #d7e0e4;
}

.workflow-tab-button {
    flex: 0 0 auto;
    padding: 10px 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #526577;
    font: inherit;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.workflow-tab-button[aria-selected="true"] {
    border-bottom-color: #297a68;
    color: #215e52;
    font-weight: 700;
}

.workflow-tab-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 240px;
}

.workflow-tab-panel[hidden] {
    display: none !important;
}

.workflow-history-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-history-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid #e2e9eb;
    border-radius: 6px;
}

.workflow-history-list li > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.workflow-history-list strong {
    color: #344a5d;
    font-size: 11px;
}

.workflow-history-list small,
.workflow-history-status {
    color: #718394;
    font-size: 10px;
}

.workflow-history-status {
    flex: 0 0 auto;
    text-align: right;
}

