@charset "UTF-8";
/* ==========================================================================
   GENERIERT — nicht direkt bearbeiten.
   Quelle: wwwroot/scss/, kompiliert von AspNetCore.SassCompiler bei jedem
   dotnet build. Änderungen hier gehen beim nächsten Build verloren.
   ==========================================================================

   pbsgeo admin — design tokens
   Drawn from the friedhofsplan.de brand palette (Shared/Styling/
   PgColorPalette.ts): a light control room with a deep-navy instrument
   rail (sidebar) and the same pbsgeo blue used for actions across the
   consumer app. Monospace stays reserved for anything measured or counted.
   ========================================================================== */
:root {
  color-scheme: light;
  /* Surfaces, darkest to lightest */
  --pg-void: #e9eef2;
  --pg-sidebar: #011638;
  --pg-sidebar-hover: #143a61;
  --pg-surface: #ffffff;
  --pg-surface-sunken: #f5f5f5;
  --pg-surface-hover: #ebebeb;
  /* Lines */
  --pg-border: #c2c2c2;
  --pg-border-strong: #9e9e9e;
  /* Text */
  --pg-text: #212121;
  --pg-text-muted: #797979;
  --pg-text-faint: #9e9e9e;
  --pg-text-on-dark: #cfe3f0;
  --pg-text-on-dark-active: #ffffff;
  /* Accent — pbsgeo blue */
  --pg-accent: #4085b3;
  --pg-accent-strong: #2f6690;
  --pg-accent-on-dark: #8dbadb;
  --pg-accent-soft: rgba(64, 133, 179, 0.1);
  --pg-accent-border: rgba(64, 133, 179, 0.4);
  --pg-on-accent: #ffffff;
  /* Semantic */
  --pg-success: #21a366;
  --pg-success-soft: rgba(33, 163, 102, 0.12);
  --pg-danger: #f50022;
  --pg-danger-strong: #c40019;
  --pg-danger-soft: rgba(245, 0, 34, 0.08);
  --pg-warning: #d3a24d;
  --pg-warning-soft: rgba(211, 162, 77, 0.16);
  /* Shape */
  --pg-radius: 8px;
  --pg-radius-sm: 4px;
  --pg-shadow-sm: 0 1px 2px rgba(1, 22, 56, 0.07);
  --pg-shadow-md: 0 8px 24px rgba(1, 22, 56, 0.12);
  /* Shell */
  --pg-sidebar-w: 240px;
  --pg-sidebar-w-collapsed: 72px;
  /* Type */
  --pg-font-body: "PublicSans", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pg-font-mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Dark theme — same instrument-rail concept, but the whole control room
   goes dark instead of just the sidebar. Every component below is already
   built on these tokens, so overriding them here is sufficient for the
   hand-rolled UI; the handful of MudBlazor components (a couple of menus
   and multi-selects) keep their own light palette (configured separately
   in App.razor) and are a known, deliberate gap rather than an oversight. */
:root[data-theme=dark] {
  color-scheme: dark;
  --pg-void: #05080f;
  --pg-sidebar: #010d20;
  --pg-sidebar-hover: #0f2038;
  --pg-surface: #111823;
  --pg-surface-sunken: #0b111a;
  --pg-surface-hover: #1a2330;
  --pg-border: #263140;
  --pg-border-strong: #3a4756;
  --pg-text: #e6ecf2;
  --pg-text-muted: #9aa7b5;
  --pg-text-faint: #6b7885;
  --pg-text-on-dark: #cfe3f0;
  --pg-text-on-dark-active: #ffffff;
  --pg-accent: #6ba9d1;
  --pg-accent-strong: #8dbadb;
  --pg-accent-on-dark: #8dbadb;
  --pg-accent-soft: rgba(107, 169, 209, 0.16);
  --pg-accent-border: rgba(107, 169, 209, 0.4);
  --pg-on-accent: #051221;
  --pg-success: #35c37f;
  --pg-success-soft: rgba(53, 195, 127, 0.16);
  --pg-danger: #ff5470;
  --pg-danger-strong: #ff2f52;
  --pg-danger-soft: rgba(255, 84, 112, 0.14);
  --pg-warning: #e0b767;
  --pg-warning-soft: rgba(224, 183, 103, 0.16);
  --pg-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --pg-shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
}

:root[data-theme=dark] .modal {
  background: rgba(0, 0, 0, 0.7);
}

/* Base files. */
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}

audio,
canvas,
progress,
video {
  display: inline-block;
  vertical-align: baseline;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

[hidden],
template {
  display: none;
}

a {
  background-color: transparent;
}

a:active {
  outline: 0;
}

a:hover {
  outline: 0;
}

abbr[title] {
  border-bottom: 1px dotted;
}

b,
strong {
  font-weight: bold;
}

dfn {
  font-style: italic;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

mark {
  background: #ff0;
  color: #000;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

img {
  border: 0;
}

svg:not(:root) {
  overflow: hidden;
}

figure {
  margin: 1em 40px;
}

hr {
  box-sizing: content-box;
  height: 0;
}

pre {
  overflow: auto;
}

code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}

button {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
html input[type=button],
input[type=reset],
input[type=submit] {
  -webkit-appearance: button;
  cursor: pointer;
}

button[disabled],
html input[disabled] {
  cursor: default;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

input {
  line-height: normal;
}

input[type=checkbox],
input[type=radio] {
  box-sizing: border-box;
  padding: 0;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  height: auto;
}

input[type=search] {
  -webkit-appearance: textfield;
  box-sizing: content-box;
}

input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}

fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

legend {
  border: 0;
  padding: 0;
}

textarea {
  overflow: auto;
}

optgroup {
  font-weight: bold;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/9/2014
* Sass Version by Seth Coelen https://github.com/whatsnewsaes
*/
html {
  font-size: 62.5%;
}

body {
  font-size: 1.5em;
  line-height: 1.6;
  font-weight: 400;
  font-family: var(--pg-font-body);
  color: var(--pg-text);
}

a {
  color: var(--pg-accent);
}

a:hover {
  color: var(--pg-accent-strong);
}

hr {
  margin-top: 3rem;
  margin-bottom: 3.5rem;
  border-width: 0;
  border-top: 1px solid var(--pg-border);
}

.bg-danger {
  background-color: var(--pg-danger) !important;
}

.bg-success {
  background-color: var(--pg-success) !important;
}

.u-full-width {
  width: 100%;
  box-sizing: border-box;
}

.u-max-full-width {
  max-width: 100%;
  box-sizing: border-box;
}

.pg-mono {
  font-family: var(--pg-font-mono);
  letter-spacing: 0.02em;
}

.pg-count-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--pg-font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pg-text-faint);
  letter-spacing: 0.02em;
}

.pg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  color: var(--pg-text-faint);
  border: 1px dashed var(--pg-border-strong);
  border-radius: var(--pg-radius);
  font-size: 1.3rem;
}

.pg-empty-state i {
  font-size: 2rem;
  color: var(--pg-text-faint);
}

.pg-empty-state__hint {
  font-size: 0.85em;
}

/* Skeleton loading placeholders — used while data for a card/table loads
   asynchronously, so the layout is stable before content ever arrives. */
@keyframes pg-skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.pg-skeleton {
  display: inline-block;
  height: 1em;
  border-radius: var(--pg-radius-sm);
  background: linear-gradient(90deg, var(--pg-surface-hover) 25%, var(--pg-border) 37%, var(--pg-surface-hover) 63%);
  background-size: 400% 100%;
  animation: pg-skeleton-shimmer 1.4s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
  .pg-skeleton {
    animation: none;
    background: var(--pg-surface-hover);
  }
}
.pg-skeleton-text {
  width: 100%;
  max-width: 220px;
  margin: 0.3em 0;
}

.pg-skeleton-text--sm {
  max-width: 100px;
}

.pg-skeleton-text--lg {
  height: 2rem;
  max-width: 90px;
}

/* Section eyebrow — a lightweight label for a group of cards that doesn't
   warrant a full .fu-section card wrapper (e.g. the primary KPI row on the
   dashboard, kept visually dominant over secondary stats below it). */
.pg-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pg-text-muted);
  margin-bottom: 10px;
}

.pg-eyebrow i {
  color: var(--pg-accent);
}

/* Compact secondary stat strip — a lighter-weight alternative to
   .pg-kpi-grid for supplementary counts that shouldn't visually compete
   with the primary KPI cards above them. Rendered as a grid of quiet
   individual cards rather than one flat divided strip, so it reads as
   a set of distinct metrics instead of a table row. */
.pg-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.pg-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pg-stat:hover {
  border-color: var(--pg-accent-border);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .pg-stat {
    transition: none;
  }
  .pg-stat:hover {
    transform: none;
  }
}
.pg-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pg-accent-soft);
  color: var(--pg-accent);
  font-size: 14px;
  flex: 0 0 auto;
}

.pg-stat__value {
  font-family: var(--pg-font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pg-text);
  line-height: 1.1;
}

.pg-stat__label {
  font-size: 1.25rem;
  color: var(--pg-text-muted);
}

/* KPI stat tiles, used for dashboard-style overview rows */
.pg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.pg-kpi-card {
  position: relative;
  background: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  padding: 16px 18px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pg-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pg-accent), var(--pg-accent-strong));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.pg-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pg-shadow-md);
  border-color: var(--pg-accent-border);
}

.pg-kpi-card:hover::before {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .pg-kpi-card,
  .pg-kpi-card::before {
    transition: none;
  }
  .pg-kpi-card:hover {
    transform: none;
  }
}
/* Two-column layout for smaller cards, so a page's sections don't just
   stack full-width one under another on wide desktop screens. Cards that
   need the full width (long tables, badge grids) opt out with
   .pg-section-grid__full. */
.pg-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-top: 20px;
}

.pg-section-grid > .fu-section {
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.pg-section-grid__full {
  grid-column: 1/-1;
}

@media (max-width: 900px) {
  .pg-section-grid {
    grid-template-columns: 1fr;
  }
}
/* Read-only settings panel. A label/value table leaves most of a
   full-width card empty, so settings flow into as many columns as fit
   and each one reads label-over-value. The 1px gap over a border-coloured
   background draws the hairlines, which keeps the cells aligned without
   per-cell border bookkeeping. */
.pg-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--pg-border);
}

.pg-setting {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 13px 20px;
  background: var(--pg-surface);
}

/* For values that need room to breathe (URLs, long paths). */
.pg-setting--wide {
  grid-column: span 2;
}

.pg-setting__label {
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--pg-text-muted);
}

.pg-setting__value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pg-text);
  overflow-wrap: anywhere;
}

.pg-setting__value.pg-mono {
  font-size: 1.4rem;
}

/* An empty value should read as "not set", not as a rendering glitch. */
.pg-setting__value:empty::before {
  content: "—";
  color: var(--pg-text-faint);
  font-weight: 400;
}

@media (max-width: 600px) {
  .pg-settings-grid {
    grid-template-columns: 1fr;
  }
  .pg-setting--wide {
    grid-column: auto;
  }
}
/* A row that offers an action rather than displaying a value — used where a
   table was previously abused to lay out a single label-plus-button line.
   Room for a description matters here: these tend to be operations whose
   consequences aren't obvious from a three-word label. */
.pg-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--pg-surface);
}

.pg-action-row + .pg-action-row {
  border-top: 1px solid var(--pg-border);
}

.pg-action-row__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pg-action-row__title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pg-text);
}

.pg-action-row__desc {
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--pg-text-muted);
}

.pg-action-row__action {
  margin-left: auto;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .pg-action-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .pg-action-row__action {
    margin-left: 0;
  }
}
/* Page header meta line — customer/tenant context under a page's <h3>,
   so "which environment am I in" stays visible without its own card. */
.pg-page-subtitle {
  margin: 4px 0 0;
  font-size: 1.45rem;
  color: var(--pg-text-muted);
}

.pg-page-subtitle .pg-mono {
  margin-left: 6px;
  color: var(--pg-text-faint);
}

/* Dashboard alert banner — surfaces something that needs attention (e.g.
   a licence quota running out) above the fold instead of leaving it to a
   bar-color change deep in a KPI card. */
.pg-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--pg-warning);
  border-radius: var(--pg-radius);
  background: var(--pg-warning-soft);
  color: var(--pg-text);
  font-size: 1.45rem;
  animation: pg-page-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pg-alert i {
  flex: 0 0 auto;
  color: var(--pg-warning);
  font-size: 1rem;
}

/* Flex items default to a min-width equal to their content's natural width,
   so without this the message span refuses to wrap and instead overflows
   past the box's right edge on long text instead of breaking onto a new line. */
.pg-alert > span {
  flex: 1 1 auto;
  min-width: 0;
}

.pg-alert strong {
  font-weight: 700;
}

.pg-alert--danger {
  border-color: var(--pg-danger);
  background: var(--pg-danger-soft);
}

.pg-alert--danger i {
  color: var(--pg-danger);
}

.pg-alert--success {
  border-color: var(--pg-success);
  background: var(--pg-success-soft);
}

.pg-alert--success i {
  color: var(--pg-success);
}

.pg-alert__action {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (prefers-reduced-motion: reduce) {
  .pg-alert {
    animation: none;
  }
}
/* Quick actions — the dashboard's most frequent destinations, one click
   away instead of back through the sidebar every time. */
.pg-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.pg-quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  color: var(--pg-text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.pg-quick-action:hover {
  border-color: var(--pg-accent-border);
  box-shadow: var(--pg-shadow-sm);
  transform: translateY(-2px);
  color: var(--pg-text);
  text-decoration: none;
}

.pg-quick-action:focus-visible {
  outline: 2px solid var(--pg-accent-soft);
  outline-offset: 2px;
  border-color: var(--pg-accent);
}

.pg-quick-action__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--pg-radius-sm);
  background: var(--pg-accent-soft);
  color: var(--pg-accent);
  font-size: 14px;
  flex: 0 0 auto;
}

.pg-quick-action__label {
  font-size: 1.35rem;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .pg-quick-action {
    transition: none;
  }
  .pg-quick-action:hover {
    transform: none;
  }
}
/* Progressive-disclosure card — groups low-frequency reference data
   (licence metadata, module/feature badges) behind a native <details>
   toggle so it doesn't compete for attention with actionable content,
   while its summary still shows enough (active badge, module count) to
   be useful collapsed. No JS needed; the browser handles the toggle. */
.pg-disclosure {
  margin-top: 20px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  overflow: hidden;
}

.pg-disclosure > summary {
  cursor: pointer;
  list-style: none;
}

.pg-disclosure > summary::-webkit-details-marker {
  display: none;
}

.pg-disclosure__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.pg-disclosure__chevron {
  font-size: 11px;
  color: var(--pg-text-faint);
  transition: transform 0.2s ease;
}

.pg-disclosure[open] > summary .pg-disclosure__chevron {
  transform: rotate(180deg);
}

.pg-disclosure__body {
  padding: 18px 20px 4px;
  border-top: 1px solid var(--pg-border);
}

@media (prefers-reduced-motion: reduce) {
  .pg-disclosure__chevron {
    transition: none;
  }
}
.pg-kpi-card__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pg-text-faint);
  margin-bottom: 10px;
}

.pg-kpi-card__label i {
  color: var(--pg-accent);
}

.pg-kpi-card__value {
  font-family: var(--pg-font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--pg-text);
  line-height: 1;
}

.pg-kpi-card__value small {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--pg-text-faint);
}

.pg-kpi-card__bar {
  margin-top: 10px;
  height: 5px;
  border-radius: 3px;
  background: var(--pg-border);
  overflow: hidden;
}

.pg-kpi-card__bar-fill {
  height: 100%;
  background: var(--pg-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.pg-kpi-card__bar-fill.pg-kpi-card__bar-fill--warn {
  background: var(--pg-warning);
}

.pg-kpi-card__bar-fill.pg-kpi-card__bar-fill--full {
  background: var(--pg-danger);
}

/* At-a-glance status chip on a KPI card, top-right corner — lets a user
   scan a whole KPI row for anything approaching its quota without reading
   every bar individually. */
.pg-kpi-card__status {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--pg-success-soft);
  color: var(--pg-success);
}

.pg-kpi-card__status--warn {
  background: var(--pg-warning-soft);
  color: var(--pg-warning);
}

.pg-kpi-card__status--full {
  background: var(--pg-danger-soft);
  color: var(--pg-danger);
}

/* Route-change progress bar (Router's <Navigating> fragment) — replaces the
   "page just hangs" feeling during a Blazor Server navigation with visible
   feedback that something is happening. */
.pg-route-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200000;
  overflow: hidden;
  background: transparent;
}

.pg-route-progress__bar {
  position: absolute;
  top: 0;
  left: -40%;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--pg-accent), var(--pg-accent-strong));
  box-shadow: 0 0 10px var(--pg-accent-border);
  animation: pg-route-progress-slide 0.9s ease-in-out infinite;
}

@keyframes pg-route-progress-slide {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pg-route-progress__bar {
    animation: none;
    left: 0;
    width: 100%;
    opacity: 0.6;
  }
}
/* Page-entry reveal — each top-level block of a .pg-page cascades in on
   navigation, so a route change reads as a deliberate transition rather
   than a jump-cut. */
@keyframes pg-page-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pg-header-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Alert box for modals and forms — provides immediate feedback on errors
   or success without leaving the current page. Used in invite flows, etc. */
.alert {
  padding: 12px 16px;
  border-radius: var(--pg-radius);
  margin-bottom: 16px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  animation: pg-page-in 0.2s ease-out;
}

.alert-danger {
  background-color: var(--pg-danger-soft);
  color: var(--pg-danger);
  border-color: var(--pg-danger);
}

.alert-success {
  background-color: var(--pg-success-soft);
  color: var(--pg-success);
  border-color: var(--pg-success);
}

/* Button wrapper for loading states — places a spinner next to a button
   when an async action is in progress. */
.button-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.button-wrapper input[type=submit] {
  flex: 0 1 auto;
}

/* Animated spinner for loading states — a simple hourglass emoji that
   rotates to indicate progress. */
.spinner-small {
  display: inline-block;
  font-size: 1.25rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .alert {
    animation: none;
  }
  .spinner-small {
    animation: none;
    opacity: 0.6;
  }
}
.header-content {
  animation: pg-header-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pg-page > * {
  animation: pg-page-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pg-page > *:nth-child(1) {
  animation-delay: 0.03s;
}

.pg-page > *:nth-child(2) {
  animation-delay: 0.08s;
}

.pg-page > *:nth-child(3) {
  animation-delay: 0.13s;
}

.pg-page > *:nth-child(4) {
  animation-delay: 0.18s;
}

.pg-page > *:nth-child(5) {
  animation-delay: 0.23s;
}

.pg-page > *:nth-child(6) {
  animation-delay: 0.28s;
}

.pg-page > *:nth-child(n+7) {
  animation-delay: 0.32s;
}

/* Dialogs must never take part in the page-entry reveal. The animation
   animates `transform`, which makes the animated element a containing block
   for its `position: fixed` descendants — and with `fill-mode: both` the
   browser keeps that containing block for good. A dialog rendered inside a
   .pg-page (directly, or wrapped in an EditForm's <form>) therefore ends up
   positioned inside a zero-height box: it opens, but nothing is visible.
   Excluded here as a safety net; dialogs are also placed outside .pg-page. */
.pg-page > .modal,
.pg-page > form {
  animation: none !important;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .header-content,
  .pg-page > * {
    animation: none;
  }
}
.pg-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.pg-badge-grid .badge-grey {
  opacity: 0.6;
}

/* Module overview grid — promotes module activation status from a buried
   badge list to a scannable card grid on the dashboard, so an admin sees
   what's active without opening a disclosure. */
.pg-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.pg-module-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pg-module-card:hover {
  border-color: var(--pg-accent-border);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .pg-module-card {
    transition: none;
  }
  .pg-module-card:hover {
    transform: none;
  }
}
.pg-module-card--inactive {
  opacity: 0.55;
}

.pg-module-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pg-accent-soft);
  color: var(--pg-accent);
  font-size: 14px;
  flex: 0 0 auto;
}

.pg-module-card--inactive .pg-module-card__icon {
  background: var(--pg-surface-sunken);
  color: var(--pg-text-faint);
}

.pg-module-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.pg-module-card__name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-module-card__status {
  font-size: 1.15rem;
  color: var(--pg-text-muted);
}

.pg-module-card--active .pg-module-card__status {
  color: var(--pg-success);
}

.pg-module-card__check {
  color: var(--pg-success);
  font-size: 1.45rem;
  flex: 0 0 auto;
}

/* Responsive field grid for modal forms — replaces long stacks of
   full-width .form-group rows with a compact multi-column layout. */
/* Fixed two-column pairing, deliberately NOT auto-fit: with auto-fit the
   column count follows the dialog width, so a four-field block came out as
   3 + 1 and left "Passwort wiederholen" dangling on its own row below its
   own label. Pairs stay pairs, and a field opts out with --full. */
.pg-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  /* start, nicht stretch: sonst wird jedes Feld auf die Höhe der höchsten
     Zelle der Zeile gezogen und das Eingabefeld rutscht gegenüber seinem
     Nachbarn nach unten, sobald eines der beiden einen Hinweistext hat. */
  align-items: start;
}

.pg-field-grid .form-group {
  min-width: 0;
  margin-bottom: 16px;
}

.pg-field-grid .form-group--full {
  grid-column: 1/-1;
}

@media (max-width: 640px) {
  .pg-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Toggle card grid — used for module/feature switches in modal forms so
   20+ on/off settings read as a scannable grid instead of a flat list. */
.pg-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.pg-toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  background: var(--pg-surface-sunken);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pg-toggle-card--active {
  border-color: var(--pg-accent-border);
  background: var(--pg-accent-soft);
}

.pg-toggle-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pg-surface);
  color: var(--pg-text-faint);
  font-size: 11px;
  flex: 0 0 auto;
}

.pg-toggle-card--active .pg-toggle-card__icon {
  background: var(--pg-accent);
  color: #fff;
}

.pg-toggle-card__label {
  flex: 1 1 auto;
  font-size: 1.35rem;
  color: var(--pg-text);
  min-width: 0;
}

.pg-toggle-card .switch {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.modal-dialog--lg {
  max-width: 760px !important;
}

/* Inline "add new item" row — a lightweight create-in-place form (e.g.
   adding an allowed file extension) instead of a full modal, styled to
   read as a distinct action area rather than a stray leftover input. */
/* Small round icon-only action anchored in a section header (e.g. "add
   new item"), styled as a quiet secondary affordance rather than a full
   button so it doesn't compete with the header title. */
.pg-header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--pg-border);
  color: var(--pg-accent);
  background: var(--pg-surface);
  font-size: 1.3rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pg-header-icon-btn:hover {
  background: var(--pg-accent);
  border-color: var(--pg-accent);
  color: #fff;
}

.pg-help-text--error {
  color: var(--pg-danger) !important;
}

/* Segmented pill control — a compact alternative to a <select> for a
   small, fixed set of mutually exclusive options. */
.pg-segmented {
  display: inline-flex;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  overflow: hidden;
  background: var(--pg-surface);
  height: 38px;
}

.pg-segmented__option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--pg-text-muted);
  font-size: 1.3rem !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pg-segmented__option + .pg-segmented__option {
  border-left: 1px solid var(--pg-border);
}

.pg-segmented__option:hover {
  background: var(--pg-surface-hover);
  color: var(--pg-text);
}

.pg-segmented__option--active {
  background: var(--pg-accent);
  color: #fff;
}

.pg-segmented__option--active:hover {
  background: var(--pg-accent-strong);
  color: #fff;
}

.pg-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pg-field-row button {
  margin-bottom: 16px;
}

.pg-field-row input[type=text],
.pg-field-row select {
  width: auto;
  min-width: 160px;
}

/* Table toolbar — a flush strip inside the section card, directly under the
   section header and separated from the table by the same hairline the header
   uses. Previously it floated in an ad-hoc inline-padded wrapper above the
   table, which read as a stray input rather than part of the table chrome. */
.pg-table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--pg-border);
  flex-wrap: wrap;
}

.pg-table-toolbar .pg-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 10px;
  /* Lighter than the sunken section it sits in, so the field reads as an
     input instead of a hole in the card. */
  background-color: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pg-table-toolbar .pg-search:focus-within {
  border-color: var(--pg-accent);
  box-shadow: 0 0 0 3px var(--pg-accent-soft);
}

.pg-table-toolbar .pg-search__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: var(--pg-text-faint);
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
  transition: color 0.15s ease;
}

.pg-table-toolbar .pg-search:focus-within .pg-search__icon {
  color: var(--pg-accent);
}

.pg-table-toolbar .pg-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: auto !important;
  font-size: 1.35rem !important;
  line-height: 1.4 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--pg-text);
}

.pg-table-toolbar .pg-search input::placeholder {
  color: var(--pg-text-faint);
}

/* Eigenes Clear-Icon, also das native von WebKit ausblenden — sonst stehen
   zwei X nebeneinander. */
.pg-table-toolbar .pg-search input::-webkit-search-cancel-button,
.pg-picker__search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.pg-table-toolbar .pg-search input:focus {
  outline: none;
  box-shadow: none !important;
}

.pg-table-toolbar .pg-search__clear {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: var(--pg-surface-hover);
  color: var(--pg-text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.pg-table-toolbar .pg-search__clear:hover {
  background: var(--pg-border);
  color: var(--pg-text);
}

.pg-table-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-table-toolbar__count {
  margin-left: auto;
  padding: 3px 9px;
  border: 1px solid var(--pg-border);
  border-radius: 999px;
  background: var(--pg-surface);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--pg-text-muted);
  white-space: nowrap;
}

th.pg-th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

th.pg-th-sort:hover {
  color: var(--pg-text);
}

th.pg-th-sort .pg-sort-icon {
  margin-left: 5px;
  font-size: 10px;
  opacity: 0.35;
}

th.pg-th-sort.is-active {
  color: var(--pg-text);
}

th.pg-th-sort.is-active .pg-sort-icon {
  opacity: 1;
  color: var(--pg-accent);
}

.u-pull-right {
  float: right;
}

.u-pull-left {
  float: left;
}

.text-center {
  text-align: center;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.f-26 {
  font-size: 26px !important;
}

.blur-13 {
  filter: blur(13px);
}

.hide {
  visibility: hidden !important;
  opacity: 0;
}

.show {
  visibility: visible !important;
}

.flex {
  display: flex;
}

.flex-left {
  flex: 1 1 auto;
}

.flex-right {
  flex: 0 0 auto;
}

.center {
  align-items: center;
  justify-content: center;
}

.uppercase {
  text-transform: uppercase !important;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: 300;
  color: var(--pg-text);
}

h1 {
  font-size: 5rem;
}

h2 {
  font-size: 4.2rem;
}

h3 {
  font-size: 3.6rem;
}

h4 {
  font-size: 3rem;
  font-weight: bold;
  color: var(--pg-text-muted) !important;
}

h5 {
  font-size: 2.4rem;
}

h6 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--pg-text-muted) !important;
}

p {
  margin-top: 0;
  color: var(--pg-text);
}

label {
  font-size: 1.5rem;
  color: var(--pg-text-muted);
}

a {
  color: var(--pg-text-muted);
  text-decoration: none;
  font-weight: bolder;
}

/* Modules */
/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/9/2014
* Sass Version by Seth Coelen https://github.com/whatsnewsaes
*/
.container {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.column,
.columns {
  width: 100%;
  float: left;
  box-sizing: border-box;
}

@media (min-width: 400px) {
  .container {
    width: 85%;
    padding: 0;
  }
}
@media (min-width: 550px) {
  .container {
    width: 80%;
  }
  .column,
  .columns {
    margin-left: 4%;
  }
  .column:first-child,
  .columns:first-child {
    margin-left: 0;
  }
  .one.column,
  .one.columns {
    width: 4.6666666667%;
  }
  .two.columns {
    width: 13.3333333333%;
  }
  .three.columns {
    width: 22%;
  }
  .four.columns {
    width: 30.6666666667%;
  }
  .five.columns {
    width: 39.3333333333%;
  }
  .six.columns {
    width: 48%;
  }
  .seven.columns {
    width: 56.6666666667%;
  }
  .eight.columns {
    width: 65.3333333333%;
  }
  .nine.columns {
    width: 74%;
  }
  .ten.columns {
    width: 82.6666666667%;
  }
  .eleven.columns {
    width: 91.3333333333%;
  }
  .twelve.columns {
    width: 100%;
    margin-left: 0;
  }
  .one-third.column {
    width: 30.6666666667%;
  }
  .two-thirds.column {
    width: 65.3333333333%;
  }
  .one-half.column {
    width: 48%;
  }
  .offset-by-one.column,
  .offset-by-one.columns {
    margin-left: 8.6666666667%;
  }
  .offset-by-two.column,
  .offset-by-two.columns {
    margin-left: 17.3333333333%;
  }
  .offset-by-three.column,
  .offset-by-three.columns {
    margin-left: 26%;
  }
  .offset-by-four.column,
  .offset-by-four.columns {
    margin-left: 34.6666666667%;
  }
  .offset-by-five.column,
  .offset-by-five.columns {
    margin-left: 43.3333333333%;
  }
  .offset-by-six.column,
  .offset-by-six.columns {
    margin-left: 52%;
  }
  .offset-by-seven.column,
  .offset-by-seven.columns {
    margin-left: 60.6666666667%;
  }
  .offset-by-eight.column,
  .offset-by-eight.columns {
    margin-left: 69.3333333333%;
  }
  .offset-by-nine.column,
  .offset-by-nine.columns {
    margin-left: 78%;
  }
  .offset-by-ten.column,
  .offset-by-ten.columns {
    margin-left: 86.6666666667%;
  }
  .offset-by-eleven.column,
  .offset-by-eleven.columns {
    margin-left: 95.3333333333%;
  }
  .offset-by-one-third.column,
  .offset-by-one-third.columns {
    margin-left: 34.6666666667%;
  }
  .offset-by-two-thirds.column,
  .offset-by-two-thirds.columns {
    margin-left: 69.3333333333%;
  }
  .offset-by-one-half.column,
  .offset-by-one-half.column {
    margin-left: 52%;
  }
}
.container:after,
.row:after,
.u-cf {
  content: "";
  display: table;
  clear: both;
}

.button,
button {
  display: inline-block;
  height: 40px;
  padding: 0 30px;
  color: var(--pg-accent-strong);
  text-align: center;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
  letter-spacing: 0.1rem !important;
  text-transform: uppercase !important;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  box-sizing: border-box;
}

input[type=submit], input[type=reset], input[type=button] {
  display: inline-block;
  height: 40px;
  padding: 0 30px;
  color: var(--pg-accent-strong);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border-radius: var(--pg-radius-sm);
  border: 1px solid var(--pg-border-strong);
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.button:hover,
button:hover {
  color: var(--pg-text);
  border-color: var(--pg-accent-border);
  outline: 0;
}

input[type=submit]:hover, input[type=reset]:hover, input[type=button]:hover {
  color: var(--pg-text);
  border-color: var(--pg-accent-border);
  outline: 0;
}

.button:focus-visible,
button:focus-visible {
  color: var(--pg-text);
  border-color: var(--pg-accent);
  outline: 2px solid var(--pg-accent-soft);
  outline-offset: 1px;
}

input[type=submit]:focus-visible, input[type=reset]:focus-visible, input[type=button]:focus-visible {
  color: var(--pg-text);
  border-color: var(--pg-accent);
  outline: 2px solid var(--pg-accent-soft);
  outline-offset: 1px;
}

.button.button-primary,
button.button-primary {
  color: var(--pg-on-accent);
  background-color: var(--pg-accent);
  border-color: var(--pg-accent);
  font-weight: 700;
}

input[type=submit].button-primary, input[type=reset].button-primary, input[type=button].button-primary {
  color: var(--pg-on-accent);
  background-color: var(--pg-accent);
  border-color: var(--pg-accent);
}

input[type=submit].button-primary:disabled, input[type=reset].button-primary:disabled, input[type=button].button-primary:disabled {
  color: var(--pg-text-faint);
  background-color: var(--pg-surface-hover);
  border-color: var(--pg-border);
  outline: 0;
  cursor: not-allowed;
}

.button.button-primary:hover,
button.button-primary:hover {
  color: var(--pg-on-accent);
  background-color: var(--pg-accent-strong);
  border-color: var(--pg-accent-strong);
}

input[type=submit].button-primary:hover, input[type=reset].button-primary:hover, input[type=button].button-primary:hover {
  color: var(--pg-on-accent);
  background-color: var(--pg-accent-strong);
  border-color: var(--pg-accent-strong);
}

.button.button-primary:focus-visible,
button.button-primary:focus-visible {
  color: var(--pg-on-accent);
  background-color: var(--pg-accent);
  border-color: var(--pg-text);
  outline: 2px solid var(--pg-accent-soft);
  outline-offset: 1px;
}

input[type=submit].button-primary:focus-visible, input[type=reset].button-primary:focus-visible, input[type=button].button-primary:focus-visible {
  color: var(--pg-on-accent);
  background-color: var(--pg-accent);
  border-color: var(--pg-text);
}

input[type=email], input[type=number], input[type=search], input[type=text], input[type=tel], input[type=url], input[type=password] {
  height: 40px;
  padding: 6px 10px;
  background-color: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  box-shadow: none;
  box-sizing: border-box;
}

.btn-circle {
  width: 55px;
  height: 55px;
  padding: 10px 16px;
  border-radius: 35px;
  border: solid 1px var(--pg-border);
  border-style: solid none;
  font-size: 24px;
  line-height: 1.33;
  background: var(--pg-accent);
}

.btn-circle i {
  color: var(--pg-on-accent);
}

.btn-circle.btn-circle:hover {
  background: var(--pg-accent-strong);
}

input[type=email],
input[type=number],
input[type=search],
input[type=text],
input[type=tel],
input[type=url],
input[type=password],
textarea {
  padding: 10px;
  height: 40px;
  font-size: 16px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  border-radius: var(--pg-radius-sm);
  color: var(--pg-text);
  background-color: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
  transition: border-color 0.15s ease;
}

input[type=email].is-invalid,
input[type=number].is-invalid,
input[type=search].is-invalid,
input[type=text].is-invalid,
input[type=tel].is-invalid,
input[type=url].is-invalid,
input[type=password].is-invalid,
textarea.is-invalid {
  border: 1px solid var(--pg-danger) !important;
}

input[type=date] {
  padding: 10px;
  height: 40px;
  font-size: 16px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  border-radius: var(--pg-radius-sm);
  color: var(--pg-text);
  background-color: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border) !important;
}

input[type=date].is-invalid {
  border: 1px solid var(--pg-danger) !important;
}

select {
  padding: 10px;
  height: 40px;
  font-size: 16px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  border-radius: var(--pg-radius-sm);
  color: var(--pg-text);
  background-color: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
}

select.is-invalid {
  border: 1px solid var(--pg-danger) !important;
}

input[type=email], input[type=number], input[type=search], input[type=text], input[type=tel], input[type=url], input[type=date], input[type=password] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: 65px;
  padding-top: 6px;
  padding-bottom: 6px;
}

input[type=email]:focus, input[type=number]:focus, input[type=search]:focus, input[type=text]:focus, input[type=tel]:focus, input[type=date]:focus, input[type=url]:focus, input[type=password]:focus,
select:focus,
textarea:focus {
  border: 1px solid var(--pg-accent);
  outline: 2px solid var(--pg-accent-soft);
  outline-offset: 0;
}

label,
legend {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

label.is-invalid,
legend.is-invalid {
  color: var(--pg-danger) !important;
}

label.is-invalid span,
legend.is-invalid span {
  font-weight: normal;
  font-style: italic;
  font-size: 0.8em;
}

.field-error {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--pg-danger);
}

/* Quiet helper text under a field — same slot as .field-error, so a field
   keeps its height whether it currently shows a hint or a validation error. */
.pg-field-hint {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--pg-text-muted);
}

fieldset {
  padding: 0;
  border-width: 0;
}

input[type=checkbox], input[type=radio] {
  display: inline;
}

label > .label-body {
  display: inline-block;
  margin-left: 0.5rem;
  font-weight: normal;
}

.mud-input {
  font-size: 16px !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
  width: 100% !important;
  border-radius: var(--pg-radius-sm) !important;
  color: var(--pg-text) !important;
  background-color: var(--pg-surface-sunken) !important;
  border-color: var(--pg-border) !important;
}

.mud-input > input.mud-input-root-outlined, div.mud-input-slot.mud-input-root-outlined {
  padding: 11px !important;
}

.mud-input:focus {
  padding: 10px !important;
  height: 40px !important;
  font-size: 16px !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
  width: 100% !important;
  border-radius: var(--pg-radius-sm) !important;
  color: var(--pg-text) !important;
  background-color: var(--pg-surface-sunken) !important;
  border: 1px solid var(--pg-accent) !important;
  outline: 2px solid var(--pg-accent-soft) !important;
}

.mud-input.mud-input-outlined.mud-input-adorned-end:focus {
  padding-right: 14px;
  padding-inline-end: 0px !important;
  padding-inline-start: unset;
  border: 1px solid var(--pg-accent) !important;
}

.mud-select-input:focus {
  border-color: transparent !important;
}

.mud-input.mud-input-outlined .mud-input-outlined-border {
  border-color: var(--pg-border) !important;
  border-radius: var(--pg-radius-sm) !important;
  border: 1px solid var(--pg-border) !important;
}

.mud-typography-body1 {
  font-size: 16px !important;
  font-family: var(--pg-font-body);
}

ul {
  list-style: circle inside;
}

ol {
  list-style: decimal inside;
  padding-left: 0;
  margin-top: 0;
}

ul {
  padding-left: 0;
  margin-top: 0;
}

ul ul, ul ol {
  margin: 1.5rem 0 1.5rem 3rem;
  font-size: 90%;
}

ol ol, ol ul {
  margin: 1.5rem 0 1.5rem 3rem;
  font-size: 90%;
}

li {
  margin-bottom: 1rem;
}

code {
  padding: 0.2rem 0.5rem;
  margin: 0 0.2rem;
  font-size: 90%;
  font-family: var(--pg-font-mono);
  white-space: nowrap;
  background: var(--pg-surface-sunken);
  color: var(--pg-text);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
}

pre > code {
  display: block;
  padding: 1rem 1.5rem;
  white-space: pre;
}

button,
.button {
  margin-bottom: 1rem;
}

input,
textarea,
select,
fieldset {
  margin-bottom: 1.5rem;
}

pre,
blockquote,
dl,
figure,
table,
p,
ul,
ol {
  margin-bottom: 2.5rem;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar,
#snackbar-success {
  visibility: hidden;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: var(--pg-sidebar);
  border: 1px solid var(--pg-border-strong);
  border-left: 3px solid var(--pg-danger);
  color: var(--pg-text-on-dark-active);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow-md);
  padding: 14px 16px;
  position: fixed;
  z-index: -100;
  left: auto;
  right: 24px;
  bottom: 24px;
  top: auto;
  margin: 0;
  width: 360px;
  max-width: calc(100vw - 48px);
}

#snackbar-success {
  border-left-color: var(--pg-success);
}

#snackbar::before,
#snackbar-success::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 15px;
}

#snackbar::before {
  content: "\f057"; /* fa-times-circle */
  color: var(--pg-danger);
}

#snackbar-success::before {
  content: "\f058"; /* fa-check-circle */
  color: var(--pg-success);
}

.snackbar-text {
  flex: 1 1 auto;
  font-size: 13.5px;
  line-height: 1.4;
  padding-top: 1px;
}

.snackbar-close {
  flex: 0 0 auto;
  cursor: pointer;
  color: var(--pg-text-on-dark);
  font-size: 13px;
  padding: 2px;
  transition: color 0.15s ease;
}

.snackbar-close:hover {
  color: var(--pg-text-on-dark-active);
}

#snackbar.show,
#snackbar-success.show {
  visibility: visible;
  z-index: 100000;
  animation: pg-toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pg-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #snackbar.show,
  #snackbar-success.show {
    animation: none;
  }
}
.sidebar {
  background: var(--pg-sidebar);
  border-right: 1px solid rgba(0, 0, 0, 0.25);
  width: var(--pg-sidebar-w);
  height: 100%;
  z-index: 10000;
  transition: width 0.25s ease;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}

.sidebar .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 56px;
  padding: 0 8px;
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
  cursor: default;
  z-index: 2;
  background: var(--pg-surface);
  border-bottom: 1px solid var(--pg-border);
  flex: 0 0 auto;
}

.sidebar .sidebar-header .logo-wrap {
  flex: 1 1 auto;
  overflow: hidden;
}

.sidebar .sidebar-header .logo-picture {
  width: 13rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.sidebar-collapse-toggle {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--pg-radius-sm);
  background: transparent;
  color: var(--pg-text-on-dark);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 400 !important;
}

.sidebar-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--pg-accent-border);
  color: var(--pg-text-on-dark-active);
}

.sidebar-collapse-toggle i {
  font-size: 12px;
  line-height: 1;
}

.sidebar .sidebar-footer {
  position: relative;
  height: 52px;
  padding: 0 8px;
  font-size: 14px;
  line-height: 20px;
  cursor: default;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  background: var(--pg-sidebar);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-profile {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 5px;
  border: none;
  border-radius: var(--pg-radius-sm);
  background: transparent;
  color: inherit;
  font-family: var(--pg-font-body);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 400 !important;
}

.sidebar-profile:hover {
  background: var(--pg-sidebar-hover);
}

.sidebar-profile__chevron {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--pg-text-on-dark);
  opacity: 0.6;
}

.main-container.sidebar-collapsed .sidebar-profile__chevron {
  display: none;
}

.sidebar-profile__avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pg-accent-on-dark), var(--pg-accent-strong));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.sidebar-profile__avatar--lg {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.sidebar-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

.sidebar-profile-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  width: 260px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow-md);
  overflow: hidden;
  z-index: 10002;
  animation: pg-modal-in 0.15s ease;
}

.sidebar-profile-menu__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pg-border);
}

.sidebar-profile-menu__header .sidebar-profile__info {
  min-width: 0;
}

.sidebar-profile-menu__header .sidebar-profile__email {
  color: var(--pg-text);
  font-size: 13px;
}

.sidebar-profile-menu__header .sidebar-profile__role {
  color: var(--pg-accent);
}

.sidebar-profile-menu__item {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: var(--pg-text);
  font-family: var(--pg-font-body);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 400 !important;
}

.sidebar-profile-menu__item:hover {
  background: var(--pg-surface-hover);
  text-decoration: none;
  color: var(--pg-text);
}

.sidebar-profile-menu__item i {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  color: var(--pg-text-faint);
}

.sidebar-profile-menu__item span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.sidebar-profile-menu__item--danger {
  border-top: 1px solid var(--pg-border);
}

.sidebar-profile-menu__item--danger,
.sidebar-profile-menu__item--danger i {
  color: var(--pg-danger);
}

.sidebar-profile-menu__item--danger:hover {
  background: var(--pg-danger-soft);
  color: var(--pg-danger);
}

.sidebar-profile__info {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-profile__email {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  color: var(--pg-text-on-dark-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile__role {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pg-accent-on-dark);
}

.sidebar-profile__logout {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--pg-radius-sm);
  color: var(--pg-text-on-dark);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-profile__logout:hover {
  background: rgba(245, 0, 34, 0.14);
  color: var(--pg-danger);
  text-decoration: none;
}

.sidebar .sidebar-menu {
  padding: 16px 10px;
  overflow-y: auto;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
}

.sidebar-search-trigger {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: auto;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--pg-radius-sm);
  background: var(--pg-sidebar-hover);
  color: var(--pg-text-on-dark);
  font-family: var(--pg-font-body);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  font-size: 13px !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  font-weight: 400 !important;
}

.sidebar-search-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--pg-accent-border);
}

.sidebar-search-trigger i {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 20px;
  color: var(--pg-accent-on-dark);
  font-size: 12px;
  line-height: 1;
}

.sidebar-search-trigger span {
  line-height: 20px;
}

.sidebar-divider {
  height: 1px;
  margin: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-search-trigger kbd {
  margin-left: auto;
  font-size: 10.5px;
  font-family: var(--pg-font-mono);
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--pg-text-on-dark);
}

.main-container.sidebar-collapsed .sidebar-search-trigger {
  justify-content: center;
  padding: 8px 6px;
}

.main-container.sidebar-collapsed .sidebar-search-trigger span,
.main-container.sidebar-collapsed .sidebar-search-trigger kbd {
  display: none;
}

/* Command palette (Ctrl/Cmd+K) */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 14, 0.55);
  z-index: 200000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 14vh;
}

.cmdk-panel {
  width: 560px;
  max-width: calc(100vw - 48px);
  max-height: 60vh;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pg-modal-in 0.15s ease;
}

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pg-border);
  flex-shrink: 0;
}

.cmdk-input-row i {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 20px;
  color: var(--pg-text-faint);
  font-size: 14px;
  line-height: 1;
}

.cmdk-input-row input {
  flex: 1 1 auto;
  border: none !important;
  background: transparent !important;
  height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 20px !important;
  font-size: 15px;
  color: var(--pg-text);
}

.cmdk-input-row input:focus {
  outline: none;
  box-shadow: none !important;
}

.cmdk-hint {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--pg-text-faint);
  border: 1px solid var(--pg-border);
  border-radius: 4px;
  padding: 2px 6px;
}

.cmdk-list {
  overflow-y: auto;
  padding: 6px;
}

.cmdk-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--pg-text-muted);
  font-size: 13.5px;
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--pg-radius-sm);
  cursor: pointer;
  color: var(--pg-text);
  font-size: 14px;
  line-height: 1.3;
}

.cmdk-item i {
  color: var(--pg-text-faint);
  width: 16px;
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.cmdk-item.is-active {
  background: var(--pg-accent-soft);
}

.cmdk-item.is-active i {
  color: var(--pg-accent);
}

.cmdk-item__group {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--pg-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-group + .sidebar-group {
  margin-top: 6px;
}

.sidebar-group-label {
  padding: 12px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pg-text-on-dark);
  opacity: 0.45;
}

.sidebar-group:first-child .sidebar-group-label {
  padding-top: 2px;
}

.sidebar-menu .sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .sidebar-menu.sidebar-menu::-webkit-scrollbar-track {
  background-color: var(--pg-sidebar);
}

.sidebar .sidebar-menu.sidebar-menu::-webkit-scrollbar {
  width: 10px;
  background-color: var(--pg-sidebar);
}

.sidebar .sidebar-menu.sidebar-menu::-webkit-scrollbar-thumb {
  background-color: var(--pg-sidebar-hover);
}

.sidebar .sidebar-list-item {
  position: relative;
}

.sidebar .sidebar-menu .sidebar-list-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--pg-text-on-dark);
  margin: 2px 0;
  border-radius: var(--pg-radius-sm);
  border-left: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar .sidebar-menu .sidebar-list-item a:hover {
  background: var(--pg-sidebar-hover);
  text-decoration: none;
  color: var(--pg-text-on-dark-active);
}

.sidebar .sidebar-menu .sidebar-list-item a:focus-visible {
  outline: 2px solid var(--pg-accent-on-dark);
  outline-offset: -2px;
}

.sidebar .sidebar-menu .sidebar-list-item a.active {
  background: var(--pg-accent-on-dark);
  text-decoration: none;
  color: var(--pg-sidebar);
  font-weight: 700;
}

.sidebar .sidebar-menu .sidebar-list-item a.active i {
  color: var(--pg-sidebar);
}

.sidebar .sidebar-menu .sidebar-list-item a.active:hover {
  background: var(--pg-accent-on-dark);
  color: var(--pg-sidebar);
}

.sidebar .sidebar-menu .sidebar-list-item a i {
  width: 18px;
  flex-shrink: 0;
  font-size: 15px;
  text-align: center;
  color: var(--pg-text-on-dark);
  transition: color 0.15s ease;
}

@media (max-width: 750px) {
  .sidebar {
    width: 72px;
  }
  .sidebar .sidebar-header .logo-picture {
    display: none !important;
  }
  .sidebar .sidebar-menu {
    padding: 5px;
  }
  .sidebar .sidebar-menu .sidebar-list-item a {
    display: block;
    padding: 15px 25px 15px 25px;
    background: transparent;
    font-size: 16px;
    margin: 6px;
    border-radius: 8px;
  }
  .sidebar .sidebar-menu .sidebar-list-item a i {
    width: 0px;
  }
  .sidebar i {
    display: flex;
    justify-content: center;
    margin: 0 !important;
  }
  .sidebar span {
    display: none;
  }
  .sidebar .sidebar-footer a i {
    font-size: 18px;
  }
}
/* Manual sidebar collapse (toggled via SideNavBar, independent of the
   narrow-viewport auto-collapse above) */
.main-container.sidebar-collapsed {
  --pg-sidebar-w: var(--pg-sidebar-w-collapsed);
}

.main-container.sidebar-collapsed .sidebar-header .logo-wrap {
  visibility: hidden;
}

.main-container.sidebar-collapsed .sidebar-group-label {
  display: none;
}

.main-container.sidebar-collapsed .sidebar-menu .sidebar-list-item a {
  justify-content: center;
  padding: 10px 6px;
}

.main-container.sidebar-collapsed .sidebar-menu .sidebar-list-item a span {
  display: none;
}

.main-container.sidebar-collapsed .sidebar-profile__info {
  display: none;
}

.main-container.sidebar-collapsed .sidebar-profile {
  justify-content: center;
}

.modal {
  visibility: hidden;
  position: fixed;
  top: 0;
  left: 0;
  /* Must sit above the shell, not below it: the sidebar is 10000, its profile
     overlay 10001 and that overlay's menu 10002. At the old 1050 the dialog
     rendered *underneath* the navigation. Stays below the snackbars (100000)
     and the command palette (200000), which should cover a dialog. */
  z-index: 20000;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(10, 12, 14, 0.6);
}

/* Belt and braces on visibility: .show is a global utility, so anything else
   that ever claims that class name could break every dialog at once. The
   dialog states its own visibility with a selector that outranks it. */
.modal.show {
  visibility: visible !important;
  opacity: 1;
}

.modal.hide {
  visibility: hidden !important;
}

.modal .modal-dialog {
  transform: none;
  max-width: 540px;
  margin: 30px auto;
  position: relative;
  width: auto;
  /* none here so clicks on the surrounding area reach the backdrop; the
     content re-enables them below. Without that counterpart the whole
     dialog is inert — visible, but nothing can be clicked or typed. */
  pointer-events: none;
}

.modal .modal-dialog .modal-content {
  pointer-events: auto;
}

.modal .modal-dialog.modal-dialog-full {
  max-width: 90% !important;
  height: 100%;
}

.modal.show .modal-dialog {
  animation: pg-modal-in 0.18s ease;
}

@keyframes pg-modal-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .modal.show .modal-dialog {
    animation: none;
  }
}
.modal .modal-dialog .modal-content {
  color: var(--pg-text);
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  box-shadow: var(--pg-shadow-md);
  border-radius: var(--pg-radius);
  position: relative;
  display: flex;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  pointer-events: auto;
  max-height: calc(100vh - 60px);
}

.modal .modal-dialog .modal-content h1,
.modal .modal-dialog .modal-content h2,
.modal .modal-dialog .modal-content h3,
.modal .modal-dialog .modal-content h4,
.modal .modal-dialog .modal-content h5,
.modal .modal-dialog .modal-content h6 {
  color: var(--pg-text);
}

.modal .modal-dialog .modal-content p {
  color: var(--pg-text);
}

.modal .modal-dialog .modal-content label,
.modal .modal-dialog .modal-content legend {
  color: var(--pg-text-muted);
}

.modal .modal-dialog .modal-content .modal-body a,
.modal .modal-dialog .modal-content .modal-footer a {
  color: var(--pg-accent);
}

.modal .modal-dialog .modal-content .modal-body a:hover,
.modal .modal-dialog .modal-content .modal-footer a:hover {
  color: var(--pg-accent-strong);
}

.modal .modal-dialog .modal-content .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  margin: 0;
  border-bottom: 1px solid var(--pg-border);
  background: var(--pg-surface);
  flex-shrink: 0;
}

.modal .modal-dialog .modal-content .modal-header .modal-title {
  margin-bottom: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg-text);
}

.modal .modal-dialog .modal-content .modal-header > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--pg-text-faint);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.modal .modal-dialog .modal-content .modal-header > a:hover {
  background-color: var(--pg-surface-hover);
  color: var(--pg-text);
}

/* Reserved for confirmations with real cascading impact (deleting an
   account, a group with assigned members, a role in use) — a plain
   neutral header would understate what's actually at stake. */
.modal .modal-dialog .modal-content--danger .modal-header {
  background: var(--pg-danger-soft);
  border-bottom-color: rgba(245, 0, 34, 0.2);
}

.modal .modal-dialog .modal-content--danger .modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pg-danger);
}

.modal .modal-dialog .modal-content--danger .modal-header .modal-title i {
  color: var(--pg-danger);
}

.modal .modal-dialog .modal-content .modal-sub-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--pg-border);
}

.modal .modal-dialog .modal-content .modal-sub-header .left-buttons {
  display: flex;
  gap: 10px;
}

.modal .modal-dialog .modal-content .modal-sub-header .right-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal .modal-dialog .modal-content .modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 22px 24px;
  overflow-y: auto;
}

.modal .modal-dialog .modal-content .modal-body .modal-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pg-text-muted);
  margin-top: 26px;
  margin-bottom: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--pg-border);
}

.modal .modal-dialog .modal-content .modal-body .modal-subtitle:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.modal .modal-dialog .modal-content .modal-body .form-group {
  margin-bottom: 18px;
}

.modal .modal-dialog .modal-content .modal-body .form-group:last-child {
  margin-bottom: 0;
}

/* Feldbeschriftungen waren größer als der Feldinhalt selbst und standen mit
   viel Luft über dem Eingabefeld — das ließ jede Form unruhig wirken. Labels
   sind Beiwerk, der eingegebene Wert ist die Hauptsache. */
.modal .modal-dialog .modal-content .modal-body .form-group > label {
  margin-bottom: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
}

.modal .modal-dialog .modal-content .modal-body .form-group > input,
.modal .modal-dialog .modal-content .modal-body .form-group > select,
.modal .modal-dialog .modal-content .modal-body .form-group > .form-control {
  height: 36px;
  font-size: 1.4rem;
}

.modal .modal-dialog .modal-content .modal-body .form-group > textarea {
  font-size: 1.4rem;
}

.modal .modal-dialog .modal-content .modal-body .form-group.option label {
  margin-top: 0.6rem;
}

.modal .modal-dialog .modal-content .modal-body .form-group.option p {
  margin-bottom: 2rem;
}

.modal .modal-dialog .modal-content .modal-footer {
  margin: 0 !important;
  padding: 16px 24px;
  border-top: 1px solid var(--pg-border);
  background: var(--pg-surface-sunken);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-shrink: 0;
}

.modal .modal-dialog .modal-content .modal-footer input {
  margin: 0;
}

.modal .modal-dialog .modal-content .modal-footer a {
  margin-right: 0;
}

@media (max-width: 550px) {
  .modal-dialog {
    margin: 1.75rem !important;
  }
}
/* PgDialog additions — sizes, header description/status, help text, required
   marker, callout, unsaved-changes indicator, loading overlay, danger button.
   Sits on top of the .modal/.modal-dialog/.modal-content vocabulary above;
   does not replace it, so still-unmigrated hand-rolled modals keep working. */
.modal-dialog--sm {
  max-width: 420px !important;
}

.modal-dialog--full {
  max-width: 90% !important;
  height: 100%;
}

.modal .modal-dialog .modal-content .modal-header {
  gap: 12px;
}

.pg-modal-header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.pg-modal-description {
  margin-top: 2px;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--pg-text-muted);
}

.pg-modal-header-status {
  flex: 0 0 auto;
}

.pg-modal-unsaved-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--pg-danger);
  vertical-align: middle;
}

.pg-modal-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  z-index: 5;
}

:root[data-theme=dark] .pg-modal-loading-overlay {
  background: rgba(5, 10, 20, 0.6);
}

/* Schreibvorgang läuft: deckt den ganzen Dialog ab, also auch die Fußzeile.
   Mit einem Overlay nur über dem Body blieb der Speichern-Button erreichbar
   und ein zweiter Klick startete denselben Schreibvorgang erneut. */
.pg-modal-busy {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  cursor: progress;
}

:root[data-theme=dark] .pg-modal-busy {
  background: rgba(5, 10, 20, 0.72);
}

.pg-modal-busy__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  box-shadow: var(--pg-shadow-md);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pg-text);
}

.pg-modal-busy__card i {
  font-size: 1.6rem;
  color: var(--pg-accent);
}

/* Body-Inhalt eines Formulars während des Speicherns sperren: ein <fieldset>
   um den ganzen Body deaktiviert alle Eingaben in einem Rutsch, statt jedes
   Feld einzeln mit disabled="@IsSaving" zu markieren. Browser-Default-Styles
   des fieldset (Border, Innenabstand, min-width) werden zurückgesetzt, damit
   das Layout unverändert bleibt. */
.pg-fieldset-reset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Fußzeilen-Buttons mit Spinner: die Beschriftung wechselt auf „Speichern…",
   der Button ist derweil disabled. */
.modal .modal-dialog .modal-content .modal-footer button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pg-help-text {
  display: block;
  margin-top: 5px;
  font-size: 1.25rem;
  color: var(--pg-text-muted);
}

.pg-toggle-group-label {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pg-text-faint);
  margin: 14px 0 8px;
}

.pg-toggle-group-label:first-child {
  margin-top: 0;
}

.pg-required::after {
  content: " *";
  color: var(--pg-danger);
}

.pg-callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--pg-radius-sm);
  border: 1px solid var(--pg-border);
  background: var(--pg-surface-sunken);
  font-size: 1.35rem;
  color: var(--pg-text-muted);
}

.pg-callout i {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--pg-text-faint);
}

.pg-callout--info {
  border-color: var(--pg-accent-border);
  background: var(--pg-accent-soft);
}

.pg-callout--info i {
  color: var(--pg-accent);
}

.button.button-danger,
button.button-danger {
  color: #fff;
  background-color: var(--pg-danger);
  border-color: var(--pg-danger);
  font-weight: 700;
}

input[type=submit].button-danger, input[type=reset].button-danger, input[type=button].button-danger {
  color: #fff;
  background-color: var(--pg-danger);
  border-color: var(--pg-danger);
}

.button.button-danger:hover,
button.button-danger:hover,
input[type=submit].button-danger:hover, input[type=reset].button-danger:hover, input[type=button].button-danger:hover {
  background-color: var(--pg-danger-strong);
  border-color: var(--pg-danger-strong);
}

.button.button-danger:disabled,
button.button-danger:disabled,
input[type=submit].button-danger:disabled, input[type=reset].button-danger:disabled, input[type=button].button-danger:disabled {
  color: var(--pg-text-faint);
  background-color: var(--pg-surface-hover);
  border-color: var(--pg-border);
  cursor: not-allowed;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin-bottom: 1.5rem;
  vertical-align: middle;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--pg-surface-hover);
  border: 1px solid var(--pg-border-strong);
  -webkit-transition: 0.2s ease;
  transition: 0.2s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--pg-text);
  -webkit-transition: 0.2s ease;
  transition: 0.2s ease;
}

input:checked + .slider {
  background-color: var(--pg-accent);
  border-color: var(--pg-accent);
}

input:disabled + .slider {
  cursor: not-allowed;
  opacity: 0.5;
}

input:focus-visible + .slider {
  box-shadow: 0 0 0 2px var(--pg-accent-soft);
}

input:checked + .slider:before {
  background-color: var(--pg-text);
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
.alert {
  padding: 12px 16px;
  background-color: var(--pg-surface-hover);
  border: 1px solid var(--pg-border-strong);
  border-left: 3px solid var(--pg-accent);
  border-radius: var(--pg-radius-sm);
  margin: auto;
  margin-top: 18px;
  margin-bottom: 18px;
  max-height: 100%;
  color: var(--pg-text);
}

.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--pg-accent);
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}
th,
td {
  padding: 12px 14px;
  text-align: left;
}

th.subHeader,
td.subHeader {
  font-size: 1.5rem;
  color: var(--pg-accent-strong);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 14px;
  border-bottom: none !important;
  background: transparent !important;
}

th.subHeader.secondarySubHeader,
td.subHeader.secondarySubHeader {
  padding-top: 2rem;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

thead th {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--pg-text-muted);
  border-bottom: 2px solid var(--pg-border-strong);
  /* Kopfzeile braucht Luft nach oben: mit padding-top: 0 klebte die Überschrift
     direkt am Suchstreifen bzw. am Section-Header darüber. */
  padding-top: 14px;
  padding-bottom: 10px;
  background: transparent;
  vertical-align: bottom;
}

tbody tr {
  transition: background-color 0.1s ease;
}

tbody tr:hover td {
  background-color: var(--pg-surface-hover);
}

td {
  border: none;
  border-bottom: 1px solid var(--pg-border);
  padding: 12px 14px;
  background-color: transparent;
  vertical-align: middle;
}

td p {
  margin: 0;
}

td a.primary {
  margin: 0px 15px 0px 0px !important;
}

td a.secondary {
  margin: 0px 0px 0px 0px !important;
}

td .primary-icon {
  color: var(--pg-accent);
  float: right;
}

td .primary-single-icon {
  color: var(--pg-accent);
  font-size: 2.7rem;
  float: right;
  margin-right: 0.3rem;
}

td .primary-light-icon {
  color: var(--pg-warning);
  float: right;
}

td .primary-green-icon {
  color: var(--pg-success);
  float: right;
}

td .secondary-icon {
  color: var(--pg-danger);
  float: right;
  transition: color 0.15s ease;
}

td a.secondary:hover .secondary-icon {
  color: var(--pg-text);
}

td input {
  margin: 0 !important;
  height: 20px !important;
  width: 70px !important;
}

/* Custom */
html,
body {
  width: 100%;
  height: 100%;
  background: var(--pg-void);
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

.main-container {
  height: 100%;
  width: 100%;
}

.header-content {
  height: 56px;
  padding: 0 24px;
  overflow: hidden;
  font-size: 15px;
  line-height: 20px;
  cursor: default;
  z-index: 2;
  border-bottom: 1px solid var(--pg-border);
  display: flex;
  align-items: center;
  position: fixed;
  left: var(--pg-sidebar-w);
  width: calc(100% - var(--pg-sidebar-w));
  background: var(--pg-surface);
  transition: left 0.25s ease, width 0.25s ease;
}

.header-content i {
  margin-right: 14px;
  color: var(--pg-accent);
  font-size: 15px;
}

.header-content i.fa {
  color: var(--pg-accent);
}

.header-content span {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pg-text);
}

.content {
  width: calc(100% - var(--pg-sidebar-w));
  margin-left: var(--pg-sidebar-w);
  background: var(--pg-surface);
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: auto;
  transition: margin-left 0.25s ease, width 0.25s ease;
}

.content.content::-webkit-scrollbar-track {
  background-color: var(--pg-void);
}

.content.content::-webkit-scrollbar {
  width: 10px;
  background-color: var(--pg-void);
}

.content.content::-webkit-scrollbar-thumb {
  background-color: var(--pg-border-strong);
}

.content .sub-content {
  padding: 24px 28px 40px;
  min-width: 850px;
  margin-top: 56px;
  background: var(--pg-surface);
}

.content .sub-content .action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pg-border);
  /* Every .pg-page child gets the entry animation below, and an animated
     element is its own stacking context — so a dropdown opened inside the
     action bar cannot escape above the KPI cards / section card that follow
     it in the DOM, no matter how high its own z-index is. Raising the whole
     action bar's context is what actually lifts the menu over them. */
  position: relative;
  z-index: 5;
}

.content .sub-content .action-bar h3 {
  margin-bottom: 0;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--pg-text);
  letter-spacing: 0.01em;
}

.content .sub-content .action-bar .state {
  border: 1px solid var(--pg-border-strong);
  border-radius: var(--pg-radius-sm);
  padding: 7px;
  width: 100px;
  text-align: center;
  font-family: var(--pg-font-mono);
  font-size: 1.2rem;
}

@media (max-width: 750px) {
  .content {
    width: calc(100% - 72px);
    margin-left: 72px;
  }
}
.login-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.login-form-container {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.login-form-container form {
  width: 450px;
  padding: 40px;
  color: var(--pg-text-on-dark);
  background: var(--pg-sidebar);
  border: 1px solid var(--pg-border-strong);
  box-shadow: var(--pg-shadow-md);
  border-radius: var(--pg-radius);
}

.login-form-container form h1,
.login-form-container form h2,
.login-form-container form h3,
.login-form-container form h4,
.login-form-container form h5,
.login-form-container form h6 {
  color: var(--pg-text-on-dark-active);
}

.login-form-container form label {
  color: var(--pg-text-on-dark);
}

.login-form-container form a {
  color: var(--pg-accent-on-dark);
}

.login-form-container form a:hover {
  color: var(--pg-text-on-dark-active);
}

.login-form-container p {
  margin: 0;
  padding: 0;
  color: var(--pg-text-on-dark);
}

.login-footer-container {
  align-self: center;
  height: 40px;
  display: flex;
  align-items: flex-end;
  width: 100%;
  flex: 1 1 1;
}

.login-footer-container p {
  margin: 5px !important;
  padding: 0 !important;
}

.login-form-picture {
  width: 17rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2em;
  margin-top: 1rem;
}

@media (max-width: 550px) {
  .login-form-container form {
    width: 100%;
    height: 100%;
  }
}
.add-button {
  position: fixed;
  bottom: 0;
  right: 0;
  margin: 20px;
  z-index: 3;
}

.user-webzugang {
  color: var(--pg-accent);
  padding-left: 0.5em;
}

.file-row {
  background-color: var(--pg-surface-hover);
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  border-radius: var(--pg-radius);
  border: 1px solid var(--pg-border);
  color: var(--pg-text-muted);
  display: flex;
  align-items: center;
}

.file-row h2 {
  margin: 0.3rem 0 0.6rem 0;
  font-weight: bold;
  color: var(--pg-text);
  font-size: 1.1rem;
}

.file-row > div {
  flex-grow: 1;
}

.file-row button {
  padding: 0.5rem 1rem;
}

.drag-drop-zone {
  border: 2px dashed var(--pg-border-strong);
  border-radius: var(--pg-radius);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--pg-surface-sunken);
  color: var(--pg-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  margin: 1.5rem 0 2rem 0;
  position: relative;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.drag-drop-zone:hover {
  color: var(--pg-text);
  border-color: var(--pg-accent);
}

.drag-drop-zone input[type=file] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drag-drop-zone input[type=file]:disabled {
  color: var(--pg-text) !important;
  cursor: not-allowed;
}

pre {
  background-color: var(--pg-surface-sunken);
  color: var(--pg-text);
  overflow: auto;
  padding: 1rem;
  height: 10rem;
}

.alert {
  padding: 1rem;
  border-radius: var(--pg-radius);
  margin-bottom: 1rem;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-color: #dc3545;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border-color: #28a745;
}

.button-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.button-wrapper input[type=submit] {
  flex: 1;
}

.spinner-small {
  display: inline-block;
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.pg-page {
  font-size: 1.4rem;
  color: var(--pg-text);
}

.pg-page .badge-green, .pg-page .badge-blue, .pg-page .badge-grey, .pg-page .badge-red, .pg-page .badge-orange {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pg-page .badge-green {
  color: var(--pg-on-accent);
  background: var(--pg-success);
}

.pg-page .badge-blue {
  color: var(--pg-on-accent);
  background: var(--pg-accent);
}

.pg-page .badge-grey {
  color: var(--pg-text);
  background: var(--pg-border);
}

.pg-page .badge-red {
  color: var(--pg-on-accent);
  background: var(--pg-danger);
}

.pg-page .badge-orange {
  color: var(--pg-text);
  background: var(--pg-warning);
}

.pg-page .fu-section {
  margin-top: 20px;
  border-radius: var(--pg-radius);
  background: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
  overflow: hidden;
}

.pg-page .fu-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pg-text-muted);
  border-bottom: 1px solid var(--pg-border);
  background: rgba(1, 22, 56, 0.04);
}

.pg-page .fu-section-header i {
  color: var(--pg-accent);
  font-size: 1.5rem;
}

.pg-page .fu-section-header .fu-section-header__meta {
  margin-left: auto;
  font-weight: 500;
  font-size: 1.3rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--pg-text);
}

.pg-page .fu-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 20px;
  padding: 38px 24px;
  border: 2px dashed var(--pg-border-strong);
  border-radius: var(--pg-radius);
  background: var(--pg-surface-sunken);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  text-align: center;
}

.pg-page .fu-dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.pg-page .fu-dropzone:hover:not(.fu-dropzone--disabled) {
  border-color: var(--pg-accent);
  background: var(--pg-accent-soft);
}

.pg-page .fu-dropzone--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pg-page .fu-dropzone__icon {
  font-size: 3.2rem;
  color: var(--pg-accent);
}

.pg-page .fu-dropzone__label {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pg-text);
}

.pg-page .fu-dropzone__hint {
  font-size: 1.25rem;
  color: var(--pg-text-muted);
}

.pg-page .fu-file-list {
  margin: 0 20px;
  border-radius: var(--pg-radius);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--pg-border);
}

.pg-page .fu-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 1.4rem;
}

.pg-page .fu-table th {
  padding: 14px 14px 9px;
  background: rgba(1, 22, 56, 0.05);
  color: var(--pg-text-muted);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--pg-border);
  text-align: left;
}

.pg-page .fu-table td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--pg-border);
  vertical-align: middle;
  color: var(--pg-text);
  background: transparent;
  font-size: 1.4rem;
}

.pg-page .fu-table tr:last-child td {
  border-bottom: none;
}

.pg-page .fu-table tr:hover td {
  background: var(--pg-surface-hover);
}

.pg-page .fu-table th:nth-child(1), .pg-page .fu-table td:nth-child(1) {
  width: auto;
}

.pg-page .fu-table th:nth-child(2), .pg-page .fu-table td:nth-child(2) {
  width: 150px;
}

.pg-page .fu-table th:nth-child(3), .pg-page .fu-table td:nth-child(3) {
  width: 90px;
  text-align: right;
}

.pg-page .fu-td-filename {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.pg-page .fu-file-icon {
  color: var(--pg-accent);
  flex-shrink: 0;
  font-size: 1.3rem;
}

.pg-page .fu-td-size {
  color: var(--pg-text-muted);
  white-space: nowrap;
  text-align: right;
}

.pg-page .fu-table .fu-select {
  height: 28px !important;
  margin: 0;
  padding: 0 0px !important;
  font-size: 1.3rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: var(--pg-radius-sm) !important;
  background: var(--pg-surface-sunken) !important;
  color: var(--pg-text) !important;
  border: 1px solid var(--pg-border) !important;
  cursor: pointer;
  line-height: 28px !important;
}

.pg-page .fu-options-bar {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--pg-border);
  background: rgba(0, 0, 0, 0.12);
}

.pg-page .fu-opt-sep {
  width: 1px;
  background: var(--pg-border);
  flex-shrink: 0;
}

.pg-page .fu-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  padding: 14px 20px;
}

.pg-page .fu-opt__icon {
  font-size: 1.8rem;
  color: var(--pg-accent);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.pg-page .fu-opt__label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pg-page .fu-opt__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pg-text);
  white-space: nowrap;
}

.pg-page .fu-opt__desc {
  font-size: 1.15rem;
  color: var(--pg-text-muted);
  white-space: nowrap;
}

.pg-page .fu-opt__switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: inherit;
}

.pg-page .fu-opt__switch input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pg-page .fu-opt__switch input[type=checkbox]:checked ~ .fu-opt__slider {
  background: var(--pg-accent);
  border-color: var(--pg-accent);
}

.pg-page .fu-opt__switch input[type=checkbox]:checked ~ .fu-opt__slider::after {
  transform: translateX(20px);
  background: var(--pg-text);
}

.pg-page .fu-opt__slider {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 11px;
  background: var(--pg-surface-hover);
  border: 1px solid var(--pg-border-strong);
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}

.pg-page .fu-opt__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pg-text);
  transition: transform 0.2s, background 0.2s;
}

.pg-page .fu-opt__state {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--pg-text-muted);
  min-width: 32px;
}

.pg-page .fu-opt__num {
  width: 68px !important;
  height: 34px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  border-radius: var(--pg-radius-sm) !important;
  background: var(--pg-surface-sunken) !important;
  color: var(--pg-text) !important;
  border: 1px solid var(--pg-border) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  flex-shrink: 0;
}

.pg-page .fu-opt__num:focus {
  outline: none !important;
  border-color: var(--pg-accent) !important;
  box-shadow: 0 0 0 2px var(--pg-accent-soft) !important;
}

.pg-page .fu-opt__num::-webkit-inner-spin-button, .pg-page .fu-opt__num::-webkit-outer-spin-button {
  opacity: 0.4;
}

.pg-page .fu-add-row {
  padding: 12px 20px 14px;
  border-top: 1px solid var(--pg-border);
  background: rgba(0, 0, 0, 0.06);
}

.pg-page .fu-section > .pg-alert {
  margin: 0 20px 16px;
}

.pg-page .fu-enqueue-progress {
  margin: 10px 20px 14px;
  padding: 12px 16px;
  border: 1px solid var(--pg-accent-border);
  border-radius: var(--pg-radius-sm);
  background: var(--pg-accent-soft);
}

.pg-page .fu-enqueue-progress__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
  color: var(--pg-text);
  margin-bottom: 10px;
}

.pg-page .fu-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
}

.pg-page .fu-action-bar__left, .pg-page .fu-action-bar__right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pg-page .fu-busy-bar {
  margin: 0 20px 12px;
  padding: 10px 16px;
  border-radius: var(--pg-radius-sm);
  background: var(--pg-accent-soft);
  border: 1px solid var(--pg-accent-border);
  font-size: 1.3rem;
  color: var(--pg-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pg-page .fu-busy-bar i {
  color: var(--pg-accent-strong);
}

.pg-page .fu-progress {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  overflow: hidden;
}

.pg-page .fu-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pg-accent) 0%, var(--pg-accent-strong) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  min-width: 3px;
}

.pg-page .fu-progress--total {
  margin: 0 20px 12px;
  height: 6px;
}

.pg-page .fu-progress--job {
  margin: 0 20px 10px;
  height: 4px;
}

.pg-page .fu-progress--file {
  flex: 1;
  height: 4px;
}

.pg-page .fu-job-list {
  display: flex;
  flex-direction: column;
}

.pg-page .fu-job-card {
  border-top: 1px solid rgba(0, 0, 0, 0.3);
}

.pg-page .fu-job-card:first-child {
  border-top: none;
}

.pg-page .fu-job-card--running .fu-job-card__header {
  background: var(--pg-accent-soft);
}

.pg-page .fu-job-card--completed .fu-job-card__header {
  background: var(--pg-success-soft);
}

.pg-page .fu-job-card--failed .fu-job-card__header {
  background: var(--pg-danger-soft);
}

.pg-page .fu-job-card--canceled .fu-job-card__header {
  background: rgba(0, 0, 0, 0.1);
}

.pg-page .fu-job-card--pending .fu-job-card__header {
  background: rgba(0, 0, 0, 0.06);
}

.pg-page .fu-job-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  flex-wrap: wrap;
}

/* Extra per-job content (preflight facts, confirmation, alerts, live log) needs
   the same 20px inset as the header - without this wrapper it sits flush
   against the card edges instead of reading as part of the same card. */
.pg-page .fu-job-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 20px;
}

.pg-page .fu-job-card__body .pg-alert {
  margin-bottom: 0;
}

.pg-page .fu-job-card__body .fu-log {
  margin: 0;
}

.pg-page .fu-job-card__id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-family: var(--pg-font-mono);
  color: var(--pg-text-muted);
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.pg-page .fu-job-card__id i {
  color: var(--pg-accent-strong);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.pg-page .fu-job-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.pg-page .fu-meta-text {
  font-size: 1.2rem;
  color: var(--pg-text-muted);
}

.pg-page .fu-job-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pg-page .fu-file-sublist {
  padding: 8px 20px 12px 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.08);
}

.pg-page .fu-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  flex-wrap: nowrap;
}

.pg-page .fu-file-row__name {
  flex: 1;
  min-width: 0;
  color: var(--pg-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-page .fu-file-row__name i {
  color: var(--pg-text-muted);
  margin-right: 5px;
  font-size: 1.1rem;
}

.pg-page .fu-file-row__type {
  width: 70px;
  color: var(--pg-text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pg-page .fu-file-row__records {
  width: 100px;
  text-align: right;
  color: var(--pg-text-muted);
  font-size: 1.1rem;
  font-family: var(--pg-font-mono);
  flex-shrink: 0;
}

.pg-page .fu-file-row__retry {
  color: var(--pg-warning);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pg-page .fu-file-row__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
  flex-shrink: 0;
}

.pg-page .fu-file-row__pct {
  font-size: 1.1rem;
  color: var(--pg-text-muted);
  font-family: var(--pg-font-mono);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.pg-page .fu-file-error {
  font-size: 1.2rem;
  color: var(--pg-danger);
  padding: 3px 0 3px 20px;
}

.pg-page .fu-file-error i {
  margin-right: 5px;
}

.pg-page .fu-text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-page .fu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  height: 38px;
  border: none !important;
  outline: none !important;
  border-radius: 3px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(4, 4, 5, 0.2), 0 1.5px 0 rgba(6, 6, 7, 0.05), 0 2px 0 rgba(4, 4, 5, 0.05);
  background-image: none !important;
}

.pg-page .fu-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.pg-page .fu-btn-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 1.15rem;
  box-shadow: none;
}

.pg-page .fu-btn-primary {
  color: var(--pg-on-accent);
  background: var(--pg-accent);
}

.pg-page .fu-btn-primary:hover:not(:disabled) {
  background: var(--pg-accent-strong);
}

.pg-page .fu-btn-warning {
  color: var(--pg-text);
  background: var(--pg-warning);
}

.pg-page .fu-btn-warning:hover:not(:disabled) {
  background: #c68f38;
}

.pg-page .fu-btn-danger {
  color: var(--pg-on-accent);
  background: var(--pg-danger);
}

.pg-page .fu-btn-danger:hover:not(:disabled) {
  background: #c2001c;
}

.pg-page .fu-btn-ghost {
  color: var(--pg-text-muted);
  background: var(--pg-surface-hover);
  border: 1px solid var(--pg-border-strong) !important;
  box-shadow: none;
}

.pg-page .fu-btn-ghost:hover:not(:disabled) {
  background: var(--pg-border-strong);
  color: var(--pg-text);
}

.pg-page .fu-log {
  display: block;
  width: 100%;
  min-height: 340px;
  max-height: 340px;
  font-family: var(--pg-font-mono);
  font-size: 1.25rem;
  line-height: 1.65;
  padding: 14px 16px;
  box-sizing: border-box;
  resize: none;
  overflow: auto;
  border: none;
  border-top: 1px solid var(--pg-border);
  border-radius: 0;
  background: var(--pg-surface-sunken);
  color: var(--pg-text-muted);
}

.mud-list-item-text {
  text-transform: uppercase !important;
}

.mud-list-item-text p {
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 10px !important;
  letter-spacing: 0.1rem !important;
}

.mud-expand-panel .mud-expand-panel-header {
  font-size: 2rem !important;
  color: var(--pg-accent-strong);
  font-weight: 100;
}

.button-email {
  color: var(--pg-accent-strong);
  cursor: pointer;
}

.permission-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  flex-direction: row;
}

.permission-image {
  width: 40vw;
  padding: 2em;
  max-width: 420px;
}

.permission-content {
  padding: 2em;
  display: flex;
  flex-direction: column;
  width: 615px;
}

.title-text {
  font-weight: bold;
  line-height: 1.3em;
}

.subtitle-text {
  color: var(--pg-text-muted);
  line-height: 1.5em;
}

.logout-text {
  color: var(--pg-accent-strong);
}

@media (max-width: 550px) {
  .permission-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    flex-direction: column;
    margin-bottom: 6em;
  }
  .permission-image {
    margin-top: 6em;
    width: 80vw;
    padding: 0.5em;
  }
  .permission-content {
    padding: 0.5em 0.5em 1.5em 0.5em;
    display: flex;
    flex-direction: column;
    width: 90vw;
  }
}
/* Spinner utility — put on the icon inside a normal button while an action
   runs. Replaces the round accent "refresh" pill, which read as a floating
   FAB dropped into an action bar full of bordered text buttons. */
.pg-spin {
  animation: spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .pg-spin {
    animation: none;
  }
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* Chart grid for dashboard — fixed 2-column layout (2 rows of 2) */
.pg-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .pg-charts-grid {
    grid-template-columns: 1fr;
  }
}
.pg-charts-grid .fu-section {
  display: flex;
  flex-direction: column;
}

/* Permissions matrix table — compact rows with sticky left column for role names. */
.pg-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.35rem;
}

.pg-matrix-table thead th {
  padding: 12px 4px;
  text-align: center;
  border-bottom: 2px solid var(--pg-border);
  background: var(--pg-surface-sunken);
  font-weight: 600;
  color: var(--pg-text);
  height: 120px;
}

.pg-matrix-table tbody tr {
  border-bottom: 1px solid var(--pg-border);
}

.pg-matrix-table tbody tr:hover {
  background: var(--pg-surface-sunken);
}

.pg-matrix-table tbody td {
  padding: 8px 4px;
  text-align: center;
  vertical-align: middle;
}

.pg-matrix-table tbody td:first-child {
  padding: 8px 12px;
  text-align: left;
}

.pg-matrix-table i {
  font-size: 1.45rem;
}

/* ── Dropdown menu ──────────────────────────────────────────────────────────
   Split-button menu (e.g. "neuer Benutzer" → erstellen / einladen). Lives in
   the action bar, which raises its own stacking context so the menu is drawn
   over the KPI cards and section card below it. A transparent backdrop
   catches the next click anywhere on the page and closes the menu. */
.pg-dropdown {
  position: relative;
  display: inline-block;
}

.pg-dropdown__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: transparent;
  border: none;
  padding: 0;
  cursor: default;
}

.pg-dropdown__toggle i {
  margin-left: 8px;
  font-size: 1rem;
  transition: transform 0.15s ease;
}

.pg-dropdown__toggle--open i {
  transform: rotate(180deg);
}

.pg-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 2;
  min-width: 220px;
  padding: 6px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow-md);
  animation: pg-dropdown-in 0.12s ease;
}

@keyframes pg-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pg-dropdown__menu {
    animation: none;
  }
}
.pg-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  padding: 9px 10px;
  border: none;
  border-radius: var(--pg-radius-sm);
  background: transparent;
  color: var(--pg-text);
  font-size: 1.35rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left;
  cursor: pointer;
}

.pg-dropdown__item i {
  width: 16px;
  flex: 0 0 16px;
  color: var(--pg-accent);
  font-size: 1.3rem;
  text-align: center;
}

.pg-dropdown__item:hover {
  background: var(--pg-accent-soft);
  border-color: transparent;
  color: var(--pg-text);
}

.pg-dropdown__item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pg-dropdown__item-hint {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--pg-text-muted);
  white-space: normal;
}

/* ── Status cards ───────────────────────────────────────────────────────────
   Label-over-value tiles with a leading icon, for a handful of read-only
   status facts (sync state) that deserve more weight than a settings list
   but carry no number to plot like a KPI card does. */
.pg-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.pg-status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
}

.pg-status-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: var(--pg-radius-sm);
  background: var(--pg-accent-soft);
  color: var(--pg-accent);
  font-size: 1.4rem;
}

.pg-status-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pg-status-card__label {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pg-text-muted);
}

.pg-status-card__value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pg-text);
  overflow-wrap: anywhere;
}

.pg-status-card__hint {
  font-size: 1.15rem;
  color: var(--pg-text-faint);
}

.pg-status-card--offline .pg-status-card__icon {
  background: var(--pg-danger-soft);
  color: var(--pg-danger);
}

.pg-status-card--online .pg-status-card__icon {
  background: var(--pg-success-soft);
  color: var(--pg-success);
}

/* ── Structured skeletons ───────────────────────────────────────────────────
   Mirror the real page (action bar → optional KPI row → section card with
   toolbar strip and table rows) instead of one grey rectangle, so the layout
   does not jump when the data lands. */
.pg-skeleton-fill {
  display: block;
  width: 100%;
  max-width: none;
}

.pg-skeleton-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pg-border);
}

.pg-skeleton-actionbar__title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-skeleton-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--pg-border);
}

.pg-skeleton-rows__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--pg-border);
}

.pg-skeleton-rows__row:last-child {
  border-bottom: none;
}

.pg-skeleton-rows__cell {
  flex: 1 1 0;
  min-width: 0;
}

.pg-skeleton-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 20px;
}

.pg-skeleton-form__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

@media (max-width: 640px) {
  .pg-skeleton-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ── Log message ────────────────────────────────────────────────────────────
   A log message is the whole point of the log, so it is never truncated:
   the cell wraps it (clamped to a few lines so one stack trace cannot own
   the table), and the row opens the full, selectable text in a dialog. */
.pg-log-row {
  cursor: pointer;
}

.pg-log-message {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.45;
}

.pg-log-detail {
  margin: 0;
  padding: 14px 16px;
  max-height: 46vh;
  overflow: auto;
  background: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  font-family: var(--pg-font-mono);
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--pg-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.pg-log-level--error {
  color: var(--pg-danger);
  font-weight: 600;
}

.pg-log-level--warning {
  color: var(--pg-warning);
  font-weight: 600;
}

.pg-log-level--default {
  color: var(--pg-text-muted);
}

/* ── Multi-select picker ────────────────────────────────────────────────────
   Auswahlliste in Dialogen (Benutzer einer Gruppe). Ersetzt inline gestylte
   Divs mit hartkodierten Farben, die im Dark Mode weiß blieben. */
.pg-picker {
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  overflow: hidden;
}

.pg-picker__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--pg-surface-sunken);
  border-bottom: 1px solid var(--pg-border);
}

.pg-picker__search {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pg-picker__search:focus-within {
  border-color: var(--pg-accent);
  box-shadow: 0 0 0 3px var(--pg-accent-soft);
}

.pg-picker__search-icon {
  color: var(--pg-text-faint);
  font-size: 1.2rem;
  pointer-events: none;
}

.pg-picker__search input {
  flex: 1 1 auto;
  min-width: 0;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1.35rem !important;
  line-height: 1.4 !important;
  color: var(--pg-text);
}

.pg-picker__search input:focus {
  outline: none;
  box-shadow: none !important;
}

.pg-picker__toolbar-actions {
  display: flex;
  gap: 6px;
}

.pg-picker__action {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius-sm);
  background: var(--pg-surface);
  color: var(--pg-text-muted);
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  line-height: 30px !important;
  letter-spacing: 0.05em !important;
  cursor: pointer;
}

.pg-picker__action:hover:not(:disabled) {
  border-color: var(--pg-accent);
  color: var(--pg-accent);
}

.pg-picker__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pg-picker__list {
  max-height: 320px;
  overflow-y: auto;
}

.pg-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pg-border);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.pg-picker__option:last-child {
  border-bottom: none;
}

.pg-picker__option:hover {
  background: var(--pg-surface-hover);
}

.pg-picker__option--selected {
  background: var(--pg-accent-soft);
}

.pg-picker__option input[type=checkbox] {
  flex: 0 0 auto;
  margin: 0;
}

.pg-picker__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pg-accent-soft);
  color: var(--pg-accent-strong);
  font-size: 1.15rem;
  font-weight: 700;
}

.pg-picker__option-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pg-picker__option-title {
  font-size: 1.35rem;
  color: var(--pg-text);
  overflow-wrap: anywhere;
}

.pg-picker__option-hint {
  font-size: 1.15rem;
  color: var(--pg-text-muted);
}

.pg-picker__check {
  margin-left: auto;
  color: var(--pg-accent);
  font-size: 1.2rem;
}

.pg-picker__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  color: var(--pg-text-muted);
  font-size: 1.3rem;
}

.pg-picker__empty i {
  color: var(--pg-text-faint);
  font-size: 1.8rem;
}

.pg-picker__footer {
  padding: 9px 12px;
  background: var(--pg-surface-sunken);
  border-top: 1px solid var(--pg-border);
}

.pg-picker__footer-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.2rem;
  color: var(--pg-text-muted);
}

.pg-picker__footer-hint i {
  color: var(--pg-accent);
}

/* Abstand zwischen Feldraster und Schalterraster innerhalb eines
   Dialog-Abschnitts — vorher 3× als inline style="margin-top: 10px|14px"
   gesetzt, mit drei leicht verschiedenen Werten. */
.modal .modal-dialog .modal-content .modal-body .pg-field-grid + .pg-toggle-grid,
.modal .modal-dialog .modal-content .modal-body .pg-toggle-grid + .pg-field-grid,
.modal .modal-dialog .modal-content .modal-body .form-group + .pg-toggle-grid {
  margin-top: 12px;
}

/* ==========================================================================
   Rechte-Dialog (UserPermissionModal)

   45 Rechte in einem Dialog: die alte Darstellung war eine flache Folge aus
   <label> + Fließtext + Schalter, in der man weder sah, wie viele Rechte eine
   Gruppe hat, noch welche davon erteilt sind. Jetzt: Gruppenkarten mit Zähler,
   ein- und ausklappbar, Zeilen als eigene Trefferflächen, Suche und Filter im
   Subheader.
   ========================================================================== */
/* Die Tabellen-Toolbar dient hier als Suchleiste im Dialog-Subheader — dessen
   Polsterung und Trennlinie übernehmen den Rahmen, die Toolbar wird flächig. */
.modal .modal-dialog .modal-content .modal-sub-header .pg-table-toolbar {
  width: 100%;
  padding: 0;
  border-bottom: 0;
}

.modal .modal-dialog .modal-content .modal-sub-header .pg-table-toolbar .pg-segmented {
  height: 34px;
}

/* Zähler im Dialogkopf: „12 von 45 aktiv" — die Kennzahl, die vorher nur durch
   Abzählen aller Schalter zu bekommen war. */
.pg-perm-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--pg-border);
  border-radius: 999px;
  background: var(--pg-surface-sunken);
  font-size: 1.2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pg-text-muted);
  white-space: nowrap;
}

.pg-perm-summary i {
  font-size: 1.1rem;
  color: var(--pg-text-faint);
}

.pg-perm-summary--on {
  border-color: var(--pg-accent-border);
  background: var(--pg-accent-soft);
  color: var(--pg-accent-strong);
}

.pg-perm-summary--on i {
  color: var(--pg-accent);
}

.pg-perm-group {
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  overflow: hidden;
}

.pg-perm-group + .pg-perm-group {
  margin-top: 14px;
}

.pg-perm-group__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  background: var(--pg-surface-sunken);
  border-bottom: 1px solid var(--pg-border);
}

.pg-perm-group__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--pg-text);
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  line-height: 1.3 !important;
  text-align: left;
  text-transform: none !important;
  cursor: pointer;
}

.pg-perm-group__toggle:hover {
  background: var(--pg-surface-hover);
  color: var(--pg-text);
}

.pg-perm-group__chevron {
  flex: 0 0 auto;
  width: 11px;
  font-size: 11px;
  color: var(--pg-text-faint);
  transition: transform 0.2s ease;
}

.pg-perm-group__chevron.is-collapsed {
  transform: rotate(-90deg);
}

.pg-perm-group__icon {
  flex: 0 0 auto;
  width: 16px;
  font-size: 13px;
  color: var(--pg-accent);
}

.pg-perm-group__title {
  flex: 1 1 auto;
  min-width: 0;
}

.pg-perm-group__count {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pg-text-faint);
}

.pg-perm-group__count.is-on {
  border-color: var(--pg-accent-border);
  background: var(--pg-accent-soft);
  color: var(--pg-accent-strong);
}

.pg-perm-group__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

/* Kleine Textschaltfläche für Gruppenaktionen („Alle" / „Keine") — bewusst
   leiser als ein Button, damit sie nicht mit dem Speichern konkurriert. */
.pg-chip-btn {
  height: 26px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--pg-border);
  border-radius: 999px;
  background: var(--pg-surface);
  color: var(--pg-text-muted);
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  line-height: 24px !important;
  text-transform: none !important;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.pg-chip-btn:hover {
  border-color: var(--pg-accent-border);
  background: var(--pg-accent-soft);
  color: var(--pg-accent-strong);
}

.pg-perm-group__body {
  padding: 6px 16px 16px;
}

.pg-perm-section + .pg-perm-section {
  margin-top: 14px;
}

.pg-perm-section__label {
  margin: 10px 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pg-text-faint);
}

/* Eine Zeile = eine Trefferfläche: der ganze Streifen schaltet, nicht nur der
   Schalter am rechten Rand. */
.pg-perm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--pg-radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pg-perm-row:hover {
  background: var(--pg-surface-hover);
}

.pg-perm-row.is-on {
  border-color: var(--pg-accent-border);
  background: var(--pg-accent-soft);
}

.pg-perm-row.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
}

.pg-perm-row__text {
  flex: 1 1 auto;
  min-width: 0;
}

.pg-perm-row__label {
  font-size: 1.35rem;
  color: var(--pg-text);
  line-height: 1.35;
}

.pg-perm-row.is-on .pg-perm-row__label {
  font-weight: 600;
}

.pg-perm-row__hint {
  margin-top: 2px;
  font-size: 1.2rem;
  color: var(--pg-text-muted);
  line-height: 1.35;
}

.pg-perm-row__hint--warn {
  color: var(--pg-warning);
}

.pg-perm-row .switch {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.pg-perm-footer-note {
  margin-right: auto;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--pg-text-muted);
}

/* Modul-Karten im Rechte-Dialog: gesperrt heißt sichtbar, aber nicht
   bedienbar — ausblenden würde verschweigen, dass das Recht existiert. */
.pg-toggle-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pg-steps {
  display: flex;
  align-items: center;
  margin: 2px 0 22px;
}

.pg-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.pg-step__dot {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--pg-surface-sunken);
  border: 1px solid var(--pg-border);
  color: var(--pg-text-faint);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pg-step__label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pg-text-faint);
  white-space: nowrap;
}

.pg-step__line {
  flex: 1 1 auto;
  min-width: 20px;
  height: 1px;
  margin: 0 14px;
  background: var(--pg-border);
}

.pg-step--active .pg-step__dot {
  background: var(--pg-accent);
  border-color: var(--pg-accent);
  color: var(--pg-on-accent);
}

.pg-step--active .pg-step__label {
  color: var(--pg-text);
}

.pg-step--done .pg-step__dot {
  background: var(--pg-success-soft);
  border-color: var(--pg-success);
  color: var(--pg-success);
}

.pg-step--done .pg-step__label {
  color: var(--pg-text-muted);
}

@media (max-width: 640px) {
  .pg-step__label {
    display: none;
  }
}
.pg-step-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
}

.pg-step-panel__title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--pg-text);
}

.pg-step-panel__desc {
  margin-top: 4px;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--pg-text-muted);
}

.pg-step-wait {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: var(--pg-surface-sunken);
}

.pg-step-wait i {
  font-size: 1.8rem;
  color: var(--pg-accent);
}

.pg-step-wait__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pg-step-wait__title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pg-text);
}

.pg-step-wait__hint {
  font-size: 1.25rem;
  color: var(--pg-text-muted);
}

.pg-result {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--pg-border);
  border-left-width: 3px;
  border-radius: var(--pg-radius);
  background: var(--pg-surface-sunken);
}

.pg-result__icon {
  flex: 0 0 auto;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--pg-text-faint);
}

.pg-result__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.pg-result__title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--pg-text);
}

.pg-result__text {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--pg-text-muted);
}

.pg-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.pg-result--success {
  border-left-color: var(--pg-success);
}

.pg-result--success .pg-result__icon {
  color: var(--pg-success);
}

.pg-result--danger {
  border-left-color: var(--pg-danger);
}

.pg-result--danger .pg-result__icon {
  color: var(--pg-danger);
}

.pg-result--warning {
  border-left-color: var(--pg-warning);
}

.pg-result--warning .pg-result__icon {
  color: var(--pg-warning);
}

.pg-confirm-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--pg-danger);
  border-radius: var(--pg-radius);
  background: var(--pg-danger-soft);
}

.pg-confirm-box__label {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--pg-text);
}

.pg-confirm-box__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pg-confirm-box__row input[type=text] {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
  font-family: var(--pg-font-mono);
}
