/* Posse e chaves 2.0 — scoped to the existing SecondaryDialog. */
.contract-secondary-dialog[data-secondary-id="possession"] {
  width: min(1080px, calc(100vw - 44px));
  max-width: 1080px;
  max-height: calc(100dvh - 104px);
  min-height: min(650px, calc(100dvh - 104px));
  border: 1px solid #d1dfef;
  border-radius: 18px;
  background: #fff;
  color: #1a2d48;
  font-family: var(--font-sans);
  letter-spacing: -.008em;
  box-shadow: 0 26px 78px #0b1f3a42;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[data-secondary-id="possession"] > header {
  flex: none;
  padding: 24px 28px 19px;
  border-bottom: 1px solid #e0e7f0;
  background: #fff;
  gap: 15px;
}
[data-secondary-id="possession"] #secondary-dialog-title { display: flex; align-items: center; gap: 13px; font-size: var(--text-xl); letter-spacing: -.04em; line-height: 1.25; margin: 0; min-width: 0; }
[data-secondary-id="possession"] #secondary-dialog-title > svg { flex: none; width: 45px; height: 45px; padding: 11px; background: #ebf4ff; color: #0864bf; border: 1px solid #d4e8ff; border-radius: 13px; }
[data-secondary-id="possession"] #secondary-dialog-title > span { min-width: 0; }
[data-secondary-id="possession"] #secondary-dialog-title small { display: block; font-size: var(--text-2xs); font-weight: 700; color: #6e80a0; letter-spacing: .1em; margin-bottom: 4px; }
[data-secondary-id="possession"] #secondary-dialog-title em { display: block; color: #65758c; font-size: var(--text-xs); font-weight: 400; font-style: normal; letter-spacing: normal; margin-top: 4px; overflow-wrap: anywhere; }
[data-secondary-id="possession"] .secondary-close { border: 1px solid #e1e9f2; border-radius: 50%; width: 36px; height: 36px; min-width: 36px; padding: 8px; }
[data-secondary-id="possession"] > .contract-secondary-content { padding: 0; display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; }
.ps-header-status { margin-left: auto; border: 1px solid #d5e9de; background: #eff3f8; color: #526780; font-size: var(--text-xs); white-space: nowrap; }
.ps-shell { display: flex; flex-direction: column; min-height: 0; flex: 1; font-size: var(--text-sm); }
.ps-shell svg { width: 18px; height: 18px; flex: none; }
.ps-shell [hidden] { display: none !important; }
.ps-shell :focus-visible { outline: 3px solid #8ac8ff; outline-offset: 3px; }
.ps-shell button, .ps-shell summary { font-size: var(--text-xs); font-weight: 700; border-radius: 9px; min-height: 41px; }
.ps-shell button[type="submit"] { background: #0969c2; color: white; border: 1px solid #0969c2; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.ps-shell button[type="submit"]:hover { background: #095cab; }
.ps-shell button:disabled { opacity: .5; cursor: not-allowed; }
.ps-shell .secondary-button { background: white; border: 1px solid #d9e4f0; color: #3c5b79; box-shadow: none; }
.ps-summary { display: grid; grid-template-columns: 1.05fr 1fr 1fr; padding: 0 28px; background: #fbfcfe; border-bottom: 1px solid #e0e7f0; flex: none; }
.ps-summary > div { display: flex; align-items: center; gap: 11px; padding: 15px 10px 15px 0; min-width: 0; }
.ps-summary > div:not(:last-child) { border-right: 1px solid #e7edf4; margin-right: 20px; }
.ps-summary > div > div { display: grid; gap: 3px; min-width: 0; }
.ps-summary svg { width: 33px; height: 33px; padding: 8px; border-radius: 9px; background: #f0f5fb; color: #5881aa; }
.ps-summary span { font-size: var(--text-2xs); color: #65758c; }
.ps-summary strong { font-size: var(--text-sm); color: #183555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-shell .possession-tabs { display: flex; flex-wrap: nowrap; justify-content: flex-start; flex: none; gap: 5px; padding: 0 22px; margin: 0; border: 0; border-bottom: 1px solid #e0e7f0; background: white; border-radius: 0; overflow-x: auto; }
.ps-shell .possession-tabs button { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 17px 16px 15px; white-space: nowrap; background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: #64758e; font-size: var(--text-sm); }
.ps-shell .possession-tabs button.active { color: #0759ad; border-bottom-color: #0871ce; box-shadow: none; background: #fff; }
.ps-tab-pending { border-radius: 20px; background: #fff2df; color: #8c5300; padding: 2px 7px; font-size: var(--text-2xs); }
.ps-shell .possession-tab-content { flex: 1; min-height: 0; overflow: auto; padding: 25px 28px 28px; scrollbar-color: #cbd7e5 transparent; }
.ps-section-top { position: relative; margin-bottom: 19px; }
.ps-config-badge { position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cce3ff; border-radius: 99px; padding: 7px 10px; background: #eaf3ff; color: #0a61b1; font-size: var(--text-2xs); }
.ps-legacy-documents { grid-column: 1 / -1; }
.ps-section-top h3 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -.025em; color: #173353; margin: 0 0 5px; }
.ps-section-top p { color: #65758c; font-size: var(--text-xs); line-height: 1.6; margin: 0; }
.ps-shell .possession-form { display: block; padding: 0; border: 0; background: none; }
.ps-planning-layout { display: grid; grid-template-columns: 1.25fr .8fr; gap: 20px; align-items: start; }
.ps-planning-layout > fieldset { padding: 21px; border: 1px solid #e2e9f2; border-radius: 14px; min-width: 0; margin: 0; }
.ps-card-title { font-size: var(--text-sm); font-weight: 700; display: flex; align-items: center; gap: 9px; color: #1b3556; margin: 0 0 18px; }
.ps-card-title > span { width: 24px; height: 24px; display: grid; place-items: center; background: #e9f3ff; color: #0870c8; border-radius: 7px; font-size: var(--text-2xs); }
.ps-shell .possession-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
.ps-shell .possession-form .span-2 { grid-column: auto; }
.ps-shell label { display: grid; gap: 8px; color: #273e59; font-size: var(--text-xs); font-weight: 700; min-width: 0; }
.ps-shell input:not([type="radio"], [type="checkbox"], [type="hidden"]), .ps-shell select, .ps-shell textarea { width: 100%; min-width: 0; min-height: 43px; border: 1px solid #d7e1ec; background: white; color: #1d3653; border-radius: 9px; padding: 10px 12px; font-size: var(--text-sm); font-weight: 400; }
.ps-shell textarea { resize: vertical; line-height: 1.6; min-height: 110px; }
.ps-shell label small { font-size: var(--text-2xs); color: #8191a3; font-weight: 400; line-height: 1.5; }
.ps-nature { display: grid; gap: 8px; color: #273e59; font-size: var(--text-xs); font-weight: 700; }
.ps-segmented { display: flex; gap: 4px; background: #f2f6fb; padding: 4px; border-radius: 10px; border: 1px solid #e3eaf3; }
.ps-segmented label { flex: 1; text-align: center; position: relative; cursor: pointer; display: block; }
.ps-segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps-segmented span { display: grid; place-items: center; padding: 11px 8px; min-height: 40px; border-radius: 7px; color: #6a7b92; font-size: var(--text-xs); height: 100%; }
.ps-segmented input:checked + span { background: white; color: #095da9; box-shadow: 0 2px 7px #1836561c; }
.ps-segmented input:focus-visible + span { outline: 3px solid #8ac8ff; }
.ps-info { margin: 17px 0 0; background: #f2f7fe; border: 1px solid #dceafa; border-radius: 10px; padding: 11px 13px; color: #3e6589; font-size: var(--text-xs); line-height: 1.55; font-weight: 400; }
.ps-preview-card { border-radius: 16px; background: linear-gradient(145deg,#123761 0%,#0b599e 100%); color: white; padding: 24px; min-height: 271px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ps-preview-card > span:first-child { font-size: var(--text-xs); color: #b9d7f4; margin-bottom: 7px; }
.ps-preview-card > strong { font-size: var(--text-2xl); font-weight: 700; line-height: 1; letter-spacing: -.055em; }
.ps-preview-card [data-preview-month] { font-size: var(--text-md); font-weight: 700; letter-spacing: .1em; }
.ps-preview-card p { font-size: var(--text-2xs); color: #c5e1fa; line-height: 1.6; margin: 8px 0 0; }
.ps-preview-rule { background: #d7ffe924; color: #d9ffea; border: 1px solid #e6fff438; border-radius: 99px; padding: 6px 9px; font-size: var(--text-2xs); margin-top: 9px; }
.ps-preview-details { margin: 15px 0 0; border: 1px solid #e2eaf4; border-radius: 13px; padding: 8px 18px; }
.ps-preview-details > div { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf1f5; font-size: var(--text-xs); }
.ps-preview-details > div:last-child { border: 0; }
.ps-preview-details dt { color: #70829a; }
.ps-preview-details dd { margin: 0; color: #1a385a; font-weight: 700; text-align: right; }
.ps-delivery-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 18px; }
.ps-delivery-summary > div { background: #f6f9fc; border: 1px solid #e5edf5; border-radius: 13px; padding: 18px 19px; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; }
.ps-delivery-summary span { font-size: var(--text-2xs); color: #71859b; }
.ps-delivery-summary strong { font-size: var(--text-lg); color: #173758; grid-column: 1; }
.ps-delivery-summary svg { grid-column: 2; grid-row: 1 / 3; color: #8aa3bb; width: 23px; height: 23px; }
.ps-shell .ps-delivery-layout { display: grid; grid-template-columns: 1fr .88fr; gap: 18px; align-items: start; }
.ps-delivery-fields { padding: 21px; border: 1px solid #e2e9f2; border-radius: 14px; display: grid; gap: 17px; }
.ps-delivery-fields .ps-card-title { margin: 0; }
.ps-delivery-notices { display: grid; gap: 13px; }
.ps-delivery-notices p { margin: 0; }
.ps-date-notice { background: #fff7e8; border: 1px solid #f7dba8; border-radius: 11px; padding: 14px 15px; color: #8b580c; font-size: var(--text-xs); line-height: 1.55; }
.ps-shell .possession-materials { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ps-shell .possession-materials > .ps-section-top { grid-column: 1 / -1; margin-bottom: 3px; }
.ps-shell .possession-document-card { padding: 18px; border: 1px solid #dee7f1; border-radius: 14px; min-width: 0; background: white; overflow: visible; align-self: start; }
.ps-shell .possession-document-card > header { display: flex; align-items: flex-start; padding: 0 0 16px; gap: 11px; background: white; border-bottom: 1px solid #e9eef4; }
.ps-shell .possession-document-card > header > .ps-material-icon { display: grid; place-items: center; width: 41px; height: 41px; flex: none; background: #eef5ff; color: #0d6ab6; border: 1px solid #dceaff; border-radius: 11px; }
.ps-shell .possession-document-heading { flex: 1; min-width: 0; border: 0; padding: 3px 0; }
.ps-shell .possession-document-heading .possession-document-title { color: #1b3454; font-size: var(--text-base); letter-spacing: normal; text-transform: none; line-height: 1.4; }
.ps-shell .possession-document-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: auto; }
.ps-shell .document-pending { padding: 5px 8px; font-size: var(--text-2xs); border-radius: 99px; background: #eff3f8; color: #526780; white-space: normal; }
.ps-shell .document-pending.is-pending { background: #fff5e4; color: #945a00; }
.ps-document-action { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding-top: 15px; }
.ps-document-action > p { color: #73869d; margin: 0; font-size: var(--text-2xs); line-height: 1.5; }
.ps-document-progress > summary { display: flex; align-items: center; justify-content: center; padding: 10px 12px; cursor: pointer; list-style: none; width: fit-content; background: #eff6ff !important; border-color: #d5e7ff !important; color: #075da9 !important; }
.ps-document-progress > summary::-webkit-details-marker { display: none; }
.ps-document-progress[open] { grid-column: 1 / -1; }
.ps-document-progress[open] > summary { margin-bottom: 16px; }
.ps-shell .possession-document-toggle-form { padding: 16px 0 0; border-top: 1px dashed #cfdeee; background: white; }
.ps-shell .document-toggle-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-shell .possession-document-toggle-form .form-actions { margin-top: 16px; }
.ps-shell .possession-document-edit-form { padding: 16px 0 0; }
.ps-shell .possession-document-edit-actions { display: grid; grid-template-columns: 1fr; }
.ps-shell .possession-history { list-style: none; margin: 5px 0 20px 12px; padding: 0 0 0 27px; border-left: 2px solid #dce8f4; }
.ps-shell .possession-history-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 0 0 24px; border: 0; background: white; }
.ps-shell .possession-history-item > span { margin-left: -45px; color: #0c71c7; background: #e3f2ff; border: 4px solid white; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.ps-shell .possession-history-item > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ps-shell .possession-history-item.voided { text-decoration: none; opacity: 1; }
.ps-shell .possession-history-item.voided small { color: #a33535; }
.ps-footer { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 28px; border-top: 1px solid #e0e7f0; background: #fbfcfe; }
.ps-footer > span { display: flex; align-items: center; gap: 7px; color: #7c8b9d; font-size: var(--text-2xs); }
.ps-footer > div { display: flex; gap: 10px; }
.ps-footer button { padding: 10px 15px; }
@media (max-width: 860px) {
  .contract-secondary-dialog[data-secondary-id="possession"] { width: calc(100vw - 30px); max-height: calc(100dvh - 70px); }
  .ps-config-badge { position: static; margin-top: 10px; }
  .ps-planning-layout, .ps-shell .ps-delivery-layout, .ps-shell .possession-materials { grid-template-columns: minmax(0, 1fr); }
  .ps-preview-card { min-height: 230px; }
  .ps-shell .possession-tab-content { padding: 22px; }
}
@media (max-width: 580px) {
  .contract-secondary-backdrop:has([data-secondary-id="possession"]) { padding: 0; }
  .contract-secondary-dialog[data-secondary-id="possession"] { border: 0; border-radius: 0; width: 100%; height: 100dvh; max-height: 100dvh; }
  [data-secondary-id="possession"] > header { padding: 17px; }
  [data-secondary-id="possession"] #secondary-dialog-title { font-size: var(--text-lg); gap: 10px; }
  [data-secondary-id="possession"] #secondary-dialog-title > svg { width: 38px; height: 38px; padding: 8px; }
  .ps-header-status { display: none; }
  .ps-summary { padding: 8px 15px; grid-template-columns: 1fr 1fr; }
  .ps-summary > div { padding: 9px 3px; }
  .ps-summary > div:not(:last-child) { border: 0; margin: 0; }
  .ps-summary > div:last-child { grid-column: 1 / -1; border-top: 1px solid #e4ebf3; }
  .ps-shell .possession-tabs { padding: 0 9px; }
  .ps-shell .possession-tabs button { font-size: var(--text-xs); padding: 15px 12px; gap: 6px; }
  .ps-shell .possession-tab-content { padding: 19px 15px 25px; }
  .ps-planning-layout > fieldset, .ps-delivery-fields { padding: 15px; }
  .ps-document-action { grid-template-columns: 1fr; }
  .ps-delivery-summary, .ps-shell .document-toggle-fields { grid-template-columns: 1fr; }
  .ps-shell .possession-document-card > header { flex-direction: row; flex-wrap: wrap; }
  .ps-shell .possession-document-header-actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .ps-footer { padding: 13px 15px; }
  .ps-footer > span { max-width: 110px; font-size: var(--text-2xs); }
  .ps-footer > div { gap: 7px; }
  .ps-footer button { padding: 10px; }
  .ps-segmented span { padding: 9px 4px; font-size: var(--text-2xs); }
}
@media (prefers-reduced-motion: reduce) {
  .ps-shell *, .ps-shell *::before, .ps-shell *::after { animation: none !important; transition: none !important; }
}
.ps-header-status.possession-success { background: #eaf7ef; border-color: #d5e9de; color: #14764e; }
.ps-header-status.possession-warning { background: #fff5e4; border-color: #ffdfb6; color: #945a00; }
.ps-header-status.possession-danger { background: #fff0ef; border-color: #f0c5c1; color: #b42318; }
@media (max-height: 600px) {
  .contract-secondary-backdrop:has([data-secondary-id="possession"]) { padding: 0; }
  .contract-secondary-dialog[data-secondary-id="possession"] { width: 100%; height: 100dvh; max-height: 100dvh; min-height: 0; border-radius: 0; }
  [data-secondary-id="possession"] > header { padding: 10px 16px; }
  [data-secondary-id="possession"] #secondary-dialog-title { font-size: var(--text-lg); }
  [data-secondary-id="possession"] #secondary-dialog-title small { display: none; }
  [data-secondary-id="possession"] #secondary-dialog-title > svg { height: 36px; width: 36px; padding: 8px; }
  .ps-summary { padding: 0 16px; }
  .ps-summary > div { padding: 8px 0; }
  .ps-summary svg { width: 26px; height: 26px; padding: 5px; }
  .ps-shell .possession-tabs button { padding-block: 10px; min-height: 38px; }
  .ps-footer { padding: 8px 16px; }
}

/* Posse e chaves 3.0 — modal compacto por tarefa (mesmo padrão dos modais de prazo) */
.contract-secondary-dialog[data-secondary-id="possession"] { width: min(560px, calc(100vw - 24px)); max-width: 560px; min-height: 0; border-radius: 16px; }
[data-secondary-id="possession"] > header { padding: 18px 20px 10px; border-bottom: 0; align-items: flex-start; }
[data-secondary-id="possession"] #secondary-dialog-title { font-size: var(--text-lg); letter-spacing: -.02em; gap: 10px; }
[data-secondary-id="possession"] #secondary-dialog-title small { font-size: var(--text-2xs); letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
[data-secondary-id="possession"] #secondary-dialog-title em { font-size: var(--text-xs); }
[data-secondary-id="possession"] .secondary-close { width: 32px; height: 32px; min-width: 32px; border: 0; padding: 7px; }
.ps-compact .possession-tab-content { padding: 8px 20px 18px; }
.ps-compact .ps-planning-layout { display: flex; flex-direction: column; gap: 14px; }
.ps-compact .ps-planning-layout > fieldset { padding: 0; border: 0; border-radius: 0; }
.ps-compact .possession-form .form-grid { gap: 16px; }
.ps-compact label, .ps-compact .ps-nature, .ps-compact .ps-mode > span, .ps-compact .ps-label { font-size: var(--text-xs); font-weight: 700; color: #214366; }
.ps-compact input:not([type="radio"], [type="checkbox"], [type="hidden"]), .ps-compact select, .ps-compact textarea { min-height: 38px; padding: 7px 10px; font-size: var(--text-sm); }
.ps-compact input[type="date"] { width: auto; max-width: 100%; }
.ps-compact textarea { min-height: 58px; line-height: 1.5; }
.ps-compact button, .ps-compact summary { min-height: 36px; font-size: var(--text-sm); }
.ps-compact .ps-segmented span { padding: 8px 6px; font-size: var(--text-sm); }
.ps-mode { display: grid; gap: 8px; }
.ps-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; background: #f1f5fb; border: 1px solid #e1e9f4; border-radius: 9px; }
.ps-compact .ps-mode-grid button { display: grid; gap: 0; min-height: 0; padding: 7px 8px; border: 0; background: transparent; color: #5d7390; font-weight: 600; text-align: center; border-radius: 7px; cursor: pointer; }
.ps-compact .ps-mode-grid button small { font-size: var(--text-xs); font-weight: 500; color: #8699ad; }
.ps-compact .ps-mode-grid button[aria-checked="true"] { background: #fff; color: #0766dc; font-weight: 700; box-shadow: 0 1px 3px rgba(18, 40, 80, .15); }
.ps-compact .ps-mode-grid button:disabled { opacity: .4; cursor: not-allowed; }
.ps-note { font-size: var(--text-xs); color: #6b82a1; margin: 0; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-compact .ps-chip { min-height: 28px; height: 28px; padding: 0 12px; border: 1px solid #d1deee; border-radius: 99px; background: #fff; color: #214366; font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
.ps-compact .ps-chip[aria-pressed="true"] { background: #e7f2ff; border-color: #b9d6fa; color: #0766dc; }
.ps-field { display: grid; gap: 8px; }
.ps-field > small { font-size: var(--text-xs); color: #8191a3; }
.ps-label span { font-weight: 500; color: #8699ad; }
.ps-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ps-compact .ps-delivery-layout { display: flex; flex-direction: column; gap: 16px; }
.ps-strip { background: #f6f9fd; border: 1px solid #dce7f4; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: var(--text-sm); }
.ps-tl { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ps-tl > * { flex: none; }
.ps-pt { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.ps-pt small { font-size: var(--text-xs); color: #7085a1; font-weight: 600; }
.ps-pt b { font-weight: 700; color: #102d51; font-variant-numeric: tabular-nums; }
.ps-pt.is-new b { color: #0766dc; }
.ps-pt span { color: #6b82a1; }
.ps-pill { background: #e7f2ff; border: 1px solid #b9d6fa; color: #0766dc; border-radius: 99px; padding: 2px 10px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-pill[data-tone="warning"] { background: #fff3d6; border-color: transparent; color: #8a5a00; }
.ps-pill[data-tone="danger"] { background: #fdecea; border-color: transparent; color: #b42318; }
.ps-pill[data-tone="success"] { background: #e1f5e9; border-color: transparent; color: #137a46; }
.ps-strip-note { margin: 0; font-size: var(--text-xs); color: #6b82a1; line-height: 1.5; }
.ps-warn { margin: 0; font-size: var(--text-xs); background: #fff6df; color: #835b1c; border-radius: 8px; padding: 8px 10px; }
.ps-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; border-top: 1px solid #dce7f4; padding-top: 10px; }
.ps-meta > span { display: flex; gap: 6px; align-items: baseline; }
.ps-meta small { font-size: var(--text-xs); color: #7085a1; font-weight: 600; }
.ps-meta b { font-weight: 700; }
.ps-rule { font-size: var(--text-xs); font-weight: 700; color: #0766dc; }
.ps-compact .ps-info { font-size: var(--text-xs); color: #8699ad; margin: 0; padding: 0; background: none; border: 0; }
.ps-compact .ps-footer { padding: 12px 20px; }
.ps-compact .ps-footer > span.ps-hint { font-size: var(--text-xs); color: #8699ad; max-width: none; }
.ps-material-list { display: flex; flex-direction: column; border: 1px solid #e2e9f2; border-radius: 12px; overflow: hidden; }
.ps-compact .ps-material-list .possession-document-card { border: 0; border-radius: 0; box-shadow: none; padding: 12px 14px; margin: 0; }
.ps-compact .ps-material-list .possession-document-card + .possession-document-card { border-top: 1px solid #e2e9f2; }
.ps-compact .ps-material-icon { width: 34px; height: 34px; }
.ps-compact .ps-document-action { margin-top: 8px; padding-top: 0; border-top: 0; }
.ps-compact .ps-document-action > p { font-size: var(--text-xs); color: #6b82a1; }
@media (max-width: 520px) {
  .ps-mode-grid { grid-template-columns: 1fr; }
  .ps-tl { flex-direction: column; align-items: flex-start; }
  .ps-compact .possession-tab-content { padding: 8px 14px 16px; }
}

/* Aba Posse e chaves: ações diretas, indicadores, etapas e últimos registros */
.ps-overview { display: grid; gap: 14px; }
.ps-overview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ps-overview-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-overview-actions .compact-action { display: inline-flex; align-items: center; gap: 7px; }
.ps-overview-actions svg { width: 16px; height: 16px; }
.ps-overview-actions .ps-main-action { background: #eaf3ff; border-color: #c5dcfa; color: #075abb; }
.ps-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ps-kpi { border: 1px solid #e2e9f2; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; background: #fff; }
.ps-kpi small { font-size: var(--text-xs); color: #6b82a1; font-weight: 600; }
.ps-kpi strong { font-size: var(--text-md); color: #102d51; overflow-wrap: anywhere; }
.ps-kpi .ps-kpi-date { color: #0766dc; font-variant-numeric: tabular-nums; }
.ps-kpi strong.is-success { color: #137a46; } .ps-kpi strong.is-warning { color: #8a5a00; } .ps-kpi strong.is-danger { color: #b42318; } .ps-kpi strong.is-primary { color: #0766dc; }
.ps-kpi span { font-size: var(--text-xs); color: #8699ad; }
.ps-kpi.has-warning span { color: #8a5a00; }
.ps-steps { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid #e2e9f2; border-radius: 12px; overflow: hidden; background: #fff; }
.ps-step { flex: 1; display: flex; gap: 10px; align-items: center; padding: 11px 14px; min-width: 0; font-size: var(--text-sm); }
.ps-step + .ps-step { border-left: 1px solid #e2e9f2; }
.ps-step > span { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; border: 2px solid #c9d6e6; color: #8699ad; }
.ps-step.is-done > span { background: #137a46; border-color: #137a46; color: #fff; }
.ps-step.is-current > span { border-color: #0766dc; color: #0766dc; }
.ps-step strong { display: block; font-weight: 700; color: #102d51; }
.ps-step small { color: #6b82a1; font-size: var(--text-xs); }
.ps-recent { border: 1px solid #e2e9f2; border-radius: 12px; overflow: hidden; background: #fff; }
.ps-recent-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: #f6f9fd; font-size: var(--text-sm); }
.ps-recent-row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 14px; border-top: 1px solid #e8eef6; font-size: var(--text-sm); color: #214366; }
.ps-recent-row time { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .ps-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ps-steps { flex-direction: column; } .ps-step + .ps-step { border-left: 0; border-top: 1px solid #e2e9f2; } }
/* Ajustes do modal compacto sobre as regras do modal antigo */
.ps-compact .ps-planning-layout, .ps-shell.ps-compact .ps-delivery-layout { align-items: stretch; }
.ps-compact .ps-label { display: block; }
.ps-compact [data-use-automatic-base] { justify-self: start; min-height: 0; padding: 0; background: none; border: 0; color: #0766dc; font-size: var(--text-xs); text-decoration: underline; text-underline-offset: 3px; }
.ps-shell.ps-compact .possession-materials.ps-material-list { display: flex; flex-direction: column; gap: 0; }
.ps-shell.ps-compact .ps-material-list .possession-document-card > header { padding: 0; border-bottom: 0; align-items: center; }
.ps-shell.ps-compact .ps-material-list .possession-document-card > header > .ps-material-icon { width: 34px; height: 34px; border-radius: 9px; }
.ps-shell.ps-compact .ps-material-list .ps-document-action { grid-template-columns: 1fr auto; padding-top: 8px; }
.ps-shell.ps-compact .ps-material-list .possession-document-card { align-self: stretch; }
