:root {
  --bg: #030714;
  --bg-2: #071126;
  --panel: #0d1529;
  --panel-2: #101c34;
  --panel-soft: rgba(15, 25, 46, 0.82);
  --line: rgba(148, 163, 184, 0.14);
  --line-2: rgba(148, 163, 184, 0.08);
  --ink: #edf2ff;
  --muted: #8f9ab2;
  --muted-2: #6c7791;
  --accent-a: #2c6bff;
  --accent-b: #7b3ff5;
  --success: #21c98a;
  --danger: #ff5e7a;
  --warn: #f0ad4e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

body.pa-body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(70rem 38rem at 10% -10%, rgba(44, 107, 255, 0.12), transparent 60%),
    radial-gradient(52rem 32rem at 95% 10%, rgba(123, 63, 245, 0.12), transparent 58%),
    linear-gradient(180deg, #020611 0%, #030714 38%, #02050f 100%);
  min-height: 100vh;
}

body.pa-modal-open {
  overflow: hidden;
}

.pa-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 92%);
  opacity: 0.45;
}

.pa-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 17, 0.84);
  backdrop-filter: blur(10px);
}

.pa-topbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

/* ── Nav bar ── */
.pa-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 1px solid var(--line);
  margin: 0 -24px;
  padding: 0 20px;
}

.pa-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 120ms;
  white-space: nowrap;
}

.pa-nav-link:hover { color: var(--ink); }

.pa-nav-link--active {
  color: var(--ink);
  border-bottom-color: var(--accent-a);
}

.pa-nav-icon {
  font-size: 14px;
  opacity: 0.75;
}

.pa-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.pa-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #e6eaff;
  background: linear-gradient(135deg, #2a68ff 0%, #6c4df4 65%, #7c34ef 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px rgba(43, 98, 255, 0.25);
}

.pa-brand-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
}

.pa-brand-muted {
  color: var(--muted);
  font-weight: 500;
}

.pa-brand-sep {
  color: #4e5a74;
}

.pa-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pa-user-pill {
  min-width: 210px;
  max-width: 330px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(18, 29, 52, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-shell {
  position: relative;
  z-index: 1;
  max-width: 1880px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.pa-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 12px 0 22px;
  padding: 18px 0 10px;
}

.pa-title {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.pa-muted {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  max-width: 48ch;
}

.pa-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.pa-kpi {
  background: linear-gradient(180deg, rgba(16, 27, 50, 0.96), rgba(12, 22, 40, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), var(--shadow);
}

.pa-kpi-label {
  margin: 0;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
}

.pa-kpi-value {
  margin: 22px 0 0;
  font-size: 74px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.pa-kpi-value-small {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.pa-kpi-sub {
  margin: 14px 0 0;
  font-size: 16px;
  color: var(--muted-2);
}

.pa-card {
  background: linear-gradient(180deg, rgba(14, 23, 43, 0.97), rgba(11, 20, 37, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
}

.pa-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 30px 28px 18px;
}

.pa-card-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.pa-card-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.pa-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pa-input-wrap,
.pa-select-wrap {
  display: block;
}

.pa-input-wrap input,
.pa-select-wrap select {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(9, 15, 30, 0.95);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  min-height: 46px;
}

.pa-input-wrap input {
  width: min(360px, 42vw);
}

.pa-select-wrap select {
  min-width: 132px;
}

.pa-input-wrap input::placeholder {
  color: #7f8aa4;
}

.pa-input-wrap input:focus,
.pa-select-wrap select:focus,
.pa-form input:focus {
  outline: 2px solid rgba(67, 114, 255, 0.24);
  outline-offset: 0;
  border-color: rgba(87, 126, 255, 0.35);
}

.pa-action-feedback {
  margin: 0 28px 8px;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font-size: 14px;
}

.pa-action-feedback-success {
  background: rgba(33, 201, 138, 0.08);
  border-color: rgba(33, 201, 138, 0.22);
}

.pa-action-feedback-error {
  background: rgba(255, 94, 122, 0.08);
  border-color: rgba(255, 94, 122, 0.22);
}

.pa-action-feedback-warn {
  background: rgba(240, 173, 78, 0.08);
  border-color: rgba(240, 173, 78, 0.2);
}

.pa-table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
}

.pa-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.pa-table thead th {
  text-align: left;
  padding: 22px 22px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7c88a5;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.pa-table tbody td {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.pa-table tbody tr:last-child td {
  border-bottom: 0;
}

.pa-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.pa-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px !important;
}

.pa-tenant-cell {
  display: grid;
  gap: 6px;
}

.pa-tenant-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pa-tenant-link {
  color: inherit;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pa-tenant-link:hover {
  color: #a7c6ff;
}

.pa-tenant-sub {
  color: var(--muted);
  font-size: 14px;
}

.pa-tenant-error {
  color: #ff9bad;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-db-block {
  display: grid;
  gap: 10px;
}

.pa-db-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: #d9e0f5;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 8px 12px;
}

.pa-copy-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pa-copy-btn {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: #aeb7cd;
  border-radius: 10px;
  padding: 6px 9px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pa-copy-btn:hover {
  border-color: rgba(96, 147, 255, 0.35);
  color: #d7e6ff;
}

.pa-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid;
}

.pa-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.pa-status-active {
  color: #79efc4;
  background: rgba(33, 201, 138, 0.08);
  border-color: rgba(33, 201, 138, 0.18);
}

.pa-status-disabled {
  color: #c4cbe0;
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.14);
}

.pa-status-error {
  color: #ff9fb0;
  background: rgba(255, 94, 122, 0.08);
  border-color: rgba(255, 94, 122, 0.18);
}

.pa-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 9px 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
}

.pa-metric-users {
  color: #8ab9ff;
  background: rgba(44, 107, 255, 0.12);
  border-color: rgba(44, 107, 255, 0.24);
}

.pa-metric-sources {
  color: #c69cff;
  background: rgba(123, 63, 245, 0.12);
  border-color: rgba(123, 63, 245, 0.24);
}

.pa-metric-qs {
  color: #79efc4;
  background: rgba(33, 201, 138, 0.12);
  border-color: rgba(33, 201, 138, 0.24);
}

.pa-metric-qas {
  color: #ffd58a;
  background: rgba(240, 173, 78, 0.12);
  border-color: rgba(240, 173, 78, 0.24);
}

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

.pa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.pa-btn:hover { transform: translateY(-1px); }
.pa-btn:disabled { opacity: 0.65; cursor: default; transform: none; }

.pa-btn-lg {
  padding: 18px 28px;
  border-radius: 22px;
  font-size: 18px;
  box-shadow: 0 14px 38px rgba(49, 83, 255, 0.32);
}

.pa-btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent-a) 0%, #4966ef 44%, var(--accent-b) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 30px rgba(70, 71, 255, 0.28);
}

.pa-btn-light {
  background: #f4f5f8;
  color: #181e2e;
  border-radius: 16px;
  padding: 14px 22px;
}

.pa-btn-dark {
  background: rgba(255, 255, 255, 0.02);
  color: #d6def3;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.pa-btn-open {
  background: rgba(44, 107, 255, 0.08);
  color: #79adff;
  border: 1px solid rgba(44, 107, 255, 0.22);
}

.pa-btn-danger {
  background: rgba(255, 94, 122, 0.08);
  color: #ff9fb0;
  border: 1px solid rgba(255, 94, 122, 0.18);
}

.pa-btn-danger:hover {
  box-shadow: 0 12px 30px rgba(255, 94, 122, 0.16);
}

.pa-btn-success {
  background: rgba(33, 201, 138, 0.08);
  color: #79efc4;
  border: 1px solid rgba(33, 201, 138, 0.18);
}

.pa-plus {
  font-size: 26px;
  line-height: 1;
  margin-top: -1px;
}

.pa-alert {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid;
  font-size: 14px;
}

.pa-alert-success {
  background: rgba(33, 201, 138, 0.08);
  border-color: rgba(33, 201, 138, 0.2);
}

.pa-alert-error {
  background: rgba(255, 94, 122, 0.08);
  border-color: rgba(255, 94, 122, 0.2);
  color: #ffb8c5;
}

.pa-activity-form {
  display: grid;
  gap: 12px;
}

.pa-activity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(8, 12, 24, 0.48);
}

.pa-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.pa-check-row input,
.pa-activity-select input {
  width: 16px;
  height: 16px;
  accent-color: #ff6b87;
}

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

.pa-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.pa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 17, 0.7);
  backdrop-filter: blur(6px);
}

.pa-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 94vw);
  background: linear-gradient(180deg, #0c1428 0%, #091122 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -30px 0 60px rgba(0, 0, 0, 0.45);
  padding: 18px;
  overflow: auto;
}

.pa-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.pa-drawer-kicker {
  margin: 0;
  color: #7f8eff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.pa-drawer-head h2 {
  margin: 8px 0 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.pa-drawer-muted {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pa-icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.pa-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pa-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.pa-form input {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
}

.pa-form input::placeholder {
  color: #73809c;
}

.pa-form-divider {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.14);
  color: #7f8aa4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.pa-drawer-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pa-error-card {
  max-width: 760px;
  margin: 10vh auto 0;
  padding: 24px;
  border-radius: 18px;
  background: #0d1529;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.pa-hero-tight {
  margin-bottom: 14px;
}

.pa-tenant-crumb {
  margin: 0 0 10px;
  color: #7b89ab;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.pa-title-tenant {
  font-size: clamp(32px, 4vw, 50px);
}

.pa-inline-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8em;
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  padding: 4px 8px;
  color: #dfe6fb;
}

.pa-inline-status {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid;
}

.pa-inline-status-active {
  color: #79efc4;
  background: rgba(33, 201, 138, 0.08);
  border-color: rgba(33, 201, 138, 0.18);
}

.pa-inline-status-disabled {
  color: #c4cbe0;
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.14);
}

.pa-inline-status-error {
  color: #ff9fb0;
  background: rgba(255, 94, 122, 0.08);
  border-color: rgba(255, 94, 122, 0.18);
}

.pa-kpis-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pa-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.pa-detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.pa-detail-col {
  display: grid;
  gap: 18px;
  align-items: start;
}

.pa-note-pill {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(240, 173, 78, 0.16);
  background: rgba(240, 173, 78, 0.07);
  color: #ffd58a;
  font-size: 12px;
}

.pa-table-users .pa-tenant-name-sm {
  font-size: 16px;
}

.pa-cell-stack {
  display: grid;
  gap: 4px;
}

.pa-cell-muted {
  color: var(--muted);
  font-size: 12px;
}

.pa-date-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 12px;
  color: #dbe6ff;
  background: rgba(44, 107, 255, 0.07);
  border: 1px solid rgba(44, 107, 255, 0.15);
}

.pa-date-pill-muted {
  color: #cdd6ec;
  background: rgba(148, 163, 184, 0.07);
  border-color: rgba(148, 163, 184, 0.12);
}

.pa-action-chip {
  display: inline-flex;
  align-items: center;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  border-radius: 10px;
  padding: 6px 8px;
  color: #d4def7;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.pa-activity-list {
  padding: 8px 18px 18px;
  display: grid;
  gap: 10px;
}

.pa-activity-item {
  display: grid;
  grid-template-columns: 18px 16px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  background: rgba(255, 255, 255, 0.015);
}

.pa-activity-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.pa-chart-panel {
  padding: 12px 18px 18px;
}

.pa-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 250px;
  padding: 8px 2px 4px;
}

.pa-trend-col {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.pa-trend-bars {
  height: 170px;
  width: 100%;
  max-width: 56px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(
      to top,
      transparent 0 27px,
      rgba(148, 163, 184, 0.05) 27px 28px
    );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
}

.pa-trend-bar {
  width: 16px;
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  border: 1px solid transparent;
}

.pa-trend-bar-source {
  background: rgba(123, 63, 245, 0.28);
  border-color: rgba(123, 63, 245, 0.42);
  box-shadow: 0 0 14px rgba(123, 63, 245, 0.16);
}

.pa-trend-bar-approval {
  background: rgba(33, 201, 138, 0.22);
  border-color: rgba(33, 201, 138, 0.36);
  box-shadow: 0 0 14px rgba(33, 201, 138, 0.14);
}

.pa-trend-label {
  color: #cdd6ec;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
}

.pa-trend-meta {
  color: var(--muted);
  font-size: 11px;
}

.pa-chart-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.pa-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pa-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.pa-legend-dot-source { background: #8d5dff; }
.pa-legend-dot-approval { background: #41dba3; }

.pa-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c6bff, #7b3ff5);
  margin-top: 7px;
  box-shadow: 0 0 0 4px rgba(44, 107, 255, 0.08);
}

.pa-activity-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pa-activity-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.pa-activity-top strong {
  font-size: 14px;
}

.pa-activity-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pa-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.pa-empty-block {
  margin: 6px 0 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(148, 163, 184, 0.09);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1200px) {
  .pa-kpi-value { font-size: 54px; }
  .pa-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pa-card-header {
    flex-direction: column;
    align-items: stretch;
  }
  .pa-tools {
    width: 100%;
  }
  .pa-input-wrap input {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .pa-topbar {
    padding: 0 14px;
  }
  .pa-topbar-row {
    padding: 14px 0;
  }
  .pa-brand {
    gap: 12px;
  }
  .pa-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  .pa-brand-text {
    font-size: 16px;
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .pa-topbar-actions {
    justify-content: space-between;
  }
  .pa-user-pill {
    min-width: 0;
    flex: 1;
  }
  .pa-shell {
    padding: 18px 12px 36px;
  }
  .pa-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .pa-kpis {
    grid-template-columns: 1fr;
  }
  .pa-kpis-4 {
    grid-template-columns: 1fr;
  }
  .pa-detail-grid {
    grid-template-columns: 1fr;
  }
  .pa-detail-columns {
    grid-template-columns: 1fr;
  }
  .pa-card {
    border-radius: 20px;
  }
  .pa-card-header,
  .pa-table thead th,
  .pa-table tbody td {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pa-btn {
    transition: none;
  }
}

/* Sign-in, setup and security (32-platform-admin.md "Sign-in"). */
.pa-auth-shell { display: grid; place-items: start center; padding-top: 8vh; }
.pa-auth-card { width: min(460px, 100%); padding: 32px 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.pa-auth-title { margin: 6px 0 14px; font-size: 26px; }
.pa-auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; justify-content: flex-start; }
.pa-auth-actions form { display: inline; }
.pa-auth-note { min-height: 1.4em; margin-top: 14px; font-size: 13px; }
.pa-auth-qr { display: grid; justify-items: center; gap: 8px; margin: 14px 0 6px; padding: 16px; background: #fff; border-radius: var(--radius-lg); color: #0d1529; }
.pa-auth-qr .pa-muted { color: #475069; margin: 0; }
.pa-auth-qr img { display: block; border-radius: 8px; }
.pa-auth-secret { font-family: "IBM Plex Mono", monospace; letter-spacing: .08em; word-break: break-all; text-align: center; margin: 0; }
.pa-auth-codes { columns: 2; gap: 24px; padding: 14px 18px 14px 36px; margin: 12px 0 18px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pa-auth-codes li { padding: 4px 0; break-inside: avoid; }
.pa-auth-codes code { font-family: "IBM Plex Mono", monospace; font-size: 15px; letter-spacing: .06em; }
.pa-inline-form { display: inline; margin: 0; }
.pa-link-btn { background: none; border: 0; color: var(--accent-a); font: inherit; cursor: pointer; padding: 0; }
.pa-security-form { padding: 0 24px 24px; max-width: 480px; }
.pa-security-form .pa-muted { margin: 8px 0 0; font-size: 13px; }

/* Quick add on the phone (32-platform-admin.md "Quick add on the phone"). */
.pa-quick-shell { max-width: 560px; padding: max(16px, env(safe-area-inset-top)) 16px 32px; }
.pa-quick-head { margin-bottom: 12px; }
.pa-quick-form textarea { width: 100%; min-height: 96px; border-radius: 14px; border: 1px solid rgba(148, 163, 184, 0.12); background: rgba(255, 255, 255, 0.03); color: var(--ink); padding: 12px 14px; font: inherit; font-size: 17px; resize: vertical; }
.pa-quick-form input { font-size: 17px; }
.pa-quick-save { width: 100%; min-height: 54px; font-size: 17px; }
.pa-quick-recent { margin-top: 26px; }
.pa-quick-recent-title { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); margin: 0 0 8px; }
.pa-quick-recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pa-quick-recent li { padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); }
.pa-quick-recent a { color: var(--ink); text-decoration: none; }
.pa-quick-foot { margin-top: 28px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pa-quick-foot a { color: var(--muted); }
