/* Permit portal (Version 19). Cards per job: who, where it's filed, where the application stands. */
.permit-portal-page .page-toolbar { align-items: flex-start; }
.pp-filters { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 1px solid #c4ccd7; border-radius: 999px;
  background: #fff; color: #334155; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
}
.pp-chip b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #eef1f5; color: #101827; font-size: .78rem; text-align: center; }
.pp-chip.is-active { border-color: #101827; background: #101827; color: #fff; }
.pp-chip.is-active b { background: #f4c430; }
.pp-chip:focus-visible { outline: 3px solid #f4c430; outline-offset: 2px; }
.pp-city { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.pp-city select { min-height: 40px; min-width: 210px; padding: 0 10px; border: 1px solid #c4ccd7; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.pp-list { display: grid; gap: 10px; }
.pp-job {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid #c4ccd7; border-radius: 12px; background: #fff;
}
.pp-job[data-stage="send"] { border-left-color: #f4c430; }
.pp-job[data-stage="waiting"] { border-left-color: #64748b; }
.pp-job[data-stage="signed"] { border-left-color: #16a34a; }
.pp-job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pp-job-head h3 { margin: 0; font-size: 1.02rem; }
.pp-job-head span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.pp-address { margin: 3px 0 0; color: #334155; }
.pp-where { margin: 6px 0 0; font-size: .86rem; }
.pp-where span { color: var(--muted); }
.pp-job-state p { margin: 6px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.pp-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pp-actions .button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; white-space: nowrap; text-decoration: none; }
.pp-forms .panel-heading .button { white-space: nowrap; flex: none; }
.pp-forms-table td { vertical-align: middle; }
.pp-empty { padding: 28px 20px; border: 1px dashed #c4ccd7; border-radius: 12px; text-align: center; background: #fff; }
.pp-empty p { margin: 0 0 4px; }
.pp-forms { margin-top: 22px; padding: 20px; }
.pp-forms .panel-heading { padding: 0 0 14px; gap: 12px; }
.pp-forms .panel-heading p { color: var(--muted); }
.pp-tokens { margin-top: 14px; }
.pp-tokens summary { cursor: pointer; font-weight: 700; }
.pp-tokens p { color: var(--muted); font-size: .86rem; }
.pp-tokens dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin: 8px 0 0; }
.pp-tokens dl div { display: flex; gap: 8px; align-items: baseline; }
.pp-tokens dt code { padding: 2px 6px; border-radius: 6px; background: #eef1f5; font-size: .8rem; }
.pp-tokens dd { margin: 0; color: var(--muted); font-size: .84rem; }
.pp-dialog { max-height: calc(100dvh - 36px); overflow-y: auto; }
.pp-dialog > form > p:first-of-type { margin: 4px 0 12px; color: var(--muted); }
.pp-dialog-note { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.pp-dialog footer { display: flex; justify-content: flex-end; gap: 8px; }
.pp-dialog textarea { min-height: 72px; padding: 8px 10px; border: 1px solid var(--line-dark); border-radius: 8px; font: inherit; }
.status-pill.error { background: #fde8e8; color: #9b1c1c; }
@media (max-width: 860px) {
  .pp-job { grid-template-columns: 1fr; gap: 10px; }
  .pp-actions { justify-content: flex-start; }
  .pp-actions .button { flex: 1 1 140px; }
}
@media (max-width: 550px) {
  .pp-filters { align-items: stretch; }
  .pp-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -2px; }
  .pp-chip { flex: none; }
  .pp-city, .pp-city select { width: 100%; }
  .pp-forms { padding: 14px; }
}
