
/* Pacote 21 - correções funcionais e neutralidade institucional */
.pje-doc-details code {
    max-height: 120px;
    overflow: auto;
}
.pje-badge-neutral {
    background: #eef2f7;
    color: #334155;
    border: 1px solid #d8e0ea;
}
.pje-doc-placeholder .muted-text {
    margin-top: 8px;
}
.pje-viewer-toolbar .actions {
    flex-wrap: wrap;
    gap: 8px;
}
.pje-doc-frame {
    background: #fff;
}

/* Pacote 22 - acabamento visual do workbench */
.container-wide { max-width: 1680px; }
.pje-screen-shell { gap: 16px; }
.pje-process-band {
    border-radius: 24px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.pje-process-band-actions .btn { min-width: 170px; }
.pje-info-strip {
    border-radius: 18px;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    margin-bottom: 16px;
}
.pje-workbench-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}
.pje-acervo-column.card,
.pje-viewer-column.card,
.pje-detail-column .card {
    border-radius: 20px;
    padding: 18px 18px 16px;
}
.pje-acervo-column.card { position: sticky; top: 14px; }
.pje-detail-column { position: sticky; top: 14px; align-self: start; }
.pje-pane-subtitle { margin: 4px 0 0; font-size: .92rem; line-height: 1.45; }
.pje-doc-list-compact {
    max-height: 500px;
    overflow: auto;
    padding-right: 6px;
    margin-bottom: 12px;
}
.pje-event-list-tight {
    max-height: 360px;
    overflow: auto;
    padding-right: 6px;
}
.pje-doc-row {
    display: block;
    padding: 12px 12px 10px;
    border: 1px solid #dce5f2;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #fff;
}
.pje-doc-row.is-active {
    border-color: #1f5fbf;
    box-shadow: 0 0 0 3px rgba(31,95,191,.08);
}
.pje-doc-row-title {
    font-size: 1.02rem;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 4px;
}
.pje-doc-row-meta { color: #6b7280; font-size: .92rem; line-height: 1.35; }
.pje-viewer-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}
.pje-viewer-toolbar .actions {
    justify-content: flex-end;
}
.pje-viewer-title {
    font-size: 1.1rem;
    line-height: 1.25;
    margin-bottom: 4px;
}
.pje-doc-frame-tall {
    min-height: 840px;
    width: 100%;
    border: 1px solid #dce5f2;
    background: #fff;
}
.pje-doc-placeholder {
    min-height: 320px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed #c8d6ea;
    border-radius: 16px;
    background: #f8fbff;
    padding: 24px;
}
.pje-doc-details {
    margin-top: 14px;
    border-top: 1px solid #e5ecf5;
    padding-top: 14px;
}
.pje-doc-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}
.pje-doc-details code {
    display: block;
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow-wrap: anywhere;
    max-height: 110px;
    overflow: auto;
}
.pje-signature-list {
    margin: 10px 0 0;
    padding-left: 18px;
}
.pje-signature-list li {
    margin-bottom: 12px;
}
.pje-mini-list li {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-top: 1px solid #eef2f7;
}
.pje-party-block {
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fbfdff;
}
@media (max-width: 1320px) {
    .pje-workbench-grid {
        grid-template-columns: 300px minmax(0, 1fr);
    }
    .pje-detail-column {
        grid-column: 1 / -1;
        position: static;
    }
}
@media (max-width: 980px) {
    .pje-workbench-grid {
        grid-template-columns: 1fr;
    }
    .pje-acervo-column.card, .pje-detail-column {
        position: static;
    }
    .pje-viewer-toolbar {
        grid-template-columns: 1fr;
    }
    .pje-doc-details-grid {
        grid-template-columns: 1fr;
    }
}


/* Pacote 23 - polimento visual do workbench e do acervo */
.pje-acervo-header .btn-secondary {
    background: rgba(255,255,255,.16);
    color: #ffffff !important;
    border-color: rgba(255,255,255,.36);
}
.pje-acervo-header .btn-secondary:hover,
.pje-process-band .btn-secondary:hover {
    background: rgba(255,255,255,.24);
    color: #ffffff !important;
}
.pje-acervo-header .btn-primary {
    background: #ffffff;
    color: #0c4f9d !important;
    border-color: #ffffff;
}
.pje-process-band .btn-secondary {
    background: rgba(255,255,255,.16);
    color: #ffffff !important;
    border-color: rgba(255,255,255,.36);
}
.pje-process-band .btn-primary {
    background: #ffffff;
    color: #0a5b0a !important;
    border-color: #ffffff;
}
.pje-workbench-grid-23 {
    grid-template-columns: 340px minmax(0, 1fr) 360px;
    gap: 18px;
}
.pje-pane-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}
.pje-pane-head-inline {
    grid-template-columns: 1fr;
}
.pje-pane-head-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
}
.pje-pane-head-text p {
    margin: 0;
    line-height: 1.45;
}
.pje-acervo-column.card,
.pje-viewer-column.card,
.pje-detail-column .card {
    padding: 18px;
}
.pje-doc-list-compact {
    max-height: 430px;
}
.pje-event-list-tight {
    max-height: 430px;
    overflow: auto;
    border-top: 1px solid #e8eef6;
    padding-top: 12px;
}
.pje-event-item {
    display: grid;
    grid-template-columns: 54px minmax(0,1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}
.pje-event-time {
    font-weight: 700;
    color: #17314d;
}
.pje-event-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}
.pje-event-desc {
    color: #4b5563;
    line-height: 1.45;
}
.pje-viewer-toolbar-23 {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 14px;
    align-items: start;
}
.pje-viewer-toolbar-meta {
    min-width: 0;
}
.pje-viewer-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    max-width: 340px;
}
.pje-viewer-toolbar-actions form {
    margin: 0;
}
.pje-viewer-title {
    font-size: 1.15rem;
    line-height: 1.2;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
}
.pje-doc-frame-tall {
    min-height: 980px;
}
.pje-doc-details summary {
    cursor: pointer;
    font-weight: 700;
}
.pje-doc-details-grid > div {
    min-width: 0;
}
.pje-detail-column .card {
    margin-bottom: 16px;
}
.pje-party-block p {
    margin: 0 0 12px 0;
}
.pje-acervo-table-head {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr .95fr .6fr;
    gap: 16px;
    padding: 0 4px 12px;
    border-bottom: 1px solid #e5ecf5;
    color: #5b6780;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .02em;
}
.pje-acervo-list-table {
    gap: 0;
}
.pje-acervo-row-table {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr .95fr .6fr;
    gap: 16px;
    padding: 16px 4px;
    border: 0;
    border-bottom: 1px solid #e9eef5;
    border-radius: 0;
    background: transparent;
    align-items: center;
}
.pje-acervo-row-table:hover {
    box-shadow: none;
    background: #f9fbfe;
}
.pje-acervo-row-protocol {
    color: #64748b;
    font-size: .92rem;
}
.pje-acervo-row-parties-block {
    display: grid;
    gap: 6px;
}
.pje-acervo-row-versus {
    color: #17314d;
    font-weight: 700;
}
.pje-acervo-row-meta-stack {
    gap: 8px;
    align-content: start;
}
.pje-acervo-row-actions {
    align-items: start;
}
@media (max-width: 1420px) {
    .pje-workbench-grid-23 {
        grid-template-columns: 300px minmax(0,1fr) 320px;
    }
}
@media (max-width: 1180px) {
    .pje-workbench-grid-23 {
        grid-template-columns: 1fr;
    }
    .pje-acervo-table-head,
    .pje-acervo-row-table {
        grid-template-columns: 1fr;
    }
    .pje-viewer-toolbar-23 {
        grid-template-columns: 1fr;
    }
    .pje-viewer-toolbar-actions {
        max-width: none;
        justify-content: flex-start;
    }
}
