/*
 * Gamer's Bar Portal 0.19.1
 * Canonical shell, layout rhythm and responsive safeguards.
 *
 * app.css remains the visual component library. This file is deliberately
 * loaded afterwards and owns page geometry, so feature-specific styles cannot
 * accidentally remove the sidebar reservation or widen the viewport.
 */

:root {
  --content-max: 1510px;
  --mobile-head-h: 68px;
  --page-gutter: clamp(24px, 2.75vw, 42px);
  --section-gap: 16px;
}

html,
body {
  min-width: 0;
}

body.app-shell {
  padding: 0;
}

.app-frame {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
}

.app-frame > .sidebar {
  position: sticky;
  inset: auto;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  grid-column: 1;
  grid-row: 1;
}

.app-frame > .main-content {
  width: 100%;
  max-width: var(--content-max);
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin: 0;
  padding: 36px var(--page-gutter) 24px;
  display: flex;
  flex-direction: column;
}

.main-content > * {
  min-width: 0;
  max-width: 100%;
}

/* Sidebar */
.sidebar-top {
  padding: 0 4px 10px;
}

.brand-logo-full {
  width: min(100%, 142px);
  max-height: 142px;
}

.sidebar-nav {
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.nav-link > span:first-child,
.identity-copy,
.identity-copy > strong {
  min-width: 0;
}

.nav-link > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link-with-count {
  justify-content: space-between;
  gap: 10px;
}

.nav-link-with-count .nav-count {
  flex: 0 0 auto;
}

/* Shared page geometry */
.page-head {
  min-width: 0;
  align-items: flex-end;
}

.page-head > div:first-child,
.page-head-actions,
.panel-head > *,
.section-title-row > *,
.toolbar > *,
.action-panel > *,
.admin-hero > *,
.admin-object-hero > * {
  min-width: 0;
}

.page-head h1,
.panel-head h2,
.panel-head h3,
.section-title-row h2,
.section-title-row h3,
.admin-hero h2,
.admin-object-hero h2 {
  overflow-wrap: anywhere;
}

.page-head-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel,
.hero-panel,
.wallet-hero,
.server-card,
.community-user-card,
.community-user-cta,
.admin-hero,
.admin-object-hero,
.workspace-hero,
.notification-center-hero,
.system-hero {
  min-width: 0;
  max-width: 100%;
}

.two-col,
.cards-grid,
.order-admin-grid,
.admin-server-grid,
.product-admin-grid,
.promotion-admin-grid,
.analytics-main-grid,
.analytics-secondary-grid,
.analytics-three-grid,
.analytics-ranking-grid,
.workspace-grid,
.performance-columns,
.ticket-main-secondary-grid {
  min-width: 0;
}

.two-col > .panel,
.cards-grid > .panel,
.analytics-main-grid > .panel,
.analytics-secondary-grid > .panel,
.analytics-three-grid > .panel,
.analytics-ranking-grid > .panel,
.workspace-grid > .panel,
.performance-columns > .panel,
.ticket-main-secondary-grid > .panel {
  margin: 0;
}

.form-grid > *,
.admin-filter-grid > *,
.notification-filter-grid > *,
.notification-switch-grid > *,
.notification-template-grid > *,
.settings-section .form-grid > *,
.community-benefit-grid > *,
.community-toggle-grid > *,
.promotion-create-grid > *,
.system-settings-grid > *,
.admin-hero-metrics > * {
  min-width: 0;
}

.button,
.top-search-button,
.top-action-button,
.link-button,
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}

.button {
  height: auto;
  overflow-wrap: anywhere;
}

.hero-actions,
.form-actions,
.filter-actions,
.row-actions,
.section-head-actions,
.admin-hero-actions,
.notification-bulk-actions,
.push-optin-actions {
  min-width: 0;
}

.table-wrap {
  min-width: 0;
  overscroll-behavior-x: contain;
}

td {
  overflow-wrap: anywhere;
}

.table-actions,
.row-actions,
.status-actions {
  white-space: normal;
}

/* Dashboard */
.dashboard-layout {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: var(--section-gap);
}

.dashboard-layout > *,
.dashboard-layout .community-user-strip,
.dashboard-layout .stats-grid,
.dashboard-layout .two-col {
  margin: 0;
}

.dashboard-layout .hero-panel {
  min-height: 188px;
}

.dashboard-layout .hero-panel > div:first-child {
  min-width: 0;
}

.dashboard-layout .hero-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.dashboard-layout .hero-actions .button {
  white-space: nowrap;
}

.dashboard-layout .community-user-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
}

.dashboard-layout .community-user-card,
.dashboard-layout .community-user-cta {
  height: 100%;
}

.dashboard-layout .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-layout .stat-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-layout .stat-card small {
  min-height: 1.45em;
  overflow-wrap: anywhere;
}

.dashboard-layout .two-col {
  align-items: stretch;
}

.dashboard-layout .two-col > .panel {
  min-height: 150px;
}

.dashboard-layout .empty {
  min-height: 76px;
  display: grid;
  place-items: center;
}

/* Guest, login and installer */
.guest-shell .main-content {
  width: min(100%, 980px);
  max-width: 980px;
  margin-inline: auto;
}

.guest-shell .auth-card,
.guest-shell .install-card {
  max-width: 100%;
}

/* Medium desktop: the sidebar still remains visible, but content no longer
   gets squeezed into unstable multi-column arrangements. */
@media (max-width: 1180px) {
  :root {
    --page-gutter: 28px;
  }

  .hero-panel {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-layout .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .workspace-hero,
  .system-hero {
    align-items: flex-start;
  }

  .admin-hero-actions,
  .admin-hero-metrics {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

/* Off-canvas navigation. The shell itself owns the top offset; body padding is
   intentionally never used, preventing the desktop column from disappearing. */
@media (max-width: 920px) {
  body.app-shell {
    padding: 0;
  }

  .app-frame {
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    padding-top: var(--mobile-head-h);
  }

  .app-frame > .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(88vw, 320px);
    height: 100vh;
    height: 100dvh;
    transform: translateX(-103%);
  }

  .menu-open .app-frame > .sidebar {
    transform: translateX(0);
  }

  .mobile-head {
    height: var(--mobile-head-h);
  }

  .app-frame > .main-content {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - var(--mobile-head-h));
    min-height: calc(100dvh - var(--mobile-head-h));
    padding: 25px 18px 20px;
  }

  .page-head {
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  :root {
    --section-gap: 13px;
  }

  .app-frame > .main-content {
    padding-inline: 14px;
  }

  .page-head {
    gap: 12px;
  }

  .panel-head,
  .section-title-row,
  .toolbar,
  .action-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-layout .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout .hero-actions .button {
    width: 100%;
    white-space: normal;
  }

  .dashboard-layout .stats-grid {
    gap: 10px;
  }

  .dashboard-layout .two-col > .panel {
    min-height: 0;
  }

  .table-wrap {
    border: 1px solid rgba(255,255,255,.045);
  }
}

@media (max-width: 520px) {
  :root {
    --section-gap: 11px;
  }

  .app-frame > .main-content {
    padding: 20px 12px 17px;
  }

  .page-head {
    margin-bottom: 15px;
  }

  .page-head h1 {
    font-size: clamp(1.45rem, 8vw, 1.85rem);
  }

  .panel,
  .dashboard-layout .panel {
    margin-block: 0;
    padding: 15px;
  }

  .dashboard-layout .hero-panel {
    min-height: 0;
    padding: 21px 18px;
  }

  .dashboard-layout .hero-panel h2 {
    font-size: clamp(1.85rem, 10vw, 2.35rem);
  }

  .dashboard-layout .hero-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-layout .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-layout .stat-card {
    min-height: 104px;
  }

  .dashboard-layout .community-user-card,
  .dashboard-layout .community-user-cta {
    padding: 15px;
  }

  .panel-head {
    gap: 9px;
  }

  .panel-head > a:not(.button) {
    flex: 0 0 auto;
  }

}

@media (max-width: 380px) {
  .app-frame > .main-content {
    padding-inline: 9px;
  }

  .page-head-actions {
    gap: 5px;
  }

  .panel,
  .dashboard-layout .panel {
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-frame > .sidebar {
    transition-duration: .01ms;
  }
}

/* 0.9.7 – portal-wide component rhythm and overflow hardening */
:root {
  --control-sm-h: 36px;
  --content-row-gap: 12px;
}

[hidden] { display: none !important; }

form { margin: 0; }

button,
.button,
input,
select,
textarea,
summary {
  line-height: 1.35;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: var(--control-h);
}

textarea {
  min-height: 112px;
}

label > span:first-child,
.field-label {
  line-height: 1.35;
}

label > small,
.field-caption {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.button {
  min-height: var(--control-h);
  height: auto;
  padding-block: 9px;
}

.button.small,
.top-action-button,
.link-button {
  min-height: var(--control-sm-h);
}

.button.small { padding-block: 6px; }

.panel-head,
.section-title-row,
.section-head,
.toolbar,
.action-panel,
.form-actions,
.row-actions,
.filter-actions {
  row-gap: 9px;
}

.panel-head h2,
.panel-head h3,
.section-title-row h2,
.section-title-row h3,
.section-head h2,
.section-head h3 {
  margin-top: 3px;
  line-height: 1.2;
}

.panel-head small,
.section-title-row .muted,
.section-head small {
  display: block;
  margin-top: 4px;
  line-height: 1.45;
}

.form-grid { align-items: start; }
.form-actions { min-height: var(--control-h); }
.form-actions > form,
.row-actions > form,
.filter-actions > form { margin: 0; }
.form-actions .muted { line-height: 1.45; }

.list-row > *,
.timeline-head > *,
.message-head > *,
.server-card-top > *,
.server-foot > * { min-width: 0; }

.list-row > :first-child { flex: 1 1 auto; }
.list-row > :last-child { flex: 0 1 auto; }

.badge,
.mini-badge,
.game-pill,
.queue-chip {
  max-width: 100%;
  line-height: 1.25;
}

.table-wrap { margin-block: 10px 0; }
th, td { vertical-align: top; }
td > :first-child { margin-top: 0; }
td > :last-child { margin-bottom: 0; }
.table-actions .button { white-space: normal; }

.notice {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Current navigation: a deliberately slow, very subtle neon breathing effect. */
@keyframes active-nav-breathe {
  0%, 100% { border-color: rgba(255,69,210,.28); box-shadow: inset 0 0 18px rgba(154,97,255,.055), 0 0 12px rgba(255,69,210,.035); }
  50% { border-color: rgba(22,216,255,.34); box-shadow: inset 0 0 23px rgba(22,216,255,.065), 0 0 17px rgba(255,69,210,.06); }
}

@keyframes active-nav-marker-breathe {
  0%, 100% { opacity: .78; filter: saturate(.9); }
  50% { opacity: 1; filter: saturate(1.08); }
}

.nav-link.is-active {
  animation: active-nav-breathe 5.8s ease-in-out infinite;
}

.nav-link.is-active::before {
  animation: active-nav-marker-breathe 5.8s ease-in-out infinite;
}

/* Soft page hand-off. Navigation is never delayed; the overlay only covers the
   short interval while the browser requests the next document. */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: rgba(4,7,17,.58);
  backdrop-filter: blur(3px);
  transition: opacity .16s ease, visibility 0s linear .16s;
}

.page-is-transitioning .page-transition {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.page-transition-spinner {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-pink);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(22,216,255,.11), 0 0 30px rgba(255,69,210,.08);
  animation: page-transition-spin .78s linear infinite;
}

@keyframes page-transition-spin { to { transform: rotate(360deg); } }

.page-is-ready .main-content {
  animation: page-content-arrive .24s ease-out both;
}

@keyframes page-content-arrive {
  from { opacity: .72; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* User-facing platform notices */
.platform-notice-stack {
  width: 100%;
  display: grid;
  gap: 10px;
  margin: -4px 0 16px;
}

.platform-notice,
.platform-notice-preview {
  --notice-color: var(--neon-cyan);
  --notice-rgb: 22,216,255;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid rgba(var(--notice-rgb),.27);
  border-radius: 15px;
  background: linear-gradient(100deg,rgba(var(--notice-rgb),.085),rgba(10,15,29,.92) 55%);
  box-shadow: inset 3px 0 0 rgba(var(--notice-rgb),.65), 0 8px 24px rgba(0,0,0,.09);
}

.platform-notice.is-success,
.platform-notice-preview.is-success { --notice-color: var(--success); --notice-rgb: 67,214,154; }
.platform-notice.is-warning,
.platform-notice-preview.is-warning { --notice-color: var(--warning); --notice-rgb: 243,180,85; }
.platform-notice.is-danger,
.platform-notice-preview.is-danger { --notice-color: var(--danger); --notice-rgb: 245,101,124; }
.platform-notice.is-maintenance,
.platform-notice-preview.is-maintenance { --notice-color: var(--neon-violet); --notice-rgb: 154,97,255; }

.platform-notice-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--notice-rgb),.34);
  border-radius: 10px;
  color: var(--notice-color);
  background: rgba(var(--notice-rgb),.09);
  font-size: .84rem;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(var(--notice-rgb),.09);
}

.platform-notice-copy { min-width: 0; display: grid; gap: 4px; }
.platform-notice-kicker { color: var(--notice-color); font-size: .61rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.platform-notice-copy > strong { color: var(--text); font-size: .92rem; line-height: 1.35; overflow-wrap: anywhere; }
.platform-notice-copy p { margin: 0; color: var(--text-soft); font-size: .79rem; line-height: 1.55; overflow-wrap: anywhere; white-space: normal; }
.platform-notice-copy small { margin-top: 2px; color: var(--muted); font-size: .65rem; }

/* Portal notice administration */
.notice-admin-metrics { flex-wrap: wrap; }
.notice-admin-metrics > div:last-child { min-width: 155px; }
.notice-editor-panel { scroll-margin-top: 86px; }
.notice-editor-form { display: grid; gap: 17px; }
.notice-editor-main-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(340px,.9fr); gap: 17px; align-items: start; }
.notice-editor-copy-fields,
.notice-editor-options { min-width: 0; display: grid; gap: 13px; }
.field-block { min-width: 0; display: grid; gap: 7px; color: var(--text-soft); font-size: .82rem; font-weight: 650; }
.notice-audience-options { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.notice-audience-options > label { position: relative; margin: 0; cursor: pointer; }
.notice-audience-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.notice-audience-options label > span {
  min-height: 68px;
  padding: 11px 12px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8,13,23,.52);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.notice-audience-options input:checked + span { border-color: rgba(22,216,255,.42); background: rgba(22,216,255,.075); box-shadow: inset 0 0 18px rgba(22,216,255,.035); }
.notice-audience-options input:focus-visible + span { outline: 3px solid rgba(49,153,244,.23); outline-offset: 2px; }
.notice-audience-options strong { color: var(--text); font-size: .77rem; }
.notice-audience-options small { color: var(--muted); font-size: .64rem; font-weight: 500; }
.notice-schedule-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-items: start; }
.notice-active-toggle { min-height: 68px; }

.notice-user-targets { min-width: 0; padding: 14px; border: 1px solid rgba(22,216,255,.13); border-radius: 14px; background: rgba(7,13,24,.52); }
.notice-user-target-head { min-width: 0; display: flex; justify-content: space-between; gap: 14px; align-items: end; margin-bottom: 11px; }
.notice-user-target-head h4 { margin: 3px 0 0; font-size: .94rem; }
.notice-user-search { width: min(100%,350px); margin: 0; }
.notice-user-list { min-width: 0; max-height: 330px; padding-right: 4px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.notice-user-option { position: relative; min-width: 0; margin: 0 !important; cursor: pointer; }
.notice-user-option > input { position: absolute; top: 12px; left: 11px; width: 17px; height: 17px; margin: 0; accent-color: var(--neon-cyan); }
.notice-user-option > span { min-width: 0; min-height: 63px; padding: 10px 10px 10px 37px; display: grid; align-content: center; gap: 3px; border: 1px solid rgba(255,255,255,.06); border-radius: 11px; background: rgba(255,255,255,.018); }
.notice-user-option input:checked + span { border-color: rgba(22,216,255,.3); background: rgba(22,216,255,.055); }
.notice-user-option strong,
.notice-user-option small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-user-option strong { color: var(--text); font-size: .72rem; }
.notice-user-option small { color: var(--muted); font-size: .58rem; font-weight: 500; }
.notice-user-list-empty { padding: 22px 8px; color: var(--muted); text-align: center; }

.platform-notice-preview { margin-top: 1px; }
.platform-notice-preview .platform-notice-copy p { white-space: pre-line; }
.notice-editor-actions { justify-content: flex-start; }
.notice-editor-actions .muted { margin-left: auto; max-width: 520px; font-size: .7rem; text-align: right; }
.notice-management-section { margin-top: 24px; }
.notice-management-list { display: grid; gap: 11px; }
.notice-management-card { margin: 0; scroll-margin-top: 20px; }
.notice-management-card.is-inactive,
.notice-management-card.is-expired { opacity: .72; }
.notice-management-head { min-width: 0; display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.notice-management-title { min-width: 0; display: grid; grid-template-columns: 11px minmax(0,1fr); gap: 10px; align-items: center; }
.notice-management-title h3 { margin-top: 3px; overflow-wrap: anywhere; }
.notice-tone-dot { width: 10px; height: 34px; border-radius: 999px; background: var(--neon-cyan); box-shadow: 0 0 13px rgba(22,216,255,.22); }
.notice-tone-dot.is-success { background: var(--success); }
.notice-tone-dot.is-warning { background: var(--warning); }
.notice-tone-dot.is-danger { background: var(--danger); }
.notice-tone-dot.is-maintenance { background: var(--neon-violet); }
.mini-badge.is-live { color: #77e6b8; border-color: rgba(67,214,154,.28); background: rgba(67,214,154,.08); }
.mini-badge.is-scheduled { color: #8cecff; border-color: rgba(22,216,255,.24); background: rgba(22,216,255,.07); }
.mini-badge.is-expired,
.mini-badge.is-inactive { color: #a1aab7; }
.notice-management-message { margin: 13px 0; color: var(--text-soft) !important; white-space: normal; overflow-wrap: anywhere; }
.notice-management-meta { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.notice-management-meta > div { min-width: 0; padding: 9px 10px; display: grid; gap: 3px; border: 1px solid rgba(255,255,255,.05); border-radius: 10px; background: rgba(255,255,255,.017); }
.notice-management-meta span { color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.notice-management-meta strong { font-size: .69rem; line-height: 1.4; overflow-wrap: anywhere; }
.notice-management-actions { justify-content: flex-end; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.055); }

/* Role editor diagnosis */
.role-diagnostic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin: 0 0 16px; }
.role-diagnostic-card { margin: 0; padding: 14px; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 11px; align-items: start; }
.role-diagnostic-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; font-size: .78rem; font-weight: 950; }
.role-diagnostic-card > div { min-width: 0; display: grid; gap: 4px; }
.role-diagnostic-card strong { font-size: .82rem; }
.role-diagnostic-card p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; overflow-wrap: anywhere; }
.role-diagnostic-card a { margin-top: 2px; color: #8cecff; font-size: .67rem; font-weight: 750; }
.role-diagnostic-card.is-ok { border-color: rgba(67,214,154,.2); }
.role-diagnostic-card.is-ok .role-diagnostic-icon { color: #77e6b8; border-color: rgba(67,214,154,.26); background: rgba(67,214,154,.07); }
.role-diagnostic-card.is-warning { border-color: rgba(243,180,85,.18); }
.role-diagnostic-card.is-warning .role-diagnostic-icon { color: #f8ca82; border-color: rgba(243,180,85,.24); background: rgba(243,180,85,.07); }
.role-diagnostic-card.is-error { border-color: rgba(245,101,124,.22); }
.role-diagnostic-card.is-error .role-diagnostic-icon { color: #ff9bad; border-color: rgba(245,101,124,.28); background: rgba(245,101,124,.07); }

@media (max-width: 1100px) {
  .notice-editor-main-grid { grid-template-columns: 1fr; }
  .notice-user-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .notice-management-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .role-diagnostic-grid { grid-template-columns: 1fr; }
  .notice-user-target-head { align-items: stretch; flex-direction: column; }
  .notice-user-search { width: 100%; }
  .notice-editor-actions { align-items: stretch; flex-direction: column; }
  .notice-editor-actions > .button { width: 100%; }
  .notice-editor-actions .muted { margin-left: 0; text-align: left; }
}

@media (max-width: 560px) {
  .button:not(.small) { padding-inline: 14px; }
  .panel-head > .button,
  .section-title-row > .button { width: 100%; }
  .list-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .list-row > :last-child { width: 100%; }
  .list-row > :last-child.button { width: 100%; }
  .platform-notice,
  .platform-notice-preview { grid-template-columns: 30px minmax(0,1fr); gap: 10px; padding: 12px; border-radius: 13px; }
  .platform-notice-icon { width: 28px; height: 28px; border-radius: 9px; }
  .platform-notice-copy > strong { font-size: .84rem; }
  .platform-notice-copy p { font-size: .74rem; }
  .notice-audience-options,
  .notice-schedule-grid,
  .notice-user-list,
  .notice-management-meta { grid-template-columns: 1fr; }
  .notice-user-list { max-height: 390px; }
  .notice-management-head { flex-direction: column; }
  .notice-management-actions { display: grid; grid-template-columns: 1fr; }
  .notice-management-actions > *,
  .notice-management-actions .button { width: 100%; }
  .role-diagnostic-card { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link.is-active,
  .nav-link.is-active::before,
  .page-transition-spinner,
  .page-is-ready .main-content { animation: none !important; }
  .page-transition { backdrop-filter: none; transition-duration: .01ms; }
}

.reduce-page-motion .page-transition-spinner,
.reduce-page-motion.page-is-ready .main-content { animation: none; }

/* 0.17.0 · Kompakte, gegliederte Portalnavigation */
.app-frame > .sidebar {
  padding: 12px 10px 10px;
}

.sidebar-top {
  padding: 0 4px 6px;
}

.brand-logo-full {
  width: min(100%, 108px);
  max-height: 108px;
}

.sidebar-nav {
  padding: 2px 3px 9px;
}

.nav-group {
  gap: 3px;
}

.nav-group + .nav-group {
  margin-top: 11px;
  padding-top: 10px;
}

.nav-label {
  padding: 6px 9px 5px;
  font-size: .61rem;
}

.nav-link,
.nav-search,
.nav-section > summary {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aeb7c6;
  background: transparent;
  font-size: .79rem;
  font-weight: 680;
  line-height: 1.2;
  text-align: left;
}

.nav-link {
  padding-left: 10px;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .78;
}

.nav-text,
.nav-search > span,
.nav-section > summary > span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link:hover .nav-icon,
.nav-link.is-active .nav-icon,
.nav-search:hover .nav-icon,
.nav-section > summary:hover .nav-icon {
  opacity: 1;
}

.nav-search {
  margin: 4px 0 3px;
  border-color: rgba(255,255,255,.07);
  background: rgba(255,255,255,.018);
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.nav-search:hover,
.nav-search:focus-visible {
  color: #fff;
  border-color: rgba(22,216,255,.2);
  background: rgba(22,216,255,.045);
  outline: none;
}

.nav-search kbd {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 5px;
  color: #7e899a;
  background: rgba(3,6,14,.45);
  font-size: .54rem;
  font-family: inherit;
  font-weight: 800;
}

.nav-section {
  min-width: 0;
}

.nav-section > summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.nav-section > summary::-webkit-details-marker {
  display: none;
}

.nav-section > summary:hover,
.nav-section > summary:focus-visible,
.nav-section[open] > summary {
  color: #f5f7fb;
  background: rgba(255,255,255,.032);
}

.nav-section > summary:focus-visible {
  border-color: rgba(22,216,255,.28);
  outline: none;
}

.nav-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .55;
  transition: transform .18s ease;
}

.nav-section[open] > summary .nav-chevron {
  transform: rotate(90deg);
}

.nav-section-links {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 2px 0 4px 17px;
  padding-left: 7px;
  border-left: 1px solid rgba(255,255,255,.07);
}

.nav-section-links .nav-link {
  min-height: 34px;
  padding-inline: 8px;
  font-size: .74rem;
}

.nav-section-links .nav-link::before {
  top: 8px;
  bottom: 8px;
}

.nav-section-links .nav-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.sidebar-footer {
  padding: 9px 4px 1px;
}

.identity {
  gap: 8px;
  padding-block: 3px 7px;
}

.identity .avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

@media (max-height: 760px) and (min-width: 921px) {
  .brand-logo-full {
    width: 82px;
    max-height: 82px;
  }

  .nav-link,
  .nav-search,
  .nav-section > summary {
    min-height: 35px;
  }

  .nav-section-links .nav-link {
    min-height: 32px;
  }
}

@media (max-width: 920px) {
  .app-frame > .sidebar {
    width: min(90vw, 300px);
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .nav-link,
  .nav-search,
  .nav-section > summary {
    min-height: 42px;
  }

  .nav-section-links .nav-link {
    min-height: 39px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-chevron {
    transition: none;
  }
}

/* CSP-sichere, quantisierte Balkenhöhen für den Betriebsverlauf. */
.operations-trend-point i { height: 2px; }
.operations-trend-point i.trend-h-1 { height: 5%; }
.operations-trend-point i.trend-h-2 { height: 10%; }
.operations-trend-point i.trend-h-3 { height: 15%; }
.operations-trend-point i.trend-h-4 { height: 20%; }
.operations-trend-point i.trend-h-5 { height: 25%; }
.operations-trend-point i.trend-h-6 { height: 30%; }
.operations-trend-point i.trend-h-7 { height: 35%; }
.operations-trend-point i.trend-h-8 { height: 40%; }
.operations-trend-point i.trend-h-9 { height: 45%; }
.operations-trend-point i.trend-h-10 { height: 50%; }
.operations-trend-point i.trend-h-11 { height: 55%; }
.operations-trend-point i.trend-h-12 { height: 60%; }
.operations-trend-point i.trend-h-13 { height: 65%; }
.operations-trend-point i.trend-h-14 { height: 70%; }
.operations-trend-point i.trend-h-15 { height: 75%; }
.operations-trend-point i.trend-h-16 { height: 80%; }
.operations-trend-point i.trend-h-17 { height: 85%; }
.operations-trend-point i.trend-h-18 { height: 90%; }
.operations-trend-point i.trend-h-19 { height: 95%; }
.operations-trend-point i.trend-h-20 { height: 100%; }

/* 0.13.0 · Audit und Admin-Arbeitszentrale */
.action-center-hero,.audit-hero{border-color:rgba(22,216,255,.17);background:radial-gradient(circle at 88% 4%,rgba(171,82,255,.105),transparent 38%),linear-gradient(145deg,rgba(13,22,40,.96),rgba(8,12,26,.94))}.text-danger{color:#ff9bad!important}.panel-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.panel-actions form{margin:0}
.action-summary-grid{margin:0 0 18px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px}.action-summary-card{min-width:0;min-height:88px;padding:14px;display:grid;align-content:center;gap:5px;border:1px solid rgba(255,255,255,.065);border-radius:13px;background:rgba(255,255,255,.019);transition:border-color .16s,background .16s,transform .16s}.action-summary-card:hover{transform:translateY(-1px);border-color:rgba(22,216,255,.22);background:rgba(22,216,255,.035)}.action-summary-card span{color:var(--muted);font-size:.7rem;font-weight:850;letter-spacing:.055em;text-transform:uppercase}.action-summary-card strong{font-size:1.4rem;line-height:1}.action-summary-card small{color:var(--muted);font-size:.69rem}.action-summary-card.is-clear{border-color:rgba(67,214,154,.2);background:rgba(67,214,154,.035)}
.action-center-filters{grid-template-columns:repeat(2,minmax(190px,1fr)) auto}.action-center-panel{padding:0;overflow:hidden}.action-center-panel>.panel-head{padding:18px 19px;margin:0;border-bottom:1px solid rgba(255,255,255,.06)}.action-center-list{display:grid}.action-center-row{position:relative;min-width:0;min-height:94px;padding:14px 17px;display:grid;grid-template-columns:90px minmax(0,1fr) minmax(130px,auto) 30px;gap:15px;align-items:center;border-bottom:1px solid rgba(255,255,255,.055);background:rgba(255,255,255,.009);transition:background .15s}.action-center-row:last-child{border-bottom:0}.action-center-row:hover{background:rgba(22,216,255,.027)}.action-center-row.is-urgent{box-shadow:inset 3px 0 0 rgba(245,101,124,.7)}.action-center-row.is-attention{box-shadow:inset 3px 0 0 rgba(243,180,85,.65)}.action-center-row.is-normal{box-shadow:inset 3px 0 0 rgba(22,216,255,.45)}.action-center-severity{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.7rem;font-weight:850;text-transform:uppercase}.action-center-severity i{width:8px;height:8px;border-radius:50%;background:var(--neon-cyan);box-shadow:0 0 10px rgba(22,216,255,.35)}.is-urgent .action-center-severity{color:#ff9bad}.is-urgent .action-center-severity i{background:var(--danger);box-shadow:0 0 10px rgba(245,101,124,.4)}.is-attention .action-center-severity{color:#f8ca82}.is-attention .action-center-severity i{background:var(--warning);box-shadow:0 0 10px rgba(243,180,85,.38)}.action-center-copy{min-width:0;display:grid;gap:4px}.action-center-copy small{color:var(--muted);font-size:.69rem;font-weight:800;letter-spacing:.035em;text-transform:uppercase}.action-center-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.84rem}.action-center-copy>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-soft);font-size:.74rem}.action-center-time{display:grid;gap:3px;text-align:right}.action-center-time small{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.action-center-time strong{font-size:.72rem;white-space:nowrap}.action-center-open{width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.08);border-radius:9px;color:#8cecff}.action-center-empty{min-height:220px;display:grid;place-content:center;text-align:center;gap:6px}.action-center-empty strong{font-size:1rem}.action-center-empty span{color:var(--muted);font-size:.75rem}.action-digest-form{display:grid;grid-template-columns:minmax(250px,1fr) minmax(160px,.4fr) minmax(160px,.4fr) auto;gap:10px;align-items:end}.action-digest-form>.filter-check{min-height:68px}.action-digest-form>.button{min-height:42px;margin-bottom:1px}
.audit-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.audit-filter-grid{grid-template-columns:repeat(4,minmax(150px,1fr))}.audit-integrity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.audit-integrity-run{min-width:0;padding:11px 12px;display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:start;border:1px solid rgba(255,255,255,.06);border-radius:11px;background:rgba(255,255,255,.016)}.audit-integrity-run>span{width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(67,214,154,.24);border-radius:9px;color:#77e6b8;background:rgba(67,214,154,.06);font-weight:900}.audit-integrity-run.is-failed>span{border-color:rgba(245,101,124,.28);color:#ff9bad;background:rgba(245,101,124,.07)}.audit-integrity-run>div{min-width:0;display:grid;gap:3px}.audit-integrity-run strong{font-size:.8rem}.audit-integrity-run small{color:var(--muted);font-size:.7rem;overflow-wrap:anywhere}.audit-item.is-critical .activity-dot{background:var(--danger);box-shadow:0 0 12px rgba(245,101,124,.42)}.audit-item.is-important .activity-dot{background:var(--warning);box-shadow:0 0 12px rgba(243,180,85,.38)}.audit-title-line{min-width:0;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.audit-risk,.audit-outcome{min-height:22px;padding:3px 7px;display:inline-flex;align-items:center;border:1px solid rgba(255,255,255,.08);border-radius:999px;color:var(--muted);font-size:.67rem;font-weight:850;text-transform:uppercase}.risk-critical,.outcome-failure{color:#ff9bad;border-color:rgba(245,101,124,.24);background:rgba(245,101,124,.055)}.risk-important{color:#f8ca82;border-color:rgba(243,180,85,.22);background:rgba(243,180,85,.05)}.outcome-success{color:#77e6b8;border-color:rgba(67,214,154,.19);background:rgba(67,214,154,.04)}.audit-meta-list{margin-top:9px;display:flex;flex-wrap:wrap;gap:5px}.audit-meta-list>span{max-width:100%;padding:5px 7px;border:1px solid rgba(255,255,255,.055);border-radius:7px;background:rgba(255,255,255,.017);color:var(--text-soft);font-size:.7rem;overflow-wrap:anywhere}.audit-change-list{margin-top:9px;display:grid;gap:5px}.audit-change-list>div{min-width:0;padding:7px 8px;display:grid;grid-template-columns:minmax(100px,.45fr) minmax(0,1fr) 18px minmax(0,1fr);gap:7px;align-items:center;border:1px solid rgba(22,216,255,.08);border-radius:8px;background:rgba(22,216,255,.018);font-size:.7rem}.audit-change-list b,.audit-change-list span{min-width:0;overflow-wrap:anywhere}.audit-change-list i{text-align:center;color:var(--muted);font-style:normal}.audit-tech-row{margin-top:9px;display:flex;flex-wrap:wrap;gap:5px}.audit-tech-row code{padding:4px 6px;border:1px solid rgba(255,255,255,.05);border-radius:6px;color:var(--muted);background:rgba(5,9,18,.5);font-size:.67rem}
@media(max-width:1050px){.action-center-row{grid-template-columns:85px minmax(0,1fr) minmax(120px,auto) 30px}.action-digest-form{grid-template-columns:repeat(2,minmax(0,1fr))}.audit-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.action-center-filters,.audit-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.action-center-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.action-center-severity{grid-column:1}.action-center-copy{grid-column:1}.action-center-time{grid-column:1;text-align:left;display:flex;gap:7px;align-items:baseline}.action-center-open{grid-column:2;grid-row:1/4}.audit-integrity-grid{grid-template-columns:1fr}.audit-change-list>div{grid-template-columns:1fr}.audit-change-list i{text-align:left;transform:rotate(90deg)}.audit-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.action-center-filters,.action-digest-form,.audit-filter-grid,.audit-metric-grid{grid-template-columns:1fr}.action-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.action-center-panel>.panel-head{align-items:flex-start}.action-center-panel>.panel-head>small{width:auto}.audit-title-line{align-items:flex-start;flex-direction:column}.audit-timeline .timeline-head{align-items:flex-start;flex-direction:column}.audit-tech-row code{width:100%;overflow-wrap:anywhere}.audit-integrity-run{grid-template-columns:26px minmax(0,1fr);padding:10px}.audit-integrity-run>span{width:25px;height:25px}}
@media(prefers-reduced-motion:reduce){.action-summary-card,.action-center-row{transition:none}.action-summary-card:hover{transform:none}}

/* 0.18.0 · Fixed portal and connection status bar */
:root {
  --status-bar-h: 41px;
}

.app-frame > .main-content {
  padding-bottom: calc(var(--status-bar-h) + 24px + env(safe-area-inset-bottom));
}

.guest-shell .main-content {
  padding-bottom: calc(var(--status-bar-h) + 24px + env(safe-area-inset-bottom));
}

.portal-status-bar {
  position: fixed;
  z-index: 55;
  right: 0;
  bottom: 0;
  left: var(--sidebar-w);
  height: calc(var(--status-bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid rgba(119, 232, 255, .13);
  background: linear-gradient(90deg, rgba(7, 12, 23, .965), rgba(9, 14, 27, .985));
  box-shadow: 0 -9px 28px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .025);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #7f899b;
}

.guest-shell .portal-status-bar {
  left: 0;
}

.portal-status-scroll {
  width: min(100%, var(--content-max));
  height: var(--status-bar-h);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  display: flex;
  align-items: center;
  gap: clamp(13px, 1.7vw, 25px);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  white-space: nowrap;
}

.portal-status-scroll::-webkit-scrollbar {
  display: none;
}

.portal-status-item {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .66rem;
  line-height: 1;
}

.portal-status-label {
  color: #687386;
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.portal-status-item strong,
.portal-status-item time {
  color: #c8d0dc;
  font: inherit;
  font-weight: 750;
  letter-spacing: .01em;
}

.portal-status-instance strong {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-status-separator {
  width: 1px;
  height: 16px;
  flex: 0 0 1px;
  background: rgba(255, 255, 255, .08);
}

.portal-status-copyright {
  margin-left: auto;
  color: #566175;
  font-size: .62rem;
}

.portal-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #6d7789;
  box-shadow: 0 0 0 3px rgba(109, 119, 137, .08);
}

.portal-status-dot.is-good {
  background: #43d69a;
  box-shadow: 0 0 9px rgba(67, 214, 154, .6);
}

.portal-status-dot.is-fair {
  background: #16d8ff;
  box-shadow: 0 0 9px rgba(22, 216, 255, .55);
}

.portal-status-dot.is-slow {
  background: #f3b455;
  box-shadow: 0 0 9px rgba(243, 180, 85, .55);
}

.portal-status-dot.is-offline {
  background: #f5657c;
  box-shadow: 0 0 9px rgba(245, 101, 124, .55);
}

.portal-status-dot.is-pending {
  animation: portal-status-pulse 1.15s ease-in-out infinite;
}

.portal-status-live.is-updated {
  animation: portal-status-refresh .62s ease-out;
}

.portal-toast-stack {
  bottom: calc(var(--status-bar-h) + 13px + env(safe-area-inset-bottom));
}

@keyframes portal-status-pulse {
  50% { opacity: .35; transform: scale(.76); }
}

@keyframes portal-status-refresh {
  0% { color: #fff; text-shadow: 0 0 12px rgba(22, 216, 255, .72); transform: translateY(-1px); }
  100% { color: #c8d0dc; text-shadow: none; transform: translateY(0); }
}

@media (max-width: 920px) {
  .portal-status-bar {
    left: 0;
  }

  .portal-status-scroll {
    width: 100%;
    padding-inline: 14px;
    gap: 18px;
  }

  .app-frame > .main-content {
    padding-bottom: calc(var(--status-bar-h) + 20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  :root {
    --status-bar-h: 39px;
  }

  .portal-status-scroll {
    padding-inline: 11px;
    gap: 15px;
  }

  .portal-status-separator {
    display: none;
  }

  .portal-status-item {
    font-size: .62rem;
  }

  .portal-status-label {
    font-size: .53rem;
  }

  .portal-status-copyright {
    margin-left: 0;
    font-size: .58rem;
  }

  .portal-toast-stack {
    right: 8px;
    bottom: calc(var(--status-bar-h) + 9px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-status-dot.is-pending,
  .portal-status-live.is-updated {
    animation: none;
  }
}
