/**
 * ==============================================================================
 * DragondarnDE - PWA App-Wide Layout Adaptation (Desktop & Mobile)
 * ==============================================================================
 * Passt alle Seiten außerhalb der Mediathek – inklusive Startseite, News,
 * Mein Konto, Kontakt, Rechtliches, 404, Wartungsmodus & Admin Dashboard –
 * im installierten PWA-App-Modus (html.pwa-standalone) gezielt an Desktop-
 * und Mobilgeräte an. Im regulären Webbrowser bleibt alles unverändert.
 * ==============================================================================
 */

/* ------------------------------------------------------------------------------
   0. STANDARD-BROWSER-MODUS: App-Shell-Elemente komplett ausblenden
   ------------------------------------------------------------------------------ */
.pwa-site-sidebar,
.pwa-site-topbar,
.pwa-site-mobile-header,
.pwa-home-mobile-pills,
.pwa-site-microfooter,
.pwa-admin-mobile-header,
.pwa-admin-mobile-quicktabs,
.pwa-admin-sidebar-brand,
.pwa-admin-sidebar-collapse-btn,
.pwa-admin-topbar-nav,
.pwa-admin-sidebar-app-actions,
.pwa-admin-microfooter,
.pwa-admin-bottom-nav,
.pwa-maint-app-bar {
  display: none;
}

.pwa-site-viewport {
  display: contents;
}

/* Gemeinsame Status-Dots & App-Tags (für alle Seiten außerhalb Mediathek) */
body:not(.mediathek-body) .pwa-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

body:not(.mediathek-body) .pwa-sync-dot.offline {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
}

body:not(.mediathek-body) .pwa-sync-dot.syncing {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
}

/* ------------------------------------------------------------------------------
   1. PWA APP-MODUS: GEMEINSAME BASIS (ALLE STANDARDSEITEN)
   ------------------------------------------------------------------------------ */
html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) {
  --pwa-sidebar-w: 248px;
  --pwa-topbar-h: 58px;
  --pwa-mobile-header-h: 54px;
  --pwa-wco-top: env(titlebar-area-height, 0px);
  --pwa-wco-sidebar-top: min(max(0px, env(titlebar-area-height, 0px)), calc(max(0px, env(titlebar-area-x, 0px)) * 1000));
  overscroll-behavior-y: contain;
}

html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) {
  --pwa-sidebar-w: 78px;
}

/* Webseiten-Chrom (Website Navbar & großer Web-Footer) im App-Modus ausblenden */
html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .navbar,
html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) footer.footer {
  display: none !important;
}

html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-viewport {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Kompakter App Micro-Footer */
html.pwa-standalone body:not(.mediathek-body) .pwa-site-microfooter,
html.pwa-standalone body.pwa-admin-body .pwa-admin-microfooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.75rem 4.75rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 7, 12, 0.72);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.pwa-site-microfooter-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pwa-site-microfooter-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.pwa-site-microfooter-links a,
.pwa-site-microfooter-links button {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.16s ease;
}

.pwa-site-microfooter-links a:hover,
.pwa-site-microfooter-links button:hover {
  color: #ffffff;
}

/* ------------------------------------------------------------------------------
   2. DESKTOP PWA APP SHELL (STANDARDSEITEN, min-width: 769px)
   ------------------------------------------------------------------------------ */
@media (min-width: 769px) {
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) {
    padding-top: 0 !important;
  }

  /* Hinweisbanner an den App-Viewport anpassen */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .announcement-banner {
    margin-left: var(--pwa-sidebar-w);
    width: calc(100% - var(--pwa-sidebar-w));
    transition: margin-left 0.22s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Feste linke App-Sidebar */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--pwa-sidebar-w);
    z-index: 960;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.98) 0%, rgba(5, 7, 13, 0.99) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), padding-top 0.18s ease;
    overflow: hidden;
  }

  /* Nur Abstand fuer Fensterbuttons lassen, wenn sie oben links liegen (z. B. macOS) */
  html.pwa-standalone.pwa-wco body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar {
    padding-top: var(--pwa-wco-sidebar-top, 0px);
  }

  .pwa-site-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.72rem 0.9rem;
    min-height: var(--pwa-topbar-h);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-app-region: drag;
  }

  html.pwa-standalone.pwa-wco:not(.pwa-sidebar-collapsed):not(.pwa-wco-left-controls) body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-header {
    min-height: max(var(--pwa-topbar-h), env(titlebar-area-height, 58px));
  }

  .pwa-site-sidebar-header a,
  .pwa-site-sidebar-header button {
    -webkit-app-region: no-drag;
  }

  .pwa-site-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    text-decoration: none;
    flex: 1;
  }

  .pwa-site-sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 87, 34, 0.5);
    background: #090c13;
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(255, 87, 34, 0.25);
  }

  .pwa-site-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .pwa-site-sidebar-brand-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
  }

  .pwa-site-sidebar-brand-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-site-sidebar-collapse-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.16s ease;
  }

  .pwa-site-sidebar-collapse-btn:hover {
    background: rgba(255, 87, 34, 0.18);
    border-color: rgba(255, 87, 34, 0.45);
    color: #ffffff;
  }

  .pwa-site-sidebar-collapse-btn i {
    transition: transform 0.2s ease;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-collapse-btn i {
    transform: rotate(180deg);
  }

  .pwa-site-sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.85rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  }

  .pwa-site-sidebar-group-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 0.6rem 0.45rem;
    white-space: nowrap;
  }

  .pwa-site-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .pwa-site-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.62rem 0.78rem;
    border-radius: 11px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    white-space: nowrap;
    position: relative;
  }

  .pwa-site-sidebar-item i {
    width: 18px;
    text-align: center;
    font-size: 0.96rem;
    flex-shrink: 0;
  }

  .pwa-site-sidebar-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-site-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .pwa-site-sidebar-item.active {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.22) 0%, rgba(245, 158, 11, 0.12) 100%);
    border-color: rgba(255, 87, 34, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 87, 34, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  .pwa-site-sidebar-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #ff5722, #f59e0b);
  }

  .pwa-site-sidebar-item.is-admin-item {
    color: #34d399;
  }

  .pwa-site-sidebar-item.is-admin-item:hover {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
  }

  .pwa-site-sidebar-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    background: rgba(255, 87, 34, 0.22);
    color: #ffb199;
    border: 1px solid rgba(255, 87, 34, 0.35);
    flex-shrink: 0;
  }

  .pwa-site-sidebar-badge.muted {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .pwa-site-sidebar-kbd {
    font-size: 0.66rem;
    font-weight: 700;
    font-family: inherit;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
  }

  .pwa-site-sidebar-footer {
    padding: 0.75rem 0.65rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(4, 6, 11, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .pwa-site-user-card {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }

  .pwa-site-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }

  .pwa-site-login-btn:hover {
    background: rgba(255, 87, 34, 0.14);
    color: #ffffff;
  }

  .pwa-site-user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    text-decoration: none;
    color: #ffffff;
  }

  .pwa-site-user-profile:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .pwa-site-user-meta {
    flex: 1;
    min-width: 0;
  }

  .pwa-site-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-site-user-rank {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fbbf24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-site-sync-pill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.72rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }

  .pwa-site-sync-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
  }

  .pwa-site-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.69rem;
    color: var(--text-muted);
    padding-top: 0.15rem;
  }

  .pwa-site-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
  }

  .pwa-site-legal-links a:hover {
    color: var(--text-secondary);
  }

  /* Collapsed Sidebar State */
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-brand-text,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-group-label,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-label,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-kbd,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-badge,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-user-meta,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-user-pct-pill,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-user-rank-progress,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-sidebar-rank-progress,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-sidebar-logout-label,
  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-legal-links {
    display: none !important;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-header {
    justify-content: center;
    padding: 0.75rem 0.4rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-brand {
    justify-content: center;
    flex: 0 0 auto;
    gap: 0;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-scroll {
    padding: 0.75rem 0.5rem;
    gap: 0.75rem;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-group + .pwa-site-sidebar-group {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-nav {
    align-items: center;
    gap: 0.3rem;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-item {
    justify-content: center;
    gap: 0;
    width: 46px;
    height: 42px;
    padding: 0;
    margin: 0 auto;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sidebar-footer {
    padding: 0.75rem 0.5rem 0.85rem;
    align-items: center;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-user-card {
    width: 46px;
    margin: 0 auto;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-login-btn {
    justify-content: center;
    gap: 0;
    padding: 0;
    height: 42px;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-user-profile {
    justify-content: center;
    gap: 0;
    padding: 0.35rem 0;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-sync-pill {
    justify-content: center;
    gap: 0;
    padding: 0;
    width: 46px;
    height: 34px;
    margin: 0 auto;
  }

  /* Viewport neben Sidebar */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-viewport {
    margin-left: var(--pwa-sidebar-w);
    width: calc(100% - var(--pwa-sidebar-w));
    transition: margin-left 0.22s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Desktop App Topbar */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-topbar {
    position: sticky;
    top: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--pwa-topbar-h);
    padding: 0 1.5rem;
    background: rgba(7, 10, 17, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-app-region: drag;
  }

  html.pwa-standalone.pwa-wco body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-topbar {
    height: max(var(--pwa-topbar-h), env(titlebar-area-height, 58px));
    padding-right: calc(1.5rem + max(0px, 100vw - env(titlebar-area-width, 100vw)));
  }

  .pwa-site-topbar button,
  .pwa-site-topbar a,
  .pwa-site-topbar input {
    -webkit-app-region: no-drag;
  }

  .pwa-site-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
  }

  .pwa-site-history-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .pwa-site-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.16s ease;
  }

  .pwa-site-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  .pwa-site-topbar-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
  }

  .pwa-site-topbar-title {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
  }

  .pwa-site-topbar-pill {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
  }

  .pwa-site-search-trigger {
    flex: 1 1 260px;
    max-width: 440px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    background: rgba(16, 22, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  }

  .pwa-site-search-trigger:hover {
    border-color: rgba(255, 87, 34, 0.5);
    background: rgba(20, 28, 45, 0.95);
    color: #e2e8f0;
    box-shadow: 0 0 18px rgba(255, 87, 34, 0.14);
  }

  .pwa-site-search-trigger i {
    color: var(--primary);
  }

  .pwa-site-search-trigger span {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pwa-site-search-trigger kbd {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-family: inherit;
  }

  .pwa-site-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .pwa-site-topbar-cta {
    height: 34px;
    padding: 0 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(255, 87, 34, 0.3);
    white-space: nowrap;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
  }

  .pwa-site-topbar-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 87, 34, 0.45);
    color: #ffffff;
  }

  .pwa-site-topbar-admin-btn {
    height: 34px;
    padding: 0 0.72rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.38);
    color: #6ee7b7;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    white-space: nowrap;
  }

  .pwa-site-topbar-admin-btn:hover {
    background: rgba(16, 185, 129, 0.24);
    color: #ffffff;
  }

  .pwa-site-topbar-user-btn {
    height: 34px;
    padding: 0 0.75rem 0 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
  }

  .pwa-site-topbar-user-btn:hover {
    border-color: rgba(255, 87, 34, 0.5);
    background: rgba(255, 87, 34, 0.14);
  }

  /* Cookie trigger links neben Sidebar */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .cookie-floating-trigger {
    left: calc(var(--pwa-sidebar-w) + 1rem);
    bottom: 1rem;
  }

  /* Container im Desktop-App-Viewport flüssiger gestalten */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .container {
    max-width: 1400px;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}

@media (min-width: 769px) and (max-width: 1120px) {
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-topbar-pill {
    display: none;
  }
}

/* ------------------------------------------------------------------------------
   3. MOBILE PWA APP SHELL (STANDARDSEITEN, max-width: 768px)
   ------------------------------------------------------------------------------ */
@media (max-width: 768px) {
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) {
    padding-top: 0 !important;
    padding-bottom: calc(var(--pwa-bottom-bar-height) + var(--pwa-safe-bottom) + 8px) !important;
  }

  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-viewport {
    margin-left: 0;
    width: 100%;
    padding-bottom: 0.5rem;
  }

  /* Sticky Mobile App Top Header */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-mobile-header {
    position: sticky;
    top: 0;
    z-index: 955;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: calc(0.45rem + var(--pwa-safe-top)) 0.85rem 0.45rem;
    min-height: calc(var(--pwa-mobile-header-h) + var(--pwa-safe-top));
    background: rgba(7, 10, 18, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .pwa-site-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
  }

  .pwa-site-mobile-avatar-link {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
  }

  .pwa-site-mobile-avatar-link img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 87, 34, 0.5);
    background: #090c13;
    padding: 2px;
  }

  .pwa-site-mobile-net-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #070a12;
    background: #10b981;
  }

  .pwa-site-mobile-net-dot.offline {
    background: #f59e0b;
  }

  .pwa-site-mobile-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .pwa-site-mobile-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-site-mobile-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-site-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .pwa-site-mobile-icon-btn,
  .pwa-site-mobile-user-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
  }

  .pwa-site-mobile-icon-btn.is-primary-accent {
    background: rgba(255, 87, 34, 0.16);
    border-color: rgba(255, 87, 34, 0.42);
    color: #ffb199;
  }

  .pwa-site-mobile-user-btn {
    overflow: hidden;
  }

  @media (max-width: 430px) {
    html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .pwa-site-mobile-header {
      padding: calc(0.42rem + var(--pwa-safe-top)) 0.65rem 0.42rem;
      gap: 0.45rem;
    }

    .pwa-site-mobile-brand {
      gap: 0.45rem;
      min-width: 96px;
    }

    .pwa-site-mobile-avatar-link img {
      width: 30px;
      height: 30px;
      border-radius: 9px;
    }

    .pwa-site-mobile-title {
      font-size: 0.88rem;
    }

    .pwa-site-mobile-sub {
      font-size: 0.66rem;
    }

    .pwa-site-mobile-actions {
      gap: 0.28rem;
    }

    .pwa-site-mobile-icon-btn,
    .pwa-site-mobile-user-btn {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      font-size: 0.84rem;
    }
  }

  @media (max-width: 360px) {
    .pwa-site-mobile-icon-btn,
    .pwa-site-mobile-user-btn {
      width: 31px;
      height: 31px;
      font-size: 0.78rem;
    }
  }

  /* Mobile Quick-Jump Pills auf der Startseite */
  html.pwa-standalone body.pwa-page-home .pwa-home-mobile-pills {
    position: sticky;
    top: calc(var(--pwa-mobile-header-h) + var(--pwa-safe-top));
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.85rem;
    background: rgba(7, 10, 18, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html.pwa-standalone body.pwa-page-home .pwa-home-mobile-pills::-webkit-scrollbar {
    display: none;
  }

  .pwa-home-mobile-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.4rem 0.82rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 34px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
  }

  .pwa-home-mobile-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, #ff5722 0%, #f59e0b 100%);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(255, 87, 34, 0.35);
  }

  /* Cookie floating trigger im Mobile-App-Modus über Micro-Footer statt schwebend */
  html.pwa-standalone body:not(.mediathek-body):not(.pwa-admin-body) .cookie-floating-trigger {
    display: none !important;
  }

  html.pwa-standalone body:not(.mediathek-body) .pwa-site-microfooter,
  html.pwa-standalone body.pwa-admin-body .pwa-admin-microfooter {
    padding: 0.95rem 0.85rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Native Edge-to-Edge Modals auf Mobile im PWA-Modus */
  html.pwa-standalone body:not(.mediathek-body) .modal-backdrop:not(.pwa-modal-backdrop) {
    padding: 0 !important;
  }

  html.pwa-standalone body:not(.mediathek-body) .modal-backdrop:not(.pwa-modal-backdrop) .modal-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: min(92dvh, calc(100dvh - var(--pwa-safe-top) - 0.5rem)) !important;
    height: auto;
    overflow-y: auto;
    border-radius: 20px 20px 0 0 !important;
    margin-top: auto !important;
    padding-bottom: calc(var(--pwa-safe-bottom) + 0.5rem);
  }

  html.pwa-standalone body:not(.mediathek-body) #article-modal .article-reader-dialog {
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding-top: var(--pwa-safe-top);
  }
}

/* ------------------------------------------------------------------------------
   4. SEITENSPEZIFISCHE APP-OPTIMIERUNGEN (DESKTOP & MOBILE)
   ------------------------------------------------------------------------------ */

/* --- 4A. STARTSEITE (index.php) --- */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-page-home .hero-modern {
    min-height: auto;
    padding: 2.25rem 0 2.5rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-content {
    gap: 2.25rem;
    align-items: center;
  }

  html.pwa-standalone body.pwa-page-home .hero-title {
    font-size: clamp(2rem, 3.2vw, 2.85rem);
  }

  html.pwa-standalone body.pwa-page-home .hero-description {
    font-size: 0.98rem;
    margin-bottom: 1.35rem;
  }

  html.pwa-standalone body.pwa-page-home .section {
    padding: 2.75rem 0;
  }

  html.pwa-standalone body.pwa-page-home .mediathek-bottom-cta,
  html.pwa-standalone body.pwa-page-home .news-home-bottom-cta {
    padding: 1.15rem 1.5rem;
    border-radius: 16px;
  }
}

@media (max-width: 768px) {
  html.pwa-standalone body.pwa-page-home .hero-modern {
    min-height: auto;
    padding: 0.85rem 0 1.25rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-modern .container.hero-content {
    padding: 0 0.85rem;
    gap: 1.15rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-text {
    background: rgba(15, 21, 35, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.15rem 1rem;
    backdrop-filter: blur(12px);
  }

  html.pwa-standalone body.pwa-page-home .hero-title {
    font-size: clamp(1.42rem, 5.6vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 0.55rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-description {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-shortcuts-hint {
    display: none;
  }

  html.pwa-standalone body.pwa-page-home .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 1rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-actions .hero-cta-primary {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 46px;
  }

  html.pwa-standalone body.pwa-page-home .hero-actions .hero-cta-surprise,
  html.pwa-standalone body.pwa-page-home .hero-actions .btn-ghost-hero {
    justify-content: center;
    min-height: 42px;
    font-size: 0.84rem;
    padding: 0.55rem 0.75rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding-top: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-home .stat-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-quickplay-card {
    border-radius: 18px;
    padding: 1rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-quickplay-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  html.pwa-standalone body.pwa-page-home .hero-quickplay-actions button {
    min-height: 44px;
    justify-content: center;
  }

  html.pwa-standalone body.pwa-page-home .section {
    padding: 1.65rem 0;
  }

  html.pwa-standalone body.pwa-page-home .section .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-home .continue-rail {
    scroll-snap-type: x proximity;
  }

  html.pwa-standalone body.pwa-page-home .continue-card {
    scroll-snap-align: start;
  }
}

/* --- 4B. KANAL-NEWS (news.php) --- */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-page-news .news-page-hero {
    padding: 1.75rem 0 1.5rem;
    text-align: left;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-title {
    font-size: clamp(1.65rem, 2.8vw, 2.25rem);
    margin-bottom: 0.45rem;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-desc {
    max-width: 760px;
    font-size: 0.94rem;
    margin-bottom: 1rem;
  }

  html.pwa-standalone body.pwa-page-news .news-catalog-section {
    padding: 1.75rem 0 3rem;
  }
}

@media (max-width: 768px) {
  html.pwa-standalone body.pwa-page-news .news-page-hero {
    padding: 1rem 0 1rem;
  }

  html.pwa-standalone body.pwa-page-news .news-page-hero .container,
  html.pwa-standalone body.pwa-page-news .news-catalog-section .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-badge {
    display: none;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-title {
    font-size: 1.45rem;
    margin-bottom: 0.35rem;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-desc {
    font-size: 0.86rem;
    margin-bottom: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-stats {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.45rem;
    padding-bottom: 0.2rem;
  }

  html.pwa-standalone body.pwa-page-news .news-hero-stats::-webkit-scrollbar {
    display: none;
  }

  html.pwa-standalone body.pwa-page-news .news-stat-pill {
    flex: 0 0 auto;
    font-size: 0.76rem;
    padding: 0.38rem 0.7rem;
  }

  html.pwa-standalone body.pwa-page-news .news-catalog-section {
    padding: 1rem 0 1.75rem;
  }

  html.pwa-standalone body.pwa-page-news .news-toolbar {
    padding: 0.8rem;
    border-radius: 16px;
    gap: 0.7rem;
  }

  html.pwa-standalone body.pwa-page-news .news-category-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    width: 100%;
  }

  html.pwa-standalone body.pwa-page-news .news-category-tabs::-webkit-scrollbar {
    display: none;
  }

  html.pwa-standalone body.pwa-page-news .news-tab-btn {
    flex: 0 0 auto;
    min-height: 36px;
  }

  html.pwa-standalone body.pwa-page-news .news-community-showcase {
    margin-top: 1.5rem !important;
    padding: 1.15rem;
    border-radius: 16px;
  }
}

/* --- 4C. MEIN KONTO & AUTH-SEITEN (account.php, reset-password.php, verify-email.php) --- */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-page-account .account-container {
    max-width: 1260px;
    margin: 1.35rem auto 2.5rem;
    padding: 0 1.65rem;
    width: 100%;
  }

  html.pwa-standalone body.pwa-page-account .account-guest-hero {
    max-width: 820px;
    margin: 0.75rem auto 1.5rem;
  }

  html.pwa-standalone body.pwa-page-account .account-header-card {
    padding: 1.65rem 1.85rem 1.35rem;
    margin-bottom: 1.35rem;
  }
}

/* Desktop PWA mit geöffneter Sidebar: Platzsparende Anpassung zwischen 769px und 1260px */
@media (min-width: 769px) and (max-width: 1260px) {
  html.pwa-standalone:not(.pwa-sidebar-collapsed) body.pwa-page-account .account-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.pwa-standalone:not(.pwa-sidebar-collapsed) body.pwa-page-account .avatar-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  html.pwa-standalone:not(.pwa-sidebar-collapsed) body.pwa-page-account .account-header-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
  }

  html.pwa-standalone:not(.pwa-sidebar-collapsed) body.pwa-page-account .account-header-rank-track {
    max-width: 100%;
    width: 100%;
    flex: none;
  }

  html.pwa-standalone:not(.pwa-sidebar-collapsed) body.pwa-page-account .security-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html.pwa-standalone body.pwa-page-account .account-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 0.85rem 1.75rem !important;
    margin: 0 auto !important;
  }

  html.pwa-standalone body.pwa-page-account .account-guest-hero {
    margin: 0.25rem auto 1rem;
    padding: 1.5rem 1rem;
  }

  html.pwa-standalone body.pwa-page-account .account-header-card {
    padding: 1.1rem 0.95rem;
    border-radius: 18px;
    margin-bottom: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-account .account-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.9rem;
  }

  html.pwa-standalone body.pwa-page-account .account-stat-card {
    padding: 0.82rem 0.75rem;
    border-radius: 14px;
  }

  html.pwa-standalone body.pwa-page-account .stat-card-hint {
    display: none;
  }

  html.pwa-standalone body.pwa-page-account .account-tabs-container {
    position: sticky;
    top: calc(var(--pwa-mobile-header-h) + var(--pwa-safe-top));
    z-index: 940;
    width: calc(100% + 1.7rem);
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0 -0.85rem 1rem;
    padding: 0.48rem 0.85rem;
    background: rgba(7, 10, 18, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  }

  html.pwa-standalone body.pwa-page-account .account-tabs-wrap {
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: flex-start;
    padding: 0.28rem;
    background: rgba(15, 22, 36, 0.85);
  }

  html.pwa-standalone body.pwa-page-account .account-tab-btn {
    flex: 0 0 auto;
    min-height: 36px;
    font-size: 0.8rem;
    padding: 0.48rem 0.85rem;
  }

  html.pwa-standalone body.pwa-page-account .account-card {
    padding: 1.1rem 0.95rem;
    border-radius: 18px;
  }

  html.pwa-standalone body.pwa-page-account .guest-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  html.pwa-standalone body.pwa-page-account .guest-hero-actions button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }
}

/* --- 4D. KONTAKT (kontakt.php) --- */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-page-contact .contact-page-header {
    padding: 1.65rem 0 1.4rem;
    margin-bottom: 1.75rem;
  }

  html.pwa-standalone body.pwa-page-contact .contact-page-title {
    font-size: 1.85rem;
  }

  html.pwa-standalone body.pwa-page-contact .contact-grid {
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 768px) {
  html.pwa-standalone body.pwa-page-contact .contact-page-header {
    padding: 1rem 0;
    margin-bottom: 1rem;
  }

  html.pwa-standalone body.pwa-page-contact .contact-page-header .container,
  html.pwa-standalone body.pwa-page-contact #contact-main-content {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-contact .breadcrumb-nav {
    display: none;
  }

  html.pwa-standalone body.pwa-page-contact .contact-page-title {
    font-size: 1.45rem;
  }

  html.pwa-standalone body.pwa-page-contact .contact-card,
  html.pwa-standalone body.pwa-page-contact .contact-info-card {
    padding: 1.15rem 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
  }

  html.pwa-standalone body.pwa-page-contact .contact-grid {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  html.pwa-standalone body.pwa-page-contact #btn-submit-contact {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }
}

/* --- 4E. RECHTLICHES (impressum.php, datenschutz.php, agb.php) --- */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-page-legal .legal-page-header {
    padding: 1.65rem 0 1.4rem;
    margin-bottom: 1.75rem;
  }

  html.pwa-standalone body.pwa-page-legal .legal-page-title {
    font-size: 1.85rem;
  }

  html.pwa-standalone body.pwa-page-legal .legal-standalone-card {
    padding: 2rem;
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 768px) {
  html.pwa-standalone body.pwa-page-legal .legal-page-header {
    padding: 1rem 0;
    margin-bottom: 1rem;
  }

  html.pwa-standalone body.pwa-page-legal .legal-page-header .container,
  html.pwa-standalone body.pwa-page-legal main.container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  html.pwa-standalone body.pwa-page-legal .breadcrumb-nav {
    display: none;
  }

  html.pwa-standalone body.pwa-page-legal .legal-page-title {
    font-size: 1.45rem;
  }

  html.pwa-standalone body.pwa-page-legal .legal-standalone-card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
  }

  html.pwa-standalone body.pwa-page-legal .btn-back-home {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* --- 4F. 404 DUNGEON PAGE (404.php) --- */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-page-404 .error-page-wrapper {
    min-height: calc(100dvh - var(--pwa-topbar-h) - 62px);
    padding: 1.5rem 1.75rem 2rem;
  }
}

@media (max-width: 768px) {
  html.pwa-standalone body.pwa-page-404 .error-page-wrapper {
    min-height: auto;
    padding: 0.85rem 0.85rem 1.5rem;
  }

  html.pwa-standalone body.pwa-page-404 .error-shortcuts {
    display: none;
  }
}

/* --- 4G. WARTUNGSMODUS (maintenance.php) --- */
html.pwa-standalone body.pwa-page-maintenance {
  padding-top: var(--pwa-safe-top);
  padding-bottom: var(--pwa-safe-bottom);
  overscroll-behavior-y: contain;
}

html.pwa-standalone body.pwa-page-maintenance .pwa-maint-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  background: rgba(7, 10, 17, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  -webkit-app-region: drag;
}

html.pwa-standalone.pwa-wco body.pwa-page-maintenance .pwa-maint-app-bar {
  min-height: max(52px, env(titlebar-area-height, 52px));
  padding-right: calc(1.25rem + max(0px, 100vw - env(titlebar-area-width, 100vw)));
}

.pwa-maint-app-bar button {
  -webkit-app-region: no-drag;
}

.pwa-maint-app-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
}

.pwa-maint-app-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 87, 34, 0.5);
  background: #090c13;
  padding: 2px;
}

.pwa-maint-app-btn {
  height: 34px;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-family: inherit;
}

.pwa-maint-app-btn:hover {
  background: rgba(255, 87, 34, 0.18);
  border-color: rgba(255, 87, 34, 0.45);
  color: #ffffff;
}

/* ------------------------------------------------------------------------------
   5. ADMIN STUDIO PWA APP SHELL (admin.php - Desktop & Mobile)
   ------------------------------------------------------------------------------ */
html.pwa-standalone body.pwa-admin-body {
  --pwa-admin-sidebar-w: 266px;
  --pwa-admin-topbar-h: 58px;
  --pwa-admin-mobile-header-h: 54px;
  --pwa-wco-top: env(titlebar-area-height, 0px);
  --pwa-wco-sidebar-top: min(max(0px, env(titlebar-area-height, 0px)), calc(max(0px, env(titlebar-area-x, 0px)) * 1000));
  overscroll-behavior-y: contain;
}

html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body {
  --pwa-admin-sidebar-w: 78px;
}

/* Webseiten-Navbar im Admin-App-Modus ausblenden */
html.pwa-standalone body.pwa-admin-body .navbar {
  display: none !important;
}

/* Admin Desktop App Shell (min-width: 769px) */
@media (min-width: 769px) {
  html.pwa-standalone body.pwa-admin-body {
    padding-top: 0 !important;
  }

  html.pwa-standalone body.pwa-admin-body .admin-container {
    margin-left: var(--pwa-admin-sidebar-w);
    width: calc(100% - var(--pwa-admin-sidebar-w));
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.22s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  html.pwa-standalone body.pwa-admin-body #admin-dashboard-view {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 100dvh;
  }

  /* Fixierte Admin App-Sidebar (ersetzt schwebende Karten-Sidebar) */
  html.pwa-standalone body.pwa-admin-body .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: var(--pwa-admin-sidebar-w) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 960 !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.98) 0%, rgba(5, 7, 13, 0.99) 100%) !important;
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.55) !important;
    padding: 0 !important;
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), padding-top 0.18s ease !important;
    overflow: hidden !important;
  }

  /* Nur Abstand fuer Fensterbuttons lassen, wenn sie oben links liegen (z. B. macOS) */
  html.pwa-standalone.pwa-wco body.pwa-admin-body .admin-sidebar {
    padding-top: var(--pwa-wco-sidebar-top, 0px) !important;
  }

  html.pwa-standalone body.pwa-admin-body .admin-sidebar-header {
    padding: 0.72rem 0.9rem;
    min-height: var(--pwa-admin-topbar-h);
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    -webkit-app-region: drag;
  }

  html.pwa-standalone.pwa-wco:not(.pwa-sidebar-collapsed):not(.pwa-wco-left-controls) body.pwa-admin-body .admin-sidebar-header {
    min-height: max(var(--pwa-admin-topbar-h), env(titlebar-area-height, 58px));
  }

  html.pwa-standalone body.pwa-admin-body .admin-sidebar-header a,
  html.pwa-standalone body.pwa-admin-body .admin-sidebar-header button {
    -webkit-app-region: no-drag;
  }

  html.pwa-standalone body.pwa-admin-body .admin-sidebar-title {
    display: none;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
    text-decoration: none;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 87, 34, 0.5);
    background: #090c13;
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(255, 87, 34, 0.25);
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-brand-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-brand-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-collapse-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.16s ease;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-collapse-btn:hover {
    background: rgba(255, 87, 34, 0.18);
    border-color: rgba(255, 87, 34, 0.45);
    color: #ffffff;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .pwa-admin-sidebar-collapse-btn i {
    transform: rotate(180deg);
  }

  html.pwa-standalone body.pwa-admin-body .admin-tabs {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.65rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  }

  html.pwa-standalone body.pwa-admin-body .admin-sidebar-footer {
    margin-top: 0;
    padding: 0.75rem 0.65rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(4, 6, 11, 0.75);
  }

  html.pwa-standalone body.pwa-admin-body .admin-shortcut-hint {
    display: none;
  }

  /* Collapsed Admin Sidebar */
  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .pwa-admin-sidebar-brand-text,
  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-sidebar-group-title,
  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-tab > span,
  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-tab-count,
  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-tab::after,
  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-sidebar-footer {
    display: none !important;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-sidebar-header {
    justify-content: center;
    padding: 0.75rem 0.4rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .pwa-admin-sidebar-brand {
    flex: 0 0 auto;
    justify-content: center;
    gap: 0;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-tabs {
    padding: 0.7rem 0.45rem;
    align-items: center;
  }

  html.pwa-standalone.pwa-sidebar-collapsed body.pwa-admin-body .admin-tab {
    width: 46px;
    height: 40px;
    padding: 0;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
  }

  /* Admin Topbar als Sticky Desktop App-Leiste */
  html.pwa-standalone body.pwa-admin-body .admin-topbar-card {
    position: sticky;
    top: 0;
    z-index: 950;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
    padding: 0.6rem 1.5rem;
    min-height: var(--pwa-admin-topbar-h);
    background: rgba(7, 10, 17, 0.94);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    -webkit-app-region: drag;
  }

  html.pwa-standalone body.pwa-admin-body .admin-topbar-card::before {
    display: none;
  }

  html.pwa-standalone.pwa-wco body.pwa-admin-body .admin-topbar-card {
    min-height: max(var(--pwa-admin-topbar-h), env(titlebar-area-height, 58px));
    padding-right: calc(1.5rem + max(0px, 100vw - env(titlebar-area-width, 100vw)));
  }

  html.pwa-standalone body.pwa-admin-body .admin-topbar-card button,
  html.pwa-standalone body.pwa-admin-body .admin-topbar-card a,
  html.pwa-standalone body.pwa-admin-body .admin-topbar-card input {
    -webkit-app-region: no-drag;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-topbar-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
  }

  html.pwa-standalone body.pwa-admin-body .admin-dashboard-layout {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    padding: 0;
    gap: 0;
  }

  html.pwa-standalone body.pwa-admin-body .admin-main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding: 1.35rem 1.75rem 0;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-microfooter {
    margin-left: -1.75rem;
    margin-right: -1.75rem;
    margin-top: auto;
  }

  html.pwa-standalone body.pwa-admin-body .admin-mobile-toggle-bar {
    display: none !important;
  }
}

/* Admin Mobile App Shell (max-width: 768px) */
@media (max-width: 768px) {
  html.pwa-standalone body.pwa-admin-body {
    padding-top: 0 !important;
    padding-bottom: calc(var(--pwa-bottom-bar-height) + var(--pwa-safe-bottom) + 8px) !important;
  }

  html.pwa-standalone body.pwa-admin-body .admin-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html.pwa-standalone body.pwa-admin-body .admin-topbar-card,
  html.pwa-standalone body.pwa-admin-body .admin-mobile-toggle-bar {
    display: none !important;
  }

  /* Sticky Mobile Admin Header */
  html.pwa-standalone body.pwa-admin-body .pwa-admin-mobile-header {
    position: sticky;
    top: 0;
    z-index: 955;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: calc(0.45rem + var(--pwa-safe-top)) 0.85rem 0.45rem;
    min-height: calc(var(--pwa-admin-mobile-header-h) + var(--pwa-safe-top));
    background: rgba(7, 10, 18, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .pwa-admin-mobile-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
  }

  .pwa-admin-mobile-menu-trigger {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 87, 34, 0.16);
    border: 1px solid rgba(255, 87, 34, 0.4);
    color: #ffb199;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
  }

  .pwa-admin-mobile-logo-wrap {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
  }

  .pwa-admin-mobile-logo-wrap img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255, 87, 34, 0.45);
    background: #090c13;
    padding: 2px;
  }

  .pwa-admin-mobile-net-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid #070a12;
    background: #10b981;
  }

  .pwa-admin-mobile-net-dot.offline {
    background: #f59e0b;
  }

  .pwa-admin-mobile-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .pwa-admin-mobile-title {
    font-size: 0.94rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
  }

  .pwa-admin-mobile-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pwa-admin-mobile-right {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    flex-shrink: 0;
  }

  .pwa-admin-mobile-maint-pill {
    height: 32px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    cursor: pointer;
    font-family: inherit;
  }

  .pwa-admin-mobile-maint-pill.is-maint {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
  }

  .pwa-admin-mobile-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
  }

  /* Sticky Horizontal Admin Quick-Tabs */
  html.pwa-standalone body.pwa-admin-body .pwa-admin-mobile-quicktabs {
    position: sticky;
    top: calc(var(--pwa-admin-mobile-header-h) + var(--pwa-safe-top));
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.85rem;
    background: rgba(7, 10, 18, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-mobile-quicktabs::-webkit-scrollbar {
    display: none;
  }

  .pwa-admin-mobile-quicktab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 34px;
    cursor: pointer;
    font-family: inherit;
  }

  .pwa-admin-mobile-quicktab.active {
    color: #ffffff;
    background: linear-gradient(135deg, #ff5722 0%, #f59e0b 100%);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(255, 87, 34, 0.35);
  }

  /* Slide-out Drawer Anpassung für Safe-Area */
  html.pwa-standalone body.pwa-admin-body .admin-sidebar {
    padding-top: var(--pwa-safe-top) !important;
    padding-bottom: calc(var(--pwa-safe-bottom) + 1rem) !important;
    height: 100dvh !important;
    z-index: 1060 !important;
  }

  html.pwa-standalone body.pwa-admin-body .admin-sidebar-backdrop {
    z-index: 1050 !important;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-sidebar-app-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .pwa-admin-drawer-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 36px;
    padding: 0 0.55rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #e2e8f0;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
  }

  .pwa-admin-drawer-action.danger {
    grid-column: 1 / -1;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
  }

  /* Admin Content Padding & Responsive Cards */
  html.pwa-standalone body.pwa-admin-body .admin-main-content {
    padding: 0.9rem 0.85rem 1.25rem;
    gap: 1rem;
  }

  html.pwa-standalone body.pwa-admin-body .cockpit-command-hub {
    padding: 1rem;
    border-radius: 16px;
  }

  html.pwa-standalone body.pwa-admin-body .cockpit-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  html.pwa-standalone body.pwa-admin-body .cockpit-kpi-card {
    padding: 0.85rem;
    border-radius: 14px;
  }

  html.pwa-standalone body.pwa-admin-body .cockpit-kpi-val {
    font-size: 1.35rem !important;
  }

  html.pwa-standalone body.pwa-admin-body .cockpit-tool-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  html.pwa-standalone body.pwa-admin-body .admin-card {
    padding: 1.1rem 0.95rem;
    border-radius: 16px;
  }

  html.pwa-standalone body.pwa-admin-body .form-grid {
    grid-template-columns: 1fr;
  }

  html.pwa-standalone body.pwa-admin-body .form-group.full-width {
    grid-column: span 1;
  }

  html.pwa-standalone body.pwa-admin-body .admin-scroll-top-btn {
    bottom: calc(var(--pwa-bottom-bar-height) + var(--pwa-safe-bottom) + 14px);
    right: 14px;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-microfooter {
    margin-left: -0.85rem;
    margin-right: -0.85rem;
  }

  /* Admin Mobile Bottom Navigation Bar */
  html.pwa-standalone body.pwa-admin-body .pwa-admin-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 980;
    height: calc(var(--pwa-bottom-bar-height) + var(--pwa-safe-bottom));
    padding-bottom: var(--pwa-safe-bottom);
    background: rgba(11, 15, 25, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.55);
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-bottom-nav .pwa-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    height: var(--pwa-bottom-bar-height);
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    padding: 0.25rem 0.15rem;
    transition: color 0.18s ease, transform 0.15s ease;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-bottom-nav .pwa-bottom-item i {
    font-size: 1.12rem;
    line-height: 1;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-bottom-nav .pwa-bottom-item span {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.1;
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-bottom-nav .pwa-bottom-item.active {
    color: var(--primary);
  }

  html.pwa-standalone body.pwa-admin-body .pwa-admin-bottom-nav .pwa-bottom-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24%;
    right: 24%;
    height: 2.5px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
  }
}
