/* QEVIO Platform Console – schlicht, getrennt von Mandanten-UI */

:root {
  --pl-bg: #0f1412;
  --pl-surface: #1a221e;
  --pl-line: #2c3a34;
  --pl-text: #e8f0ec;
  --pl-muted: #8fa399;
  --pl-accent: #3dba8c;
  --pl-danger: #e07171;
  --pl-font: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--pl-font);
  background: var(--pl-bg);
  color: var(--pl-text);
  min-height: 100vh;
}

.u3-hidden { display: none !important; }

.pl-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--pl-accent);
  color: #062218;
  font-weight: 800;
}

.pl-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pl-auth-wrap { width: 100%; max-width: 400px; }

.pl-auth-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.pl-auth-brand p {
  margin: 2px 0 0;
  color: var(--pl-muted);
  font-size: 0.85rem;
}

.pl-card {
  background: var(--pl-surface);
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  padding: 22px;
}

.pl-card h1 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.pl-sub {
  margin: 0 0 18px;
  color: var(--pl-muted);
  font-size: 0.9rem;
}

.pl-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.8rem;
  color: var(--pl-muted);
}

.pl-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pl-line);
  background: #121916;
  color: var(--pl-text);
  font-size: 1rem;
}

.pl-btn {
  margin-top: 16px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--pl-accent);
  color: #062218;
  font-weight: 700;
  cursor: pointer;
}

.pl-btn:disabled { opacity: 0.6; cursor: wait; }

.pl-btn-ghost {
  width: auto;
  margin: 0;
  background: transparent;
  color: var(--pl-text);
  border: 1px solid var(--pl-line);
}

.pl-error {
  margin-top: 12px;
  color: var(--pl-danger);
  font-size: 0.9rem;
}

.pl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--pl-line);
  background: #121816;
}

.pl-top-brand, .pl-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pl-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pl-nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--pl-muted);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.pl-nav-btn:hover { color: var(--pl-text); }

.pl-nav-btn.is-active {
  color: var(--pl-text);
  border-color: var(--pl-line);
  background: var(--pl-surface);
}

.pl-muted { color: var(--pl-muted); font-size: 0.9rem; }

.pl-main {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 20px 40px;
}

.pl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.pl-stat {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--pl-line);
  background: #121916;
}

.pl-stat span {
  display: block;
  color: var(--pl-muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.pl-stat strong {
  font-size: 1.4rem;
}

.pl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.pl-input-inline {
  width: auto;
  min-width: 180px;
  flex: 1;
}

.pl-field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 180px;
  flex: 1;
}

.pl-field-inline .pl-field-label {
  font-size: 0.78rem;
  color: var(--pl-muted);
}

.pl-select { min-width: 140px; flex: 0; }

.pl-btn-inline {
  width: auto;
  margin: 0;
  flex: 0;
  white-space: nowrap;
}

.pl-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pl-line);
  border-radius: 12px;
}

.pl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.pl-table th,
.pl-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pl-line);
  vertical-align: top;
}

.pl-table th {
  color: var(--pl-muted);
  font-weight: 600;
  font-size: 0.8rem;
  background: #121916;
}

.pl-table tr:last-child td { border-bottom: 0; }

.pl-table-compact th,
.pl-table-compact td { padding: 8px 10px; }

.pl-cell-sub {
  color: var(--pl-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.pl-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--pl-line);
}

.pl-nav-btn.is-disabled,
.pl-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pl-badge-ok {
  color: #9ee4c5;
  border-color: #2f6b52;
  background: #143528;
}

.pl-badge-warn {
  color: #f0d39a;
  border-color: #6b5430;
  background: #2a2214;
}

.pl-badge-err {
  color: #f0b4b4;
  border-color: #6b3030;
  background: #2a1414;
}

.pl-badge-off {
  color: #c9b4b4;
  border-color: #5a4040;
  background: #2a1c1c;
}

.pl-ms-slow {
  color: #f0d39a;
  font-weight: 600;
}

.pl-uri {
  word-break: break-all;
}

.pl-apilog-bodies {
  display: grid;
  gap: 12px;
}

.pl-badge-home {
  margin-left: 6px;
  color: #b8d4ff;
  border-color: #3a547a;
  background: #1a2436;
}

.pl-sys-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.pl-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pl-callout {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--pl-line);
}

.pl-callout strong {
  display: block;
  margin-bottom: 6px;
}

.pl-callout-warn {
  background: #2a2418;
  border-color: #6b5a2e;
  color: #f0e2b8;
}

.pl-callout-ok {
  background: #143528;
  border-color: #2f6b52;
  color: #c8ead9;
}

.pl-grace-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.pl-checklist {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0f1412;
  border: 1px solid var(--pl-line);
  font-size: 0.9rem;
}

.pl-checklist ol,
.pl-checklist-ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.pl-checklist li,
.pl-checklist-ol li {
  margin: 4px 0;
}

.pl-key-grace {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--pl-muted);
}

.pl-key-grace.is-on {
  color: #f0e2b8;
}

.pl-key-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.pl-sub-tight {
  margin-bottom: 0;
}

.pl-sys-head {
  margin-bottom: 4px;
}

.pl-system-shell {
  padding-bottom: 28px;
}

.pl-subnav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
  padding: 4px;
  border-radius: 12px;
  background: #121916;
  border: 1px solid var(--pl-line);
}

.pl-subnav-btn {
  border: 0;
  background: transparent;
  color: var(--pl-muted);
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.pl-subnav-btn:hover {
  color: var(--pl-text);
}

.pl-subnav-btn.is-active {
  background: var(--pl-surface);
  color: var(--pl-text);
  box-shadow: inset 0 -2px 0 var(--pl-accent);
}

.pl-sys-pane {
  min-height: 240px;
}

.pl-legend {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #121916;
  border: 1px solid var(--pl-line);
  color: var(--pl-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.pl-info-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
}

.pl-info {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--pl-line);
  background: #1a221e;
  color: var(--pl-accent);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.pl-info:hover,
.pl-info[aria-expanded="true"] {
  border-color: var(--pl-accent);
  color: #062218;
  background: var(--pl-accent);
}

.pl-info-tip {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 8px);
  width: min(340px, 78vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pl-line);
  background: #1a221e;
  color: var(--pl-text);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.pl-roles-help {
  margin: 0 0 16px;
}

.pl-roles-help-title {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pl-roles-grid {
  display: grid;
  gap: 8px;
}

.pl-roles-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 6px 8px;
  font-size: 0.86rem;
  color: var(--pl-muted);
}

.pl-audit-meta {
  font-size: 0.75rem;
  word-break: break-all;
}

.pl-click-row { cursor: pointer; }
.pl-click-row:hover td { background: rgba(61, 186, 140, 0.06); }

.pl-plans-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.pl-plan-editor { margin: 0; position: sticky; top: 12px; }

.pl-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 10px;
}

.pl-section-title {
  margin: 14px 0 8px;
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .pl-plans-layout { grid-template-columns: 1fr; }
  .pl-plan-editor { position: static; }
}

.pl-filter-panel {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--pl-line);
  background: #121916;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pl-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: flex-end;
}

.pl-filter-row-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
  gap: 12px 14px;
  align-items: end;
}

.pl-filter-grow {
  flex: 1 1 240px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.pl-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}

.pl-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  padding-bottom: 1px;
}

.pl-seg {
  display: inline-flex;
  border: 1px solid var(--pl-line);
  border-radius: 10px;
  overflow: hidden;
  background: #0f1412;
}

.pl-seg-btn {
  margin: 0;
  border: 0;
  border-right: 1px solid var(--pl-line);
  background: transparent;
  color: var(--pl-muted);
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pl-seg-btn:last-child { border-right: 0; }

.pl-seg-btn:hover { color: var(--pl-text); }

.pl-seg-btn.is-active {
  background: var(--pl-accent);
  color: #062218;
}

.pl-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.pl-table-audit {
  table-layout: fixed;
  width: 100%;
}

.pl-table-audit .pl-col-when { width: 18%; }
.pl-table-audit .pl-col-event { width: 32%; }
.pl-table-audit .pl-col-tenant { width: 22%; }
.pl-table-audit .pl-col-actor { width: 22%; }
.pl-table-audit .pl-col-more { width: 6%; text-align: right; }

.pl-table-audit td {
  vertical-align: top;
}

.pl-audit-detail td {
  background: #0f1412;
  border-bottom: 1px solid var(--pl-line);
  padding: 10px 14px 14px;
}

.pl-audit-json {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--pl-line);
  background: #121916;
  color: var(--pl-text);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}

@media (max-width: 900px) {
  .pl-filter-row-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pl-table-audit .pl-col-when,
  .pl-table-audit .pl-col-event,
  .pl-table-audit .pl-col-tenant,
  .pl-table-audit .pl-col-actor,
  .pl-table-audit .pl-col-more {
    width: auto;
  }
}

@media (max-width: 720px) {
  .pl-filter-row-grid {
    grid-template-columns: 1fr;
  }
}

.pl-th-help {
  white-space: nowrap;
}

.pl-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pl-panel-block {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--pl-line);
  background: #121916;
}

.pl-panel-block h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--pl-text);
}

.pl-panel-block + .pl-panel-block {
  margin-top: 4px;
}

.pl-section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pl-key-card {
  border: 1px solid var(--pl-line);
  border-radius: 10px;
  padding: 10px;
  background: #0f1412;
}

.pl-rotate-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #6b5a2e;
  background: #2a2418;
}

.pl-rotate-panel h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.pl-rotate-panel p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #f0e2b8;
}

.pl-sys-block {
  border: 1px solid var(--pl-line);
  border-radius: 12px;
  padding: 14px;
  background: #121916;
}

.pl-sys-block h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.pl-sys-block h3 {
  margin: 16px 0 8px;
  font-size: 0.85rem;
  color: var(--pl-muted);
  font-weight: 600;
}

.pl-kv {
  margin: 0;
  display: grid;
  gap: 8px;
}

.pl-kv > div {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: 8px;
  align-items: start;
}

.pl-kv dt {
  margin: 0;
  color: var(--pl-muted);
  font-size: 0.8rem;
}

.pl-kv dd {
  margin: 0;
  word-break: break-word;
}

.pl-mono, code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
}

.pl-list {
  margin: 0;
  padding-left: 18px;
  color: var(--pl-text);
}

.pl-2fa-apps {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--pl-border, #2a3a34);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.pl-2fa-apps-label {
  margin: 8px 0 6px;
  font-size: 0.85rem;
  color: var(--pl-muted);
}

.pl-2fa-apps-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-2fa-apps-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.pl-2fa-apps-list li:first-child {
  border-top: 0;
}

.pl-2fa-apps-links a {
  color: var(--pl-accent, #7dcfb6);
  text-decoration: none;
}

.pl-2fa-apps-links a:hover {
  text-decoration: underline;
}

.pl-2fa-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--pl-text);
}

.pl-2fa-setup-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-start;
  margin: 12px 0;
}

.pl-2fa-qr {
  width: 180px;
  height: 180px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
}

.pl-2fa-qr img,
.pl-2fa-qr canvas,
.pl-2fa-qr table {
  display: block;
  margin: 0 auto;
}

.pl-2fa-secret-wrap .pl-key-value {
  display: block;
  margin: 6px 0 8px;
  word-break: break-all;
  user-select: all;
}

.pl-2fa-advanced {
  margin-top: 10px;
}

.pl-2fa-advanced summary {
  cursor: pointer;
}

.pl-note {
  margin-top: 16px;
  color: var(--pl-muted);
  font-size: 0.85rem;
}

.pl-field {
  display: block;
  margin-bottom: 12px;
}

.pl-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--pl-muted);
}

.pl-field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.pl-field-check input { width: auto; }

.pl-textarea {
  resize: vertical;
  min-height: 88px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
}

.pl-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pl-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.pl-btn-danger {
  background: #8b3a3a;
  color: #ffe8e8;
}

.pl-btn-xs {
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pl-actions {
  white-space: nowrap;
  text-align: right;
}

.pl-section-title {
  margin: 20px 0 10px;
  font-size: 1rem;
}

.pl-stat strong .pl-badge {
  font-size: 0.85rem;
  font-weight: 600;
}

.pl-simple-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.pl-simple-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--pl-line);
  border-radius: 10px;
  background: #0f1412;
}

.pl-simple-list li > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pl-key-reveal {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #3a547a;
  background: #1a2436;
}

.pl-key-list {
  display: grid;
  gap: 10px;
}

.pl-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--pl-line);
  border-radius: 10px;
  background: #0f1412;
}

.pl-key-row .pl-btn {
  flex-shrink: 0;
}

.pl-key-value {
  display: block;
  margin: 8px 0;
  padding: 10px;
  word-break: break-all;
  background: #0f1412;
  border-radius: 8px;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .pl-top { align-items: flex-start; }
  .pl-kv > div { grid-template-columns: 1fr; gap: 2px; }
  .pl-field-row { grid-template-columns: 1fr; }
}
