/* Shared reading and interaction rules; scoped to document forms and workbench. */
body { font-size: 16px; line-height: 1.6; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #1769aa; outline-offset: 3px; }
.document-page { color: #243247; }
.document-page .document-fields { table-layout: fixed; width: 100%; background: #fff; }
.document-page .document-fields > tbody > tr > th { width: 120px; padding: 16px 12px; background: #f4f7fb; color: #37465a; vertical-align: top; }
.document-page .document-fields > tbody > tr > td { padding: 16px; overflow-wrap: anywhere; vertical-align: top; }
.document-page .document-fields > thead h4 { font-size: 24px; line-height: 1.4; }
.document-page .form-control, .document-page select, .document-sign-dialog textarea { width: 100%; max-width: 100%; font: inherit; min-height: 44px; height: auto; padding: 10px 12px; border: 1px solid #a6b2c2; border-radius: 6px; }
.document-page textarea.form-control { line-height: 1.65; min-height: 120px; white-space: pre-wrap; overflow-wrap: anywhere; }
.document-page .form-control[disabled], .document-page .form-control[readonly] { color: #37465a; background: #f4f6f8; opacity: 1; }
.document-page .lst, .document-page .lst table, .document-page .lst table tr td { white-space: normal; }
.document-page .lst { max-width: 100%; flex-wrap: wrap; }
.document-page .lst table tr td { padding: 8px; overflow-wrap: anywhere; }
.document-page .lst label { display: inline; font-weight: normal; line-height: 1.8; }
.document-page input[type=checkbox], .document-page input[type=radio] { min-width: 20px; min-height: 20px; vertical-align: middle; margin: 8px 8px 8px 0; }
.document-page input[type=file] { max-width: 100%; }
.document-page .document-data-region { overflow-x: auto; max-width: 100%; }
.document-page .document-data-region table { min-width: 520px; }
.document-page .sign-history-table td { font-size: 14px; line-height: 1.65; }
.document-matrix-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.document-actions { position: sticky; bottom: 0; z-index: 100; display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; margin: 16px 0; background: #fff; border: 1px solid #d6dee9; border-radius: 8px; box-shadow: 0 -4px 12px rgb(30 50 70 / 8%); }
.document-actions .btn, .document-sign-dialog .btn, .workbench-page .btn { min-height: 44px; padding: 10px 18px; font-size: 16px; line-height: 1.4; }
.document-sign-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px !important; border: 1px solid #a6b2c2 !important; border-radius: 12px; box-shadow: 0 12px 48px rgb(0 0 0 / 28%); z-index: 10002; }
.document-sign-dialog h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.4; }
.document-sign-dialog label { display: block; margin-top: 20px; }
.document-sign-dialog .document-sign-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.document-sign-dialog .document-sign-error { color: #a51e2c; min-height: 1.6em; margin-top: 8px; }
.mp_css { background: #172b45 !important; opacity: .55 !important; }
.workbench-page { min-width: 0; }
.workbench-page .tabs { display: flex; padding: 0; margin: 0; list-style: none; border-bottom: 1px solid #b9c6d6; }
.workbench-page .tabs li { flex: 1; }
.workbench-page .tabs a { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px; color: #34465e; background: #f1f5fa; text-decoration: none; border-bottom: 3px solid transparent; }
.workbench-page .tabs a[aria-selected=true] { color: #145e9c; background: #fff; border-bottom-color: #1769aa; font-weight: bold; }
.workbench-page .tab_content { padding: 24px 0; }
.workbench-page .workbench-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 12px 0 24px; padding: 20px; background: #f5f7fa; border-radius: 8px; }
.workbench-filters label { display: block; margin: 0 0 6px; }
.workbench-filters input, .workbench-filters select { width: 100%; max-width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; border: 1px solid #a6b2c2; border-radius: 6px; }
.workbench-page .workbench-table-region { max-width: 100%; }
.workbench-page .table { font-size: 15px; line-height: 1.6; min-width: 740px; margin-bottom: 0; }
.workbench-page .table > tbody > tr > td { padding: 14px 12px; vertical-align: top; white-space: normal; }
.workbench-page .table > tbody > tr:hover { background: #f1f6fc; }
.workbench-page .table th { background: #edf2f8; color: #293b53; padding: 12px; border-bottom: 2px solid #c8d4e3; }
.workbench-page .document-title { min-width: 220px; max-width: 400px; overflow-wrap: anywhere; }
.workbench-page .document-title-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.workbench-page .document-open { display: inline-block; min-height: 44px; min-width: 44px; padding: 10px 4px; }
.workbench-page .workbench-pager a, .workbench-page .workbench-pager span { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 6px 10px; }
.workbench-page .workbench-feedback { margin: 12px 0; color: #34465e; }
.workbench-page .workbench-error { color: #a51e2c; }
[hidden] { display: none !important; }
@media (max-width: 767px) {
    .document-page .document-fields, .document-page .document-fields > thead, .document-page .document-fields > tbody, .document-page .document-fields > thead > tr, .document-page .document-fields > tbody > tr { display: block; }
    .document-page .document-fields > thead > tr > td, .document-page .document-fields > tbody > tr > th, .document-page .document-fields > tbody > tr > td { display: block; width: 100% !important; max-width: 100%; border: 0; text-align: left; }
    .document-page .document-fields > tbody > tr > th { padding: 16px 12px 4px; background: #fff; }
    .document-page .document-fields > tbody > tr > td { padding: 4px 12px 16px; border-bottom: 1px solid #e4e9f0; }
    .document-page .document-fields > tbody > tr > :empty { display: none; }
    .document-page .document-fields > tbody > tr.document-matrix-head { display: none; }
    .document-matrix-label { position: static; display: block; width: auto; height: auto; margin: 12px 0 6px; overflow: visible; clip: auto; white-space: normal; }
    .document-actions { padding: 12px; gap: 8px; }
    .document-actions .btn { flex: 1 1 auto; }
    .workbench-page .workbench-filters { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
    .workbench-page .tabs a { font-size: 14px; padding: 10px 2px; white-space: nowrap; }
    .document-sign-dialog { padding: 20px !important; }
}
@media print {
    .document-actions, .document-sign-dialog, .mp_css { display: none !important; }
    .document-page .document-data-region { overflow: visible; }
    .document-page .document-data-region table { min-width: 0; }
    .document-page .document-fields { display: table; }
    .document-page .document-fields > thead { display: table-header-group; }
    .document-page .document-fields > tbody { display: table-row-group; }
    .document-page .document-fields > thead > tr, .document-page .document-fields > tbody > tr { display: table-row; }
    .document-page .document-fields > thead > tr > td, .document-page .document-fields > tbody > tr > th, .document-page .document-fields > tbody > tr > td { display: table-cell; width: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
