:root {
  --bg: #080c10;
  --bg-elevated: #121a24;
  --bg-tile: #1a2634;
  --text: #f8fafc;
  --text-muted: #c5d0dc;
  --accent: #34c48e;
  --accent-hover: #45d89f;
  --danger: #ff6b6b;
  --border: #445566;
  --radius: 16px;
  --radius-sm: 10px;
  --touch: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.app {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.noscript {
  padding: 1.5rem;
  text-align: center;
}

.boot-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.boot-fallback__detail {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  opacity: 0.75;
  word-break: break-word;
}

.boot-fallback__btn {
  min-height: var(--touch);
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-tile);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Auth */
.app--auth {
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.auth-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.auth-card .subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 1rem;
}

.settings-group {
  margin: 0 0 1.5rem;
  padding: 0 0 0.25rem;
  border: none;
  border-bottom: 1px solid var(--border);
}

.settings-group:last-of-type {
  border-bottom: none;
}

.settings-group legend {
  padding: 0;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: var(--touch);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0d1218;
  color: var(--text);
  font-size: 1rem;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-password {
  position: relative;
}

.field-password input {
  padding-right: 3rem;
}

.field-password__toggle {
  position: absolute;
  top: 50%;
  right: 0.2rem;
  transform: translateY(-50%);
  width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.field-password__toggle:hover,
.field-password__toggle:focus-visible {
  color: var(--text);
}

.field-password__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn--primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

.btn--primary:active {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert--error {
  background: rgba(255, 107, 107, 0.18);
  border: 1px solid var(--danger);
  color: #ffd4d4;
}

.alert--info {
  background: rgba(52, 196, 142, 0.15);
  border: 1px solid var(--accent);
  color: #d8f5e8;
}

/* UI-Regel: Globale Kopfzeile — Startseite + Admin; in Apps ausgeblendet (siehe projektplan.md). */
.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.shell-header--global {
  flex-shrink: 0;
}

.banner--email-required {
  background: #5c1a1a;
  color: #ffb4b4;
}

.shell-header h1 {
  margin: 0;
  font-size: 1.15rem;
  flex: 1;
  min-width: 0;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
}

.lang-switch button {
  min-height: 36px;
  min-width: 36px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.lang-switch button.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(52, 196, 142, 0.12);
  font-weight: 700;
}

/* Tile grid */
.shell-main {
  flex: 1;
  padding: 1rem;
  padding-bottom: calc(4.5rem + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 120px;
  padding: 1rem;
  background: var(--bg-tile);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s, border-color 0.15s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tile:active {
  transform: scale(0.97);
  border-color: var(--accent);
}

.tile__icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.tile__badge,
.utilix-unread-badge {
  position: absolute;
  top: -6px;
  right: -12px;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2.5px var(--bg-tile), 0 2px 8px rgba(52, 196, 142, 0.45);
  z-index: 1;
  pointer-events: none;
}

.tile__icon img {
  width: 32px;
  height: 32px;
}

.tile__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.tile--add {
  border-style: dashed;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0.5rem calc(0.5rem + var(--safe-bottom));
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  z-index: 20;
}

.bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-height: var(--touch);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
}

.bottom-nav button.is-active {
  color: var(--text);
  font-weight: 700;
}

.bottom-nav button.is-active .nav-icon {
  color: var(--accent);
}

.bottom-nav .nav-icon {
  font-size: 1.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav .utilix-unread-badge {
  top: -5px;
  right: -10px;
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 2px 6px rgba(52, 196, 142, 0.4);
}

/* Module view */
.module-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: calc(4.5rem + var(--safe-bottom));
}

.module-view--app {
  min-height: 0;
}

.module-view--chat {
  padding-bottom: 0;
  overflow: hidden;
}

/* Modul-Leiste: Zurück + Titel oder Tab-Menü (UI-Regel 2, siehe projektplan.md). */
.module-view__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.module-view__bar > #btn-back {
  min-width: var(--touch);
  min-height: var(--touch);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.module-view__bar--tabs {
  gap: 0.5rem;
}

/* UI-Regel: Modul-Tabs — Button-Optik; aktiver Tab hervorgehoben (siehe projektplan.md). */
.module-bar-tabs {
  display: flex;
  flex: 1;
  gap: 0.35rem;
  min-width: 0;
  align-items: center;
}

.module-bar-tabs__btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 32px;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tile);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.module-bar-tabs__btn:active {
  background: var(--bg-elevated);
}

.module-bar-tabs__btn.is-active {
  background: var(--bg-tile);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.module-view__content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.module-view--chat .module-view__content {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.muted {
  color: var(--text-muted);
}

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

.kv-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.kv-list li:last-child {
  border-bottom: none;
}

.kv-list .muted {
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.data-table--users td {
  vertical-align: middle;
}

.data-table--users .btn-edit-user:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.users-admin {
  width: 100%;
  max-width: none;
}

.users-admin__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.75rem;
}

.users-admin__header h2 {
  margin: 0;
}

.users-admin__ws-hint {
  margin: 0;
  font-size: 0.8rem;
}

.users-admin__list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.users-admin__block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 0.85rem;
}

.users-admin__user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.users-admin__identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.users-admin__meta {
  font-size: 0.78rem;
  word-break: break-word;
}

.users-admin__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: auto;
}

.users-admin__user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.users-admin__user-actions .btn,
.users-admin__device-actions .btn {
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}

.users-admin__user-actions .btn:disabled,
.users-admin__device-actions .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.users-admin__devices {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}

.users-admin__devices-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.users-admin__empty {
  margin: 0;
  font-size: 0.85rem;
}

.users-admin__device-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.users-admin__device {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.users-admin__device-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.users-admin__device-name {
  font-size: 0.9rem;
}

.users-admin__device-seen {
  font-size: 0.75rem;
}

.users-admin__reach {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.users-admin__device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.users-admin__old {
  margin-top: 0.65rem;
}

.users-admin__old summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.35rem 0;
}

.users-admin__old summary:hover {
  color: var(--text);
}

.users-admin__device-list--old {
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .users-admin__device {
    grid-template-columns: minmax(12rem, 1.4fr) minmax(12rem, 1fr) auto;
    align-items: center;
  }

  .users-admin__device-actions {
    justify-content: flex-end;
  }
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.user-cell__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tile);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.user-cell__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-cell__name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dialog */
.utilix-dialog {
  border: none;
  padding: 0;
  margin: auto;
  max-width: calc(100vw - 2rem);
  width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  background: transparent;
}

.utilix-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.utilix-dialog__panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  max-height: calc(100dvh - 2rem);
  min-height: 0;
  overflow: hidden;
}

.utilix-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.utilix-dialog__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.utilix-dialog__close {
  min-width: var(--touch);
  min-height: var(--touch);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.utilix-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.utilix-dialog__subtitle {
  margin: 0;
  padding: 0.75rem 1rem 0;
  font-size: 0.85rem;
}

.utilix-dialog__panel .field {
  padding: 0 1rem;
  margin-bottom: 0.75rem;
}

.utilix-dialog__body .field:first-of-type {
  margin-top: 0.75rem;
}

.utilix-dialog__panel .alert {
  margin: 0.75rem 1rem 0;
}

.field--checkbox {
  padding-bottom: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--touch);
  cursor: pointer;
}

.checkbox-label input {
  width: 1.15rem;
  height: 1.15rem;
}

.utilix-dialog__actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
  flex-shrink: 0;
}

.utilix-dialog__actions .btn {
  flex: 1;
}

@media (min-width: 480px) {
  .utilix-dialog {
    width: 420px;
  }
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--bg);
}

.badge--ok { color: var(--accent); }
.badge--off { color: var(--danger); }

.offline-banner {
  background: #5c4a1a;
  color: #ffe9a8;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
}

.banner--notify {
  display: block;
  width: 100%;
  border: none;
  background: #1a3d32;
  color: #b8f5d8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hidden { display: none !important; }

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

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar__initials {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-avatar__btn {
  min-height: 40px;
  cursor: pointer;
}

.profile-avatar__remove {
  min-height: 36px;
  font-size: 0.85rem;
  color: var(--danger) !important;
  border-color: transparent !important;
}

.profile-hero__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-hero__username {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.shell-header__user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem 0;
}

.shell-header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
}

.shell-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shell-header__label {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 96px;
  font-weight: 600;
}

.lang-switch--profile {
  justify-content: flex-start;
}

.lang-switch--profile button {
  min-height: var(--touch);
  min-width: 5.5rem;
  padding: 0 1rem;
  font-size: 0.9rem;
}

.card--danger {
  border-color: var(--danger);
}

.card--danger h2 {
  color: #ffb4b4;
}

.card--security {
  border-color: #3ecf8e;
  background: linear-gradient(165deg, rgba(62, 207, 142, 0.12) 0%, var(--card) 55%);
  position: relative;
  overflow: hidden;
}

.security-feature__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0d2818;
  background: #3ecf8e;
}

.security-feature__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.security-feature__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.security-feature__lead {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.security-feature__list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.security-feature__list li + li {
  margin-top: 0.35rem;
}

.security-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.security-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.security-toggle__track {
  flex-shrink: 0;
  width: 3rem;
  height: 1.75rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.security-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.security-toggle input:checked + .security-toggle__track {
  background: #3ecf8e;
  border-color: #3ecf8e;
}

.security-toggle input:checked + .security-toggle__track::after {
  transform: translateX(1.25rem);
}

.security-toggle input:focus-visible + .security-toggle__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.security-toggle__label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.security-toggle__hint {
  font-size: 0.8rem;
}

.security-feature__status {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.security-feature__status.is-active {
  color: #9ef0c8;
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.1);
}

.chat-view__security-notice {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}

.chat-view__security-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-align: center;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  background: #fff;
  border-radius: var(--radius);
  margin: 0 auto;
  max-width: 280px;
}

.share-expiry {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.share-expiry__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.share-expiry--green {
  color: #8ef0b8;
  background: rgba(52, 196, 142, 0.15);
  border-color: rgba(52, 196, 142, 0.45);
}

.share-expiry--yellow {
  color: #ffd978;
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.45);
}

.share-expiry--red {
  color: #ffb4b4;
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.45);
}

.qr-scanner-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0.75rem auto 0;
}

.qr-scanner-wrap[hidden] {
  display: none;
}

.qr-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.contact-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list__item:last-child {
  border-bottom: none;
}

.contact-list__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.contact-list__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.contact-list__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-list__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.contact-list__meta strong {
  font-size: 0.95rem;
}

.contact-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.contacts-panel {
  width: 100%;
  max-width: 100%;
}

.app-catalog {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-catalog__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.app-catalog__item:last-child {
  border-bottom: none;
}

.app-catalog__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.app-catalog__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}

.app-catalog__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-catalog__meta strong {
  display: block;
  font-size: 0.95rem;
}

.app-catalog__meta .badge {
  margin-top: 0.25rem;
}

.btn--sm {
  min-height: 36px;
  padding: 0 0.65rem;
  font-size: 0.8rem;
}

.qr-image {
  display: block;
  width: 240px;
  height: 240px;
  image-rendering: pixelated;
}

.chat-list-wrap {
  margin: 0;
}

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

.chat-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.25rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.chat-list__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-list__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-list__body {
  flex: 1;
  min-width: 0;
}

.chat-list__top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-list__preview {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list__time {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.chat-list__badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.chat-view__name {
  flex: 1;
  min-width: 0;
}

.chat-conn-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.45rem 0.75rem 0.45rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: relative;
}

.chat-conn-bar__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.chat-conn-version {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.62rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0.85;
  user-select: all;
}

.chat-conn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 3.25rem;
}

.chat-conn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, box-shadow 0.2s;
}

.chat-conn-dot--on {
  background: #3ecf8e;
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.55);
}

.chat-conn-dot--off {
  background: #e85d5d;
  box-shadow: 0 0 6px rgba(232, 93, 93, 0.35);
}

.chat-conn-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-view__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-view__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-view__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-view__name {
  font-size: 1rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-view__back {
  min-width: var(--touch);
  min-height: var(--touch);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.chat-view__messages-area {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-view__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.chat-view__scroll-down {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-view__scroll-down--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-view__scroll-down:active {
  transform: translateY(0) scale(0.96);
}

.chat-view__empty {
  text-align: center;
  margin: auto;
}

.chat-view__composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.65rem 0.75rem calc(0.65rem + 4.5rem + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-view__composer--minimal {
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.chat-view__banner {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chat-view__conn {
  margin-left: auto;
  font-size: 0.75rem;
}

.chat-bubble__text {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.chat-bubble__seq-id {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.chat-bubble__meta-item {
  margin-right: 0.45rem;
  font-size: 0.75rem;
  opacity: 0.85;
}

.chat-bubble__status {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.95;
}

.chat-bubble__status--local { color: #888; }
.chat-bubble__status--server { color: #c27c0e; }
.chat-bubble__status--delivered { color: #2a7a4b; }
.chat-bubble__status--read { color: #1a5fb4; }

.chat-view__composer-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-view__attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.chat-view__composer-error {
  margin: 0 0 0.35rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

.chat-image-debug {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  max-height: 10rem;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 2;
}

.chat-image-debug--error {
  border-bottom-color: #c62828;
  background: rgba(198, 40, 40, 0.1);
}

.chat-image-debug--warn {
  border-bottom-color: #f9a825;
  background: rgba(249, 168, 37, 0.12);
}

.chat-image-debug__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.chat-image-debug__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-image-debug__status {
  font-size: 0.68rem;
  color: var(--muted, #666);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-image-debug__send,
.chat-image-debug__clear {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
}

.chat-image-debug__log {
  margin: 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 7.5rem;
  overflow-y: auto;
  color: var(--text);
}

.chat-view__composer textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  max-height: 160px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.chat-view__composer-actions {
  display: flex;
  justify-content: flex-end;
}

.chat-view__send {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble__time {
  font-size: 0.7rem;
  opacity: 0.75;
}

.chat-bubble__media {
  margin: 0;
}

.chat-bubble--media {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.chat-bubble--out.chat-bubble--media {
  background: transparent;
  color: var(--text);
}

.chat-bubble--out.chat-bubble--media .chat-bubble__image-fallback {
  color: var(--text);
  background: var(--bg-tile);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.chat-bubble--preview.chat-bubble--out {
  color: var(--text);
}

.chat-bubble__media-wrap {
  position: relative;
  display: block;
  width: 280px;
  max-width: calc(100vw - 2.5rem);
  line-height: 0;
}

.chat-bubble__media-wrap .chat-bubble__meta--overlay {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  margin: 0;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  line-height: normal;
  z-index: 1;
}

.chat-bubble__media-wrap .chat-bubble__time {
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
}

.chat-bubble__media-wrap .chat-bubble__status {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

.chat-bubble__seq {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.82;
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.chat-bubble__meta--overlay .chat-bubble__seq {
  color: rgba(255, 255, 255, 0.9);
}

.chat-bubble__image {
  display: block;
  width: auto;
  max-width: 280px;
  height: auto;
  max-height: 360px;
  border-radius: 10px;
  border: 2px solid rgba(52, 196, 142, 0.55);
  object-fit: contain;
  background: #1a2433;
  vertical-align: top;
}

.chat-bubble__image-fallback {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  min-height: 80px;
  line-height: 1.35;
  width: 100%;
  box-sizing: border-box;
}

.chat-bubble__image-fallback--lost {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  font-style: italic;
}

.chat-bubble--preview .chat-bubble__image {
  opacity: 0.92;
}

.chat-bubble--preview-error .chat-bubble__image {
  opacity: 0.55;
}

.chat-bubble__preview-error {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  line-height: 1.2;
  color: #ffb4b4;
}

.chat-bubble__file {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
}

.chat-bubble__file-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.chat-bubble__file-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.chat-bubble__file-name {
  font-weight: 600;
  word-break: break-all;
}

.chat-bubble__file-size {
  font-size: 0.75rem;
}

.chat-bubble__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.chat-bubble__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  padding: 0.14rem 0.38rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.chat-bubble__status--pending {
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.1rem;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-bubble__status--sent,
.chat-bubble__status--read {
  color: #fff;
}

.chat-bubble--in {
  align-self: flex-start;
  background: var(--bg-tile);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-bubble--out {
  align-self: flex-end;
  background: #1f8f66;
  color: #fff;
}

.profile-actions {
  padding: 0;
}

.profile-actions__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}

.profile-actions__summary::-webkit-details-marker {
  display: none;
}

.profile-actions__title {
  font-size: 1rem;
  font-weight: 700;
}

.profile-actions__chevron {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.profile-actions[open] > .profile-actions__summary .profile-actions__chevron {
  transform: rotate(90deg);
}

.profile-actions__list {
  list-style: none;
  margin: 0;
  padding: 0 1rem 0.5rem;
}

.profile-actions__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.profile-actions__link--danger {
  color: var(--danger);
}

.subpage-view {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: -1rem;
}

.subpage-view__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.subpage-view__back {
  min-width: var(--touch);
  min-height: var(--touch);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.subpage-view__title {
  font-size: 1rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subpage-view__body {
  flex: 1;
  padding: 1rem;
}

.profile-logout-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-logout-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.debug-reload-btn {
  position: fixed;
  right: 0.75rem;
  bottom: calc(5.5rem + var(--safe-bottom));
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px dashed var(--accent);
  background: rgba(18, 26, 36, 0.94);
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.admin-comm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.admin-comm-card {
  padding: 0.75rem;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--border, #2a3544);
  background: var(--bg-elevated, #121a24);
}

.admin-comm-card.is-error {
  border-color: var(--danger, #e55);
}

.admin-comm-card__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted, #8a9bb0);
  margin-bottom: 0.25rem;
}

.admin-comm-card strong {
  font-size: 1.1rem;
}

.admin-comm-monitor h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.admin-comm-table code {
  font-size: 0.8rem;
}

.admin-comm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 0.5rem;
}

.admin-comm-search {
  flex: 1 1 12rem;
  min-width: 0;
}

.admin-comm-search input {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--border, #2a3544);
  background: var(--bg, #0d1117);
  color: var(--text, #e6edf3);
  font: inherit;
}

.admin-comm-search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-comm-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-comm-export-wrap {
  position: relative;
}

.admin-comm-export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 10rem;
  padding: 0.35rem;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--border, #2a3544);
  background: var(--bg-elevated, #121a24);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.admin-comm-export-menu[hidden] {
  display: none !important;
}

.admin-comm-paused-hint {
  margin: 0.25rem 0 0.5rem;
  color: var(--warn, #e9a23b);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
