.pii-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #0f172a;
  color: #fff;
}

.pii-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pii-logo {
  height: 40px;
  width: auto;
}

.pii-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #cbd5f5;
}

.pii-nav a {
  color: #cbd5f5;
  margin-left: 16px;
  text-decoration: none;
  font-weight: 600;
}

.pii-nav a:hover {
  text-decoration: underline;
}

.pii-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px 40px;
}

.pii-alert {
  border: 1px solid #f97316;
  background: #fff7ed;
  color: #9a3412;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.pii-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.pii-filter {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  gap: 6px;
}

.pii-filter input,
.pii-filter select {
  padding: 6px 8px;
  border: 1px solid #cbd5f5;
  border-radius: 4px;
}

.pii-filter--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.pii-actions button {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.pii-actions button:hover {
  background: #1d4ed8;
}

.pii-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pii-role-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pii-status-message {
  color: #1f2937;
  font-size: 0.9rem;
}

.pii-table-wrapper {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.pii-table {
  width: 100%;
  border-collapse: collapse;
}

.pii-table th,
.pii-table td {
  padding: 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.pii-table th {
  background: #f8fafc;
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
}

.pii-table tbody tr:hover {
  background: #f5f8ff;
}

.pii-snippet {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  color: #111827;
  white-space: pre-wrap;
}

.pii-actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pii-action-button {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.pii-action-button.primary {
  background: #059669;
  color: #fff;
}

.pii-action-button.danger {
  background: #dc2626;
  color: #fff;
}

.pii-action-button.secondary {
  background: #1d4ed8;
  color: #fff;
}

.pii-action-button:disabled,
.pii-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pii-empty {
  padding: 20px;
  text-align: center;
  color: #6b7280;
}

.pii-pagination {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

#pii-load-more {
  padding: 8px 16px;
  border: 1px solid #2563eb;
  border-radius: 4px;
  background: #fff;
  color: #2563eb;
  cursor: pointer;
  font-weight: 600;
}

#pii-load-more:hover {
  background: #2563eb;
  color: #fff;
}

.pii-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.pii-modal[hidden] {
  display: none;
}

.pii-modal__dialog {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  padding: 24px;
  width: min(440px, 90%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pii-modal__dialog h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.pii-modal__dialog p {
  margin: 0;
  color: #475569;
  line-height: 1.4;
}

#pii-modal-reason {
  width: 100%;
  border: 1px solid #cbd5f5;
  border-radius: 6px;
  padding: 10px;
  font-family: inherit;
  resize: vertical;
}

.pii-field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.pii-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.pii-modal__actions button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #cbd5f5;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-weight: 600;
}

.pii-modal__actions button.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.pii-modal__actions button.primary:hover {
  background: #1d4ed8;
}

.pii-modal__actions button:hover {
  background: #f8fafc;
}

@media (max-width: 768px) {
  .pii-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pii-filter {
    width: 100%;
  }

  .pii-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pii-nav {
    display: flex;
    gap: 12px;
  }
}
