:root {
  --pxp-blue: #0b5cab;
  --pxp-blue-dark: #064792;
  --pxp-blue-light: #e8f1fb;
  --pxp-border: #d9e2ef;
  --pxp-text: #1b2a41;
  --pxp-muted: #5c6b82;
  --pxp-bg: #eef2f7;
  --pxp-white: #ffffff;
  --pxp-accent: #3b44c0;
  --pxp-success: #0d7a4a;
  --pxp-warn: #b45309;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--pxp-text);
  background: var(--pxp-bg);
}

a {
  color: var(--pxp-blue);
}

button,
input,
select,
textarea {
  font: inherit;
}

.pxp-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pxp-topbar {
  background: linear-gradient(90deg, var(--pxp-blue-dark), var(--pxp-blue));
  color: #fff;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 3px solid #78aee8;
}

.pxp-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pxp-brand img {
  height: 28px;
  width: auto;
}

.pxp-brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pxp-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.pxp-top-actions button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.pxp-top-actions button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pxp-tabs {
  background: var(--pxp-white);
  border-bottom: 1px solid var(--pxp-border);
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 1rem;
}

.pxp-tab {
  border: none;
  background: transparent;
  padding: 0.85rem 1rem;
  color: var(--pxp-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-size: 0.875rem;
}

.pxp-tab.active {
  color: var(--pxp-blue);
  border-bottom-color: var(--pxp-blue);
  font-weight: 600;
}

.pxp-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pxp-main {
  flex: 1;
  padding: 1.25rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.pxp-panel {
  background: var(--pxp-white);
  border: 1px solid var(--pxp-border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 42, 82, 0.06);
}

.pxp-panel-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--pxp-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pxp-panel-head h1,
.pxp-panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.pxp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pxp-border);
  background: #f8fafc;
}

.pxp-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pxp-muted);
  min-width: 120px;
}

.pxp-filters select {
  border: 1px solid var(--pxp-border);
  border-radius: 3px;
  padding: 0.35rem 0.5rem;
  background: #fff;
  color: var(--pxp-text);
}

.pxp-table-wrap {
  overflow: auto;
}

table.pxp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

table.pxp-table th,
table.pxp-table td {
  border: 1px solid var(--pxp-border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

table.pxp-table th {
  background: #f1f5fb;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

table.pxp-table tbody tr:nth-child(even) {
  background: #fafcff;
}

.pxp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pxp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 960px) {
  .pxp-grid-3,
  .pxp-grid-2 {
    grid-template-columns: 1fr;
  }
}

.pxp-stat {
  padding: 1rem;
}

.pxp-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--pxp-blue);
}

.pxp-stat span {
  color: var(--pxp-muted);
  font-size: 0.8125rem;
}

.pxp-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 140px;
  padding: 1rem;
}

.pxp-chart-bars div {
  flex: 1;
  background: linear-gradient(180deg, #4d8fd8, var(--pxp-blue));
  border-radius: 3px 3px 0 0;
  min-height: 12px;
}

.pxp-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
}

@media (max-width: 900px) {
  .pxp-hero {
    grid-template-columns: 1fr;
  }
}

.pxp-hero h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  line-height: 1.25;
}

.pxp-hero p {
  margin: 0 0 1rem;
  color: var(--pxp-muted);
  line-height: 1.55;
}

.pxp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pxp-btn {
  border: none;
  border-radius: 4px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
}

.pxp-btn-primary {
  background: var(--pxp-blue);
  color: #fff;
}

.pxp-btn-primary:hover {
  background: var(--pxp-blue-dark);
}

.pxp-btn-secondary {
  background: #fff;
  color: var(--pxp-blue);
  border: 1px solid var(--pxp-blue);
}

.pxp-form {
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.pxp-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.pxp-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.pxp-field-req,
.pxp-field-opt {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
}

.pxp-field-req {
  color: var(--pxp-blue-dark);
  background: var(--pxp-blue-light);
}

.pxp-field-opt {
  color: var(--pxp-muted);
  background: #eef2f7;
  font-weight: 600;
}

.pxp-field-hint {
  font-weight: 400;
  font-size: 0.75rem;
  display: block;
  margin-top: 0.15rem;
}

.pxp-form textarea.pxp-textarea-short {
  min-height: 4.5rem;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.4;
}

.pxp-form input,
.pxp-form textarea {
  border: 1px solid var(--pxp-border);
  border-radius: 4px;
  padding: 0.55rem 0.65rem;
}

.pxp-form textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
}

.pxp-alert {
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.pxp-alert-info {
  background: var(--pxp-blue-light);
  border: 1px solid #b9d4f3;
  color: #0f3d6e;
}

.pxp-alert-warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
}

.pxp-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.pxp-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.pxp-steps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem 0;
}

.pxp-step {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.pxp-step.active,
.pxp-badge-info {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.pxp-step.done,
.pxp-badge-success {
  background: #dcfce7;
  color: #065f46;
  border-color: #a7f3d0;
}

.pxp-step.warn,
.pxp-badge-warn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.pxp-step.danger,
.pxp-badge-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.pxp-badge-neutral {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.pxp-form input:focus,
.pxp-form select:focus,
.pxp-form textarea:focus,
.pxp-filters input:focus,
.pxp-filters select:focus {
  outline: none;
  border-color: var(--pxp-blue);
  box-shadow: 0 0 0 3px rgba(11, 92, 171, 0.14);
}

.pxp-form select {
  border: 1px solid var(--pxp-border);
  border-radius: 4px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}

.pxp-btn {
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}

.pxp-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.pxp-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--pxp-border);
}

.pxp-subnav-pill {
  border: 1px solid var(--pxp-border);
  background: #fff;
  color: var(--pxp-muted);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.pxp-subnav-pill:hover {
  border-color: var(--pxp-blue);
  color: var(--pxp-blue);
}

.pxp-subnav-pill.active {
  background: var(--pxp-blue);
  border-color: var(--pxp-blue);
  color: #fff;
}

.pxp-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.pxp-choice-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--pxp-border);
  border-radius: 6px;
  background: #fbfdff;
  cursor: pointer;
  font-weight: 500 !important;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.pxp-choice-card:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.pxp-choice-card:has(input:checked) {
  border-color: var(--pxp-blue);
  background: var(--pxp-blue-light);
  box-shadow: 0 0 0 1px var(--pxp-blue);
}

.pxp-choice-card input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  accent-color: var(--pxp-blue);
}

.pxp-check-inline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500 !important;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--pxp-border);
  border-radius: 5px;
  cursor: pointer;
}

.pxp-check-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--pxp-blue);
}

.pxp-toast-stack {
  position: fixed;
  top: 64px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
  pointer-events: none;
}

.pxp-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  border: 1px solid transparent;
}

.pxp-toast-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.pxp-toast-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.pxp-toast-info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #93c5fd;
}

.pxp-toast button {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 0.2rem;
}

.pxp-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pxp-doc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pxp-border);
}

.pxp-doc-list li:last-child {
  border-bottom: none;
}

.pxp-muted {
  color: var(--pxp-muted);
  font-size: 0.8125rem;
}

.pxp-loading {
  padding: 2rem;
  text-align: center;
  color: var(--pxp-muted);
}

.pxp-insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}

.pxp-insight {
  border: 1px solid var(--pxp-border);
  border-radius: 4px;
  padding: 0.85rem;
  background: #fbfdff;
}

.pxp-insight h3 {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
}

.pxp-insight p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--pxp-muted);
}

.pxp-map-placeholder {
  height: 180px;
  margin: 1rem;
  border: 1px dashed var(--pxp-border);
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 40%, rgba(11, 92, 171, 0.15), transparent 45%),
    radial-gradient(circle at 70% 55%, rgba(59, 68, 192, 0.12), transparent 40%),
    linear-gradient(180deg, #f8fbff, #eef3fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pxp-muted);
  font-size: 0.8125rem;
}

.pxp-treemap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 80px 80px;
  gap: 4px;
  padding: 1rem;
}

.pxp-treemap > div {
  border-radius: 3px;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.5rem;
  display: flex;
  align-items: flex-end;
}

.pxp-treemap .a { grid-row: span 2; background: #0b5cab; }
.pxp-treemap .b { background: #2f7fd0; }
.pxp-treemap .c { background: #5aa0de; }
.pxp-treemap .d { background: #3b44c0; }
.pxp-treemap .e { background: #64748b; }

.pxp-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--pxp-muted);
  padding: 1rem;
}

.pxp-impersonation-banner {
  background: linear-gradient(90deg, #b45309, #d97706);
  color: #fff;
  padding: 0.45rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-bottom: 1px solid #92400e;
}

.pxp-impersonation-banner a,
.pxp-impersonation-banner button {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.pxp-impersonation-banner a:hover,
.pxp-impersonation-banner button:hover {
  background: rgba(255, 255, 255, 0.32);
}

