/* Estilos da fila e dos formulários do PJe. */
.pje-actions,
.pje-inline,
.pje-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}
.pje-actions { margin: 0 0 .15rem; }
.pje-inline { flex-wrap: nowrap; }
.pje-inline input { flex: 1; min-width: 0; }
.pje-inline .btn { flex-shrink: 0; }
.pje-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: .8rem 1rem;
  margin-bottom: 1rem;
}
.pje-queue-head p { margin-bottom: 0; }
.pje-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: .7rem;
  width: min(100%, 33rem);
}
.pje-filters label {
  display: grid;
  gap: .25rem;
  font-size: .9rem;
  font-weight: 650;
}
.pje-table { min-width: 42rem; }
.pje-table td { vertical-align: middle; }
.pje-number {
  padding: .12rem 0;
  border: 0;
  color: var(--accent, #3158c9);
  background: transparent;
  text-align: left;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.pje-number:hover { text-decoration: underline; }
.pje-copy-label {
  color: var(--accent, #3158c9);
  margin-left: .5rem;
  font-size: .875rem;
  font-weight: 650;
}
.pje-cell-sub {
  display: block;
  color: var(--muted, #586780);
  margin-top: .22rem;
  font-size: .875rem;
}
.pje-urgent { color: #a1283b; font-weight: 680; }
.pje-pill { white-space: normal; }
.pje-pill.red { color: #8b263c; background: #fbe7ed; }
.pje-pill.amber { color: #75500a; background: #fff1d2; }
.pje-pill.blue { color: #244da9; background: #e8efff; }
.pje-pill.green { color: #206448; background: #e0f5e9; }
.pje-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pje-dialog {
  position: fixed;
  padding: 0;
  width: min(48rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  border: 1px solid var(--line, #dfe5ef);
  color: var(--ink, #17243b);
  border-radius: .9rem;
  background: var(--surface, #fff);
  box-shadow: 0 1.3rem 4rem rgb(19 35 78 / 22%);
}
.pje-dialog::backdrop { background: rgb(28 39 64 / 49%); }
.pje-dialog-head {
  z-index: 1;
  display: flex;
  position: sticky;
  top: 0;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .85rem 1.3rem;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--line, #dfe5ef);
}
.pje-dialog-head h2 { margin: 0; }
.pje-dialog-body { padding: 1.2rem 1.3rem; }
.pje-form,
.pje-import-form { display: grid; gap: 1rem; }
.pje-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .78rem 1rem;
}
.pje-fields .field,
.pje-fields > label { min-width: 0; }
.pje-fields > label {
  display: grid;
  gap: .2rem;
  font-size: .9rem;
  font-weight: 650;
}
.pje-fields .pje-wide { grid-column: 1 / -1; }
.pje-fields p { margin: 0; }
.pje-required { color: #9e3047; padding-left: .24rem; }
.pje-field-missing {
  color: #a1283b;
  font-size: .9rem;
  font-weight: 620;
}
.pje-form [aria-invalid="true"] { border-color: #bd5265; }
.pje-source {
  color: var(--muted, #586780);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.pje-source p { margin: .22rem 0 .1rem; white-space: pre-wrap; }
.pje-form summary,
.pje-import-form summary { cursor: pointer; }
.pje-reading,
.pje-docs {
  border: 1px solid var(--line, #dfe5ef);
  border-radius: .65rem;
  background: #f9fbff;
  padding: .85rem;
}
.pje-reading p { margin: .55rem 0; }
.pje-reading ul { margin: .5rem 0 0; }
.pje-reading input[type="file"] { margin: .35rem 0 .5rem; }
.pje-document-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
}
.pje-document-head h3 { margin: 0; }
.pje-docs p { margin: 0; }
.pje-document {
  padding: .7rem 0 0;
  border-top: 1px solid var(--line, #dfe5ef);
}
.pje-document + .pje-document { margin-top: .8rem; }
.pje-document .pje-actions { margin-top: .7rem; }
.pje-dialog-footer {
  justify-content: flex-end;
  padding: .72rem 0 0;
  border-top: 1px solid var(--line, #dfe5ef);
}
.pje-dialog-footer button { min-width: 9rem; }
.pje-linked { margin: .6rem 0 0; }
.pje-error,
.pje-callout,
.pje-import-alerts {
  padding: .65rem .8rem;
  border: 1px solid #ead7b1;
  background: #fff6e2;
  border-radius: .6rem;
  color: #694a16;
}
.pje-error { border-color: #eec9d0; background: #fff1f4; color: #8b2334; }
.pje-callout p { margin: .3rem 0 .55rem; }
.pje-form > .muted { margin: 0; font-size: .875rem; }
.pje-drop {
  display: grid;
  gap: .45rem;
  padding: 1rem;
  border: 1px dashed #9baecc;
  border-radius: .7rem;
  background: #f6f9ff;
}
.pje-drop-active { border-color: var(--accent, #3158c9); background: #e8efff; }
.pje-drop label { font-weight: 680; }
.pje-drop p,
.pje-import-form > .muted { margin: 0; }
.pje-import-preview-list,
.pje-import-alerts,
.pje-file-list,
.pje-attachments { margin: .15rem 0; }
.pje-file-list,
.pje-import-preview-list { list-style: none; padding: 0; }
.pje-file-list li,
.pje-import-preview-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .42rem 0;
  overflow-wrap: anywhere;
}
.pje-file-list li + li,
.pje-import-preview-list li + li { border-top: 1px solid var(--line, #dfe5ef); }
.pje-import-preview-list p { margin: .16rem 0 0; }
.pje-import-alerts { padding-left: 1.7rem; }
.pje-check { display: flex; align-items: center; gap: .5rem; }
.pje-check input[type="checkbox"] { width: 1rem; height: 1rem; min-height: 0; flex-shrink: 0; }
.pje-attachments { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: .6rem 0 0; }

@media (max-width: 550px) {
  .pje-dialog { width: calc(100% - .8rem); max-height: calc(100dvh - .8rem); }
  .pje-dialog-body, .pje-dialog-head { padding: .8rem; }
  .pje-fields, .pje-filters { grid-template-columns: minmax(0, 1fr); }
  .pje-dialog-footer { align-items: stretch; }
  .pje-dialog-footer .btn { flex: 1 1 100%; }
}

