/* pdpa.css · PDPA Guard — consent + audit console. Demo-specific layout. */
.pg-stage {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: start;
}

.pg-left { display: flex; flex-direction: column; gap: 16px; }
.pg-right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }

/* ---------- audit log ---------- */
.pc-h > div { min-width: 0; }
.pc-h .badge { margin-left: auto; }

.pg-filter { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin: 4px 0 14px; }
.pg-flabel {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft);
}
.pg-filter .chip { font-size: 12px; padding: 6px 12px; }
.pg-filter .chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pg-filter .chip.is-on:hover { color: #fff; }

.pg-table { font-size: 12.5px; }
.pg-table td { vertical-align: middle; }
.pg-table .pg-time { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-soft); white-space: nowrap; }
.pg-table .pg-agent b { display: block; font-weight: 700; color: var(--text-1); }
.pg-table .pg-agent span { font-size: 11.5px; color: var(--text-dim); }
.pg-table .pg-touched { color: var(--text-2); }
.pg-table .pg-touched code {
  font-family: var(--font-mono); font-size: 11px; color: var(--mint-ink);
  background: var(--mint-tint); padding: 1px 6px; border-radius: 5px;
}
.pg-row {
  animation: pg-row-in .4s cubic-bezier(.2,.7,.2,1) backwards;
}
@keyframes pg-row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- redaction panel ---------- */
.pg-doc {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
  color: var(--text-1); background: var(--softer);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 15px; margin: 4px 0 14px; max-height: 320px; overflow-y: auto;
}
.pg-doc:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.pg-doc .pg-key { color: var(--text-soft); }

/* a sensitive token, before redaction */
.pg-pii {
  position: relative; border-radius: 4px; padding: 0 2px;
  background: var(--danger-soft); color: var(--danger); font-weight: 600;
  transition: background .35s ease, color .35s ease;
}
/* masked state — animates to blocks */
.pg-pii.is-masked {
  background: var(--ink); color: transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.pg-pii.is-masked::after {
  content: attr(data-mask); position: absolute; inset: 0;
  display: flex; align-items: center; letter-spacing: -1px;
  color: #2b3a33; font-weight: 700; overflow: hidden;
  animation: pg-mask-in .35s ease both;
}
@keyframes pg-mask-in { from { opacity: 0; transform: scaleX(.4); transform-origin: left; } to { opacity: 1; transform: scaleX(1); } }

.pg-redact-foot { display: flex; align-items: center; gap: 10px; }
.pg-redact-count { font-size: 11.5px; color: var(--text-dim); margin-left: auto; }
.pg-redact-count b { color: var(--ok); }

/* ---------- deadline tracker ---------- */
.pg-dl-list { display: flex; flex-direction: column; gap: 0; }
.pg-dl {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line-soft);
}
.pg-dl:first-child { border-top: 0; }
.pg-dl__who { min-width: 0; }
.pg-dl__who b { display: block; font-size: 13px; font-weight: 700; color: var(--text-1); }
.pg-dl__who span { font-size: 11.5px; color: var(--text-dim); }
.pg-dl__right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pg-dl__days { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pg-dl__bar { width: 96px; height: 6px; background: var(--soft); border-radius: var(--r-pill); overflow: hidden; }
.pg-dl__fill { height: 100%; width: 0; border-radius: var(--r-pill); transition: width 1s cubic-bezier(.2,.7,.2,1); }
.pg-dl__fill.ok { background: linear-gradient(90deg, var(--mint-600), var(--mint)); }
.pg-dl__fill.warn { background: linear-gradient(90deg, #f59e0b, #d97706); }
.pg-dl__fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

@media (max-width: 980px) {
  .pg-stage { grid-template-columns: 1fr; }
  .pg-right { position: static; }
}
