/* Systemanfragen der Produktseite (Betrieb → Systemanfragen) */
.pi-head span a { color: inherit; }
.pi-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.pi-metric { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid #e6dfeb; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: #4a4152; }
.pi-metric span { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #7a7086; }
.pi-metric strong { font-size: 22px; color: #2b2432; }
.pi-metric.active { border-color: #643182; box-shadow: 0 0 0 2px rgba(100, 49, 130, .15); }
.pi-metric.pi-status-new.active { background: #f6effa; }
.pi-toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.pi-toolbar label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: #4a4152; flex: 1; max-width: 420px; }
.pi-toolbar input { min-height: 36px; padding: 6px 10px; border: 1px solid #d9d0de; border-radius: 8px; font: inherit; }
.pi-list { display: grid; gap: 10px; }
.pi-item { padding: 0; overflow: hidden; }
.pi-row { display: grid; grid-template-columns: 130px 1fr 170px 150px 28px; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border: none; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pi-row:hover { background: #faf7fb; }
.pi-row:focus-visible { outline: 2px solid #643182; outline-offset: -2px; }
.pi-main, .pi-meta { display: grid; gap: 2px; min-width: 0; }
.pi-main small, .pi-meta small, .pi-date { font-size: 12px; color: #7a7086; }
.pi-main strong, .pi-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-status { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pi-status-new { background: #ede2f4; color: #4e2555; }
.pi-status-progress { background: #fff3d6; color: #7a5200; }
.pi-status-answered { background: #dcefe3; color: #1d5c3a; }
.pi-status-done { background: #ececec; color: #555; }
.pi-chevron svg { width: 16px; height: 16px; color: #7a7086; }
.pi-detail { padding: 4px 14px 14px; border-top: 1px solid #eee7f1; display: grid; gap: 14px; }
.pi-detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; padding-top: 12px; }
.pi-label { display: block; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #7a7086; margin-bottom: 4px; }
.pi-message { margin: 0; white-space: pre-wrap; line-height: 1.5; font-size: 14px; }
.pi-facts { margin: 0; display: grid; gap: 8px; }
.pi-facts dt { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #7a7086; }
.pi-facts dd { margin: 2px 0 0; font-size: 13.5px; }
.pi-status-form { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: end; padding-top: 12px; border-top: 1px dashed #eee7f1; }
.pi-status-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: #4a4152; }
.pi-status-form select, .pi-status-form textarea { padding: 8px 10px; border: 1px solid #d9d0de; border-radius: 8px; font: inherit; font-size: 13.5px; min-height: 38px; }
.pi-status-form textarea { resize: vertical; }
:root[data-workspace-theme="dark"] .pi-metric, :root[data-workspace-theme="dark"] .pi-row:hover { background: #2a2331; border-color: #453a4d; color: #e9e2ee; }
:root[data-workspace-theme="dark"] .pi-metric strong { color: #fff; }
@media (max-width: 900px) {
  .pi-row { grid-template-columns: 110px 1fr 28px; }
  .pi-meta, .pi-date { grid-column: 2; }
  .pi-detail-grid, .pi-status-form { grid-template-columns: 1fr; }
}

/* Demo-Zugänge (Demo-Modus): aktive Ausgabe, Verlauf, Ausgabe-Dialog, Kopiertext */
.pi-demo { display: grid; gap: 12px; margin: 14px 0; padding: 14px 16px; border-left: 4px solid #643182; }
.pi-demo-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.pi-demo-head > div:first-child { display: grid; gap: 4px; }
.pi-demo-head .muted { font-size: 12.5px; line-height: 1.45; }
.pi-demo .pi-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.pi-grant { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e6dfeb; border-radius: 10px; background: #fff; }
.pi-grant-active { border-color: #b9d8c4; background: #f4fbf6; }
.pi-grant-main { display: grid; gap: 3px; min-width: 0; }
.pi-grant-main small { font-size: 12px; color: #7a7086; }
.pi-grant-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pi-grant-none { margin: 0; font-size: 13px; color: #7a7086; }
.pi-grant-history { display: grid; gap: 8px; }
.pi-demo-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed #eee7f1; }
.pi-demo-actions .muted { font-size: 12.5px; }
.button.danger { border-color: #e1b8b4; color: #a13a31; background: #fff; }
.button.danger:hover { background: #fdf1f0; }
.pi-issue { display: grid; gap: 14px; }
.pi-issue p { margin: 0; }
.pi-warning { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fff3d6; color: #7a5200; font-size: 13px; line-height: 1.45; }
.pi-warning svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pi-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 1px solid #e6dfeb; border-radius: 10px; padding: 10px 12px 12px; margin: 0; }
.pi-areas legend { font-size: 12px; font-weight: 600; color: #4a4152; padding: 0 4px; }
.pi-areas label { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 8px 10px; border: 1px solid #eee7f1; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pi-areas label:has(input:checked) { border-color: #643182; background: #f6effa; }
.pi-areas input { margin-top: 3px; accent-color: #643182; }
.pi-areas span { display: grid; gap: 2px; }
.pi-areas small { font-size: 11.5px; color: #7a7086; }
.pi-credentials { display: grid; gap: 12px; }
.pi-credentials p { margin: 0; font-size: 13.5px; }
.pi-credentials textarea { width: 100%; box-sizing: border-box; font: 12.5px/1.45 ui-monospace, Consolas, monospace; padding: 10px 12px; border: 1px solid #d9d0de; border-radius: 8px; background: #faf7fb; resize: vertical; white-space: pre; }
:root[data-workspace-theme="dark"] .pi-grant, :root[data-workspace-theme="dark"] .pi-areas label { background: #2a2331; border-color: #453a4d; color: #e9e2ee; }
:root[data-workspace-theme="dark"] .pi-grant-active { background: #22312a; border-color: #3f5c49; }
:root[data-workspace-theme="dark"] .pi-credentials textarea { background: #1f1a24; color: #e9e2ee; border-color: #453a4d; }
@media (max-width: 900px) {
  .pi-demo-head, .pi-grant { grid-template-columns: 1fr; display: grid; }
  .pi-areas { grid-template-columns: 1fr; }
  .pi-grant-actions, .pi-demo .pi-actions { justify-content: flex-start; }
}

/* Herkunft (1.0.89): Demo-Anfragen kennzeichnen und ausblenden */
.pi-demo-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--compact-muted, #6e6576); cursor: pointer; margin-right: 8px; }
.pi-demo-toggle input { width: 15px; height: 15px; margin: 0; accent-color: #643182; }
.pi-origin-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; color: #8c520b; background: #fff3dc; }
.pi-origin-note { margin: 10px 0 14px; }
.pi-origin-note code { font-size: 12px; }
html[data-workspace-theme="dark"] .pi-origin-badge { color: #e9c27b; background: rgba(140, 82, 11, .25); }
