/* =====================================================================
   Painel do Cliente — Envio de arquivo: layout do modelo aprovado (somente LAYOUT)
   Não muda botões, caminhos, uploads, aprovação nem contratação.
   Tudo fica sob ".pl-fa-shell.pem" (classe posta por js/envio-modelo.js).
   ===================================================================== */
body:not(.pl-auth-locked) .main > h2 { display: none !important; }
body:not(.pl-auth-locked) .main > .page-card {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
}

body:not(.pl-auth-locked) .main .pl-fa-shell.pem {
  --pem-pri: #6d28d9; --pem-ink: #1e1b2e; --pem-lab: #6b6585; --pem-line: #e7e4ef; --pem-line2: #f1eff6;
  --pem-ok: #166534; --pem-okbg: #dcfce7; --pem-warn: #9a3412; --pem-warnbg: #ffedd5;
  display: flex; flex-direction: column; gap: 18px; color: var(--pem-ink); max-width: 1116px; width: 100%;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-card {
  background: #fff; border: 1px solid var(--pem-line); border-radius: 16px; padding: 22px; margin: 0; box-shadow: none;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-lbl,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-action__title,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-history__title {
  margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pem-lab);
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; min-height: 42px;
  padding: 0 16px; font-family: inherit; font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none;
}

/* ---------- Situação dos arquivos (hero) ---------- */
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  background: linear-gradient(135deg, #1c1840, #2b2470 60%, #4a2fa8); color: #fff; border: 0; border-radius: 16px; padding: 22px;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status__eyebrow {
  margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status__title { margin: 6px 0 4px; font-size: 24px; font-weight: 800; color: #fff; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status__desc { margin: 0; color: #d4d0f5; font-size: 14.5px; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status__meta { margin: 8px 0 0; color: #a5a1d1; font-size: 12.5px; }
.pem .pem-pill {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700;
  background: rgba(251, 191, 36, .16); color: #fcd34d; white-space: nowrap; align-self: start; justify-self: start;
}
.pem .pem-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pem .pem-pill.is-ok { background: rgba(134, 239, 172, .16); color: #86efac; }
.pem .pem-steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; position: relative; }
.pem .pem-steps::before, .pem .pem-steps::after {
  content: ""; position: absolute; left: 12.5%; top: 15px; height: 3px;
}
.pem .pem-steps::before { right: 12.5%; background: rgba(255, 255, 255, .18); }
.pem .pem-steps::after { width: var(--pem-prog, 0%); background: #a78bfa; }
.pem .pem-st { position: relative; text-align: center; font-size: 12.5px; color: #c4c0ec; font-weight: 600; }
.pem .pem-st i {
  display: grid; place-items: center; margin: 0 auto 7px; width: 32px; height: 32px; border-radius: 50%; background: #2d2869;
  border: 2px solid rgba(255, 255, 255, .25); font-style: normal; font-size: 13px; position: relative; z-index: 1; color: #fff;
}
.pem .pem-st.ok i { background: #a78bfa; border-color: #a78bfa; color: #1c1840; }
.pem .pem-st.now i { background: #fff; color: #6d28d9; border-color: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .18); }
.pem .pem-st.now { color: #fff; }
.pem .pem-st small { display: block; font-weight: 500; font-size: 11px; color: #a5a1d1; margin-top: 2px; }
.pem .pem-stnow { display: none; }

/* ---------- Mensagem da equipe ---------- */
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--team-msg { background: #f7f5ff; border-color: #ddd6fe; }

/* ---------- Arquivos ---------- */
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--files { background: transparent; border: 0; padding: 0; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--files > .pl-fa-block__title { display: none; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-files-empty {
  margin: 0; background: #fff; border: 1px dashed var(--pem-line); border-radius: 16px; padding: 22px; color: var(--pem-lab);
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-files { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  background: #fff; border: 1px solid var(--pem-line); border-radius: 16px; padding: 22px; margin: 0;
}
.pem .pem-pdf {
  width: 52px; height: 62px; border-radius: 10px; background: #fee2e2; color: #dc2626; display: grid; place-items: center;
  font-weight: 900; font-size: 13px; position: relative; overflow: hidden;
}
.pem .pem-pdf::after {
  content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 14px 14px 0;
  border-color: transparent #fff #fecaca transparent;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__main { min-width: 0; display: block; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__role {
  margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pem-pri);
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__name {
  margin: 4px 0 2px; font-size: 16px; font-weight: 700; color: var(--pem-ink); overflow-wrap: anywhere;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__meta { margin: 0; font-size: 13px; color: var(--pem-lab); }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__pill {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; background: var(--pem-okbg); color: var(--pem-ok); border: 0;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__pill::before { content: "✓"; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; width: auto;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions .btn {
  min-height: 40px; height: 40px; font-size: 13.5px; width: 100%; border: 1px solid #ddd6fe; background: #fff; color: var(--pem-ink);
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions [data-pc-fa-preview]::before { content: "👁"; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions a[download]::before { content: "⬇"; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions .pem-alt { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions .pem-alt::before { content: "✎"; }

/* ---------- Próxima ação ---------- */
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; row-gap: 0; align-items: center;
  background: #fffbf5; border: 1px solid #fdba74;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action > .pl-fa-action { display: contents; }
.pem .pem-ic {
  grid-column: 1; grid-row: 1 / 4; width: 46px; height: 46px; border-radius: 12px; background: #f97316; color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 800; align-self: center;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action > .pl-fa-action__title { grid-column: 2; grid-row: 1; color: var(--pem-warn); }
.pem .pem-nt { grid-column: 2; grid-row: 2; display: block; font-size: 16.5px; margin: 3px 0 2px; color: var(--pem-ink); }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-action__msg {
  grid-column: 2; grid-row: 3; margin: 0; color: #7c2d12; font-size: 14px; font-weight: 400;
}
.pem .pem-sup { grid-column: 3; grid-row: 1 / 4; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .btn--primary,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-sup {
  background: var(--pem-pri); border: 1px solid var(--pem-pri); color: #fff;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-upload-form,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-action__btns,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-services__list { grid-column: 1 / -1; margin-top: 14px; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-action__btns { display: flex; flex-wrap: wrap; gap: 8px; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-action__btns .btn:not(.btn--primary) {
  background: #fff; border: 1px solid #ddd6fe; color: var(--pem-ink);
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-upload-form {
  background: #fff; border: 1px solid #fed7aa; border-radius: 12px; padding: 14px;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-services__list {
  list-style: none; padding: 10px 14px; background: #fff; border: 1px solid #fed7aa; border-radius: 12px;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-service-line {
  display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid #fde7d4;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-service-line strong { font-weight: 500; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-service-line:last-child { border-bottom: 0; font-weight: 800; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-service-line:last-child strong { font-weight: 800; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-service-line__detail { text-align: right; white-space: nowrap; }
/* tons */
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action.pem-t-ok { background: #f0fdf4; border-color: #86efac; }
.pem .pem-t-ok .pem-ic { background: #16a34a; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-t-ok > .pl-fa-action__title,
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-t-ok .pl-fa-action__msg { color: var(--pem-ok); }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action.pem-t-info { background: #f7f5ff; border-color: #ddd6fe; }
.pem .pem-t-info .pem-ic { background: var(--pem-pri); }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-t-info > .pl-fa-action__title { color: var(--pem-pri); }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-t-info .pl-fa-action__msg { color: #3b3654; }

/* ---------- Histórico + dicas ---------- */
.pem .pem-low { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.pem .pem-hh { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pem .pem-cnt { color: var(--pem-lab); font-size: 13px; white-space: nowrap; cursor: pointer;
  background: none; border: 0; padding: 4px 0; font-family: inherit; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline {
  list-style: none; margin: 14px 0 0; padding: 0 !important; display: flex !important; flex-direction: column-reverse !important;
  flex-wrap: nowrap !important; gap: 0 !important; overflow: visible !important;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item {
  position: relative; display: block !important; padding: 0 0 14px 30px !important; margin: 0; font-size: 14px;
  min-width: 0 !important; width: auto !important; flex: none !important; text-align: left !important; border: 0; background: none;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item::after { display: none !important; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item::before {
  content: ""; display: block !important; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: var(--pem-line2);
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item:first-child::before { display: none !important; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item > div { display: block !important; padding: 0; text-align: left !important; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__check {
  position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: 0 !important; border-radius: 50%; background: var(--pem-okbg);
  color: var(--pem-ok); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; border: 0; box-shadow: none;
}
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item.pem-c .pl-fa-timeline__check { background: var(--pem-warnbg); color: var(--pem-warn); font-size: 0; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__item.pem-c .pl-fa-timeline__check::before { content: "!"; font-size: 11px; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__label { white-space: normal !important; margin: 0; font-size: 14px; font-weight: 500; color: var(--pem-ink); }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-timeline__time { white-space: normal !important; display: block; color: var(--pem-lab); font-size: 12.5px; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-hist:not(.is-all) .pl-fa-timeline__item:nth-last-child(n+5) { display: none !important; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-hist:not(.is-all) .pl-fa-timeline__item:nth-last-child(4)::before { display: none !important; }
body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-hist.is-closed .pl-fa-timeline, body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-hist.is-closed .pem-more { display: none !important; }
.pem .pem-more { display: inline-block; margin-top: 4px; color: var(--pem-pri); font-weight: 700; font-size: 13.5px;
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.pem .pem-tips ul { margin: 12px 0 0; padding: 0; list-style: none; }
.pem .pem-tips li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; color: #3b3654; }
.pem .pem-tips li span { color: #16a34a; font-weight: 900; }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem { gap: 14px; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec,
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pem-card,
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status,
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row { padding: 16px; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--files { padding: 0; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status { grid-template-columns: 1fr; gap: 12px; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-status__title { font-size: 21px; }
  .pem .pem-st { font-size: 0; }
  .pem .pem-st small { display: none; }
  .pem .pem-st i { width: 26px; height: 26px; font-size: 11px; margin-bottom: 0; }
  .pem .pem-steps::before, .pem .pem-steps::after { top: 12px; }
  .pem .pem-stnow { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; text-align: center; color: #fff; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-files,
  .pem .pem-low { grid-template-columns: 1fr; gap: 14px; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action { grid-template-columns: auto minmax(0, 1fr); }
  .pem .pem-sup { grid-column: 1 / -1; grid-row: auto; width: 100%; margin-top: 14px; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-sec--action .pl-fa-action__btns .btn { width: 100%; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-service-line { flex-wrap: wrap; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions { grid-template-columns: 1fr 1fr; }
  body:not(.pl-auth-locked) .main .pl-fa-shell.pem .pl-fa-file-row__actions .pem-alt { grid-column: 1 / -1; }
}
