.status-signed {
    color: #237a3b;
}

.application-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

.application-header {
    min-height: 60px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.brand-mark {
    width: 42px;
    height: 42px;
}

.application-content {
    display: flex;
    flex: 1;
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 12px;
}

.documents-page {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: 100%;
    min-height: 0;
}

.documents-heading {
    margin-bottom: 10px;
}

.documents-heading h1 {
    margin: 0;
    font-size: 25px;
}

.selection-toolbar {
    min-height: 42px;
    margin-bottom: 8px;
    padding: 7px 10px;
}

.upload-actions { display: flex; align-items: center; gap: 8px; }
.pdf-upload-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.documents-table-wrap {
    min-height: 0;
    overflow: auto;
}

.documents-table-wrap thead {
    position: sticky;
    z-index: 1;
    top: 0;
}

.documents-table-wrap th,
.documents-table-wrap td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.documents-table-wrap .button {
    padding: 7px 10px;
    font-size: 13px;
}

.institutional-footer {
    flex: none;
    align-items: center;
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 12px;
    line-height: 1.3;
}

.empty-document-row td {
    height: 59px;
}

.documents-pagination,
.pagination-actions {
    display: flex;
    align-items: center;
}

.documents-pagination {
    flex: none;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 7px 2px 0;
    color: #234766;
    font-size: 14px;
}

.pagination-actions {
    gap: 12px;
}

.pdf-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: rgb(18 34 48 / 58%);
    padding: 4vh 4vw;
}

.pdf-modal {
    width: min(90vw, 1400px);
    height: 88vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 18px 55px rgb(0 0 0 / 35%);
}

.pdf-modal-header,
.pdf-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
}

.pdf-modal-header {
    border-bottom: 1px solid #d7e0ea;
}

.pdf-modal-header h2 {
    margin: 2px 0;
    color: #0b3b73;
    font-size: 20px;
}

.pdf-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #d7e0ea;
}

.pdf-modal-close,
.document-toast button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pdf-modal-close {
    color: #234766;
    font-size: 30px;
    line-height: 1;
}

.pdf-modal-viewer iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.document-toast {
    position: fixed;
    z-index: 1100;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    color: #fff;
    border-radius: 5px;
    box-shadow: 0 8px 25px rgb(0 0 0 / 25%);
}

.document-toast button {
    color: inherit;
    font-size: 20px;
}

.toast-success { background: #237a3b; }
.toast-error { background: #a52620; }
.toast-info { background: #0b5cad; }

@media (max-width: 700px) {
    .application-shell {
        overflow: auto;
    }

    .application-header,
    .institutional-footer {
        flex-direction: row;
        align-items: center;
    }

    .application-content {
        min-height: 520px;
        padding: 10px 12px 8px;
    }

    .brand small,
    .institutional-footer span:first-child {
        display: none;
    }

    .documents-pagination {
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
        min-height: 78px;
    }

    .pagination-actions {
        justify-content: space-between;
    }

    .pdf-modal-backdrop {
        padding: 2vh 2vw;
    }

    .pdf-modal {
        width: 96vw;
        height: 92vh;
    }

    .document-toast {
        right: 16px;
        left: 16px;
    }
}

@media (max-height: 820px) and (min-width: 701px) {
    .application-header {
        min-height: 54px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .application-content {
        padding-top: 10px;
        padding-bottom: 8px;
    }

    .documents-heading {
        margin-bottom: 7px;
    }

    .documents-heading h1 {
        font-size: 23px;
    }

    .documents-table-wrap th,
    .documents-table-wrap td {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .empty-document-row td {
        height: 49px;
    }

    .institutional-footer {
        padding-top: 7px;
        padding-bottom: 7px;
    }
}
