html,
body {
  height: 100%;
}

* {
  box-sizing: border-box;
}

:root {
  --mobile-header-shell-height-initial: 0px;
  --panel-bg: var(--theme-surface);
  --panel-border: var(--theme-border);
  --accent: var(--theme-accent);
  --accent-strong: var(--theme-accent-strong);
  --accent-rgb: var(--theme-accent-rgb);
  --field-bg: var(--theme-input-bg);
  --bg: var(--theme-bg);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --shadow: var(--theme-shadow);
  --overlay: var(--theme-overlay);
  --focus-ring: var(--theme-focus-ring);
  --button-bg: var(--theme-button-bg);
  --button-text: var(--theme-button-text);
  --button-bg-hover: var(--theme-button-bg-hover);
  --chat-bubble-bg: var(--theme-chat-bubble-bg);
  --chat-bubble-border: var(--theme-chat-bubble-border);
  --chat-own-bg: var(--theme-chat-own-bg);
  --chat-own-border: var(--theme-chat-own-border);
  --chat-checks: var(--theme-chat-checks);
  --status-new-bg: var(--theme-status-new-bg);
  --status-new-text: var(--theme-status-new-text);
  --status-in-progress-bg: var(--theme-status-in-progress-bg);
  --status-in-progress-text: var(--theme-status-in-progress-text);
  --status-done-bg: var(--theme-status-done-bg);
  --status-done-text: var(--theme-status-done-text);
  --status-rejected-bg: var(--theme-status-rejected-bg);
  --status-rejected-text: var(--theme-status-rejected-text);
  --badge-danger-bg: var(--theme-badge-danger-bg);
  --badge-danger-text: var(--theme-badge-danger-text);
  --badge-warning-bg: var(--theme-badge-warning-bg);
  --badge-warning-text: var(--theme-badge-warning-text);
  --search-cancel-filter: none;
}

html.mobile-admin-preview {
  --mobile-header-shell-height-initial: 156px;
}

html.mobile-admin-preview[data-admin-bootstrap-role="Главный администратор"],
html.mobile-admin-preview[data-admin-bootstrap-role="Администратор"] {
  --mobile-header-shell-height-initial: 216px;
}

html.mobile-admin-preview[data-admin-bootstrap-role="Трейдер"] {
  --mobile-header-shell-height-initial: 148px;
}

html.mobile-admin-preview[data-admin-bootstrap-role="Сотрудник"] {
  --mobile-header-shell-height-initial: 124px;
}

:root[data-theme="dark"] {
  --search-cancel-filter: invert(1) brightness(1.2);
}

body {
  margin: 0;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

.hidden {
  display: none;
}

body.mobile-admin-preview {
  background: var(--bg);
  --admin-app-height: 100dvh;
  --admin-keyboard-inset: 0px;
  --mobile-header-fade-progress: 0;
  --mobile-header-translate: 0px;
  --mobile-header-shell-height: var(--mobile-header-shell-height-initial);
  --device-screen-width: 375px;
  --device-screen-height: 812px;
  --device-frame-padding: 7px;
  --device-frame-radius: 34px;
  --device-screen-radius: 26px;
  --device-notch-width: 124px;
  --device-notch-height: 24px;
  --device-toolbar-padding: 14px 12px 10px;
  --device-table-padding: 10px 12px 12px;
  --device-filter-height: 34px;
  --device-filter-font: 0.84rem;
  --device-card-padding: 16px 14px;
  --device-card-min-height: 0;
  min-height: var(--admin-app-height);
  height: var(--admin-app-height);
  max-height: var(--admin-app-height);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

html.mobile-admin-preview body {
  --mobile-header-shell-height: var(--mobile-header-shell-height-initial);
}

body.mobile-admin-preview[data-device="android-tall"] {
  --device-screen-width: 360px;
  --device-screen-height: 800px;
  --device-frame-padding: 6px;
  --device-frame-radius: 30px;
  --device-screen-radius: 24px;
  --device-notch-width: 92px;
  --device-notch-height: 16px;
  --device-toolbar-padding: 12px 10px 8px;
  --device-table-padding: 8px 10px 10px;
  --device-filter-height: 34px;
  --device-filter-font: 0.8rem;
}

body.mobile-admin-preview[data-device="android-compact"] {
  --device-screen-width: 360px;
  --device-screen-height: 640px;
  --device-frame-padding: 6px;
  --device-frame-radius: 28px;
  --device-screen-radius: 22px;
  --device-notch-width: 82px;
  --device-notch-height: 14px;
  --device-toolbar-padding: 10px 9px 8px;
  --device-table-padding: 8px 9px 10px;
  --device-filter-height: 34px;
  --device-filter-font: 0.76rem;
}

body.mobile-admin-preview.overlay-open {
  overflow: hidden;
}

html[data-page-transition="pending"] .admin-shell,
html[data-page-transition="pending"] .overlay,
html[data-page-transition="pending"] .admin-toast {
  opacity: 0;
  visibility: hidden;
}

html[data-admin-initializing="pending"] .admin-shell,
html[data-admin-initializing="pending"] .overlay,
html[data-admin-initializing="pending"] .admin-toast {
  opacity: 0;
  visibility: hidden;
}

html[data-page-transition="pending"] body > :not(.transition-boot-overlay) {
  opacity: 0 !important;
  visibility: hidden !important;
}

html[data-admin-initializing="pending"] body > :not(.transition-boot-overlay) {
  opacity: 0 !important;
  visibility: hidden !important;
}

.admin-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 20px;
  position: relative;
}

body.tab-switching .admin-shell::after {
  content: "";
  position: absolute;
  inset: 110px 20px 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgb(244 246 249 / 0.18), rgb(244 246 249 / 0.06));
  opacity: 1;
  pointer-events: none;
  z-index: 9;
  animation: adminTabSwitchFade 170ms ease;
}

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

:root[data-theme="dark"] .transition-overlay {
  background: var(--bg);
}

.transition-boot-overlay {
  z-index: 189;
}

html[data-page-transition="pending"] .transition-boot-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}

html[data-admin-initializing="pending"] .transition-boot-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}

.transition-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}

.transition-overlay.is-leaving {
  opacity: 0;
}

.transition-loader {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}

.transition-cross {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-block;
  will-change: transform, opacity;
  transform: translateZ(0);
  animation: transitionCrossSpin 1s linear infinite;
}

.transition-cross::before,
.transition-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.transition-cross::before {
  top: 2px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 13px solid var(--accent-strong);
  filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.18));
}

.transition-cross::after {
  bottom: 2px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 13px solid var(--accent-strong);
  filter: drop-shadow(0 0 6px rgb(var(--accent-rgb) / 0.18));
}

.transition-cross {
  overflow: hidden;
}

.transition-cross::before,
.transition-cross::after {
  will-change: transform;
  opacity: 0.95;
}

.transition-cross {
  border-top: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  border-radius: 8px;
}

@keyframes transitionCrossSpin {
  from {
    transform: translateZ(0) rotate(0deg);
  }

  to {
    transform: translateZ(0) rotate(360deg);
  }
}

:root[data-theme="dark"] body.tab-switching .admin-shell::after {
  background: linear-gradient(180deg, rgb(23 33 43 / 0.2), rgb(23 33 43 / 0.08));
}

@keyframes adminTabSwitchFade {
  from {
    opacity: 0.22;
  }

  to {
    opacity: 0;
  }
}

.toolbar,
.table-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-tabs.single-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.admin-tabs.single-tab .admin-tab {
  width: 100%;
}

.admin-tab {
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
}

.admin-tab.active {
  background: rgb(var(--accent-rgb) / 0.14);
  border-color: var(--theme-accent-border-weak);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  font-size: 0.72rem;
}

.badge-danger {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
}

.badge-warning {
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}

.admin-panel-section.hidden {
  display: none;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.toolbar-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 42px;
  min-width: 0;
  flex: 0 0 auto;
}

.toolbar-heading h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.toolbar-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.theme-toggle-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 0;
  align-self: center;
}

.admin-home-link {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  align-self: center;
  justify-content: center;
}

.admin-home-link .control-icon,
.theme-toggle-button .control-icon {
  width: 24px;
  height: 24px;
}

.control-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.control-icon svg {
  width: 100%;
  height: 100%;
}

.admin-home-link .back-icon {
  transform: none;
}

.toolbar,
.table-card,
.admin-tab,
.nav-link,
input,
select,
button,
.status,
.participant-summary-role,
.participant-card-empty,
.participant-summary-toggle,
.participant-pill,
.modal-shell,
#panelNotice {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    opacity 220ms ease;
}

.filters {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

#filterUser {
  width: 340px;
  min-width: 340px;
  max-width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  box-sizing: border-box;
  line-height: 42px;
  caret-color: var(--text);
  color: var(--text);
  border-radius: 12px;
}

#filterUser::placeholder {
  font-size: 0.92em;
  line-height: 42px;
}

#filterStatus,
#filterType,
#historyRequestFilter {
  width: 160px;
  min-width: 160px;
  height: 42px;
  min-height: 42px;
  border-radius: 12px;
}

#filterUser::-webkit-search-decoration,
#filterUser::-webkit-search-results-button {
  -webkit-appearance: none;
}

#filterUser::-webkit-search-cancel-button {
  -webkit-appearance: searchfield-cancel-button;
  cursor: pointer;
  filter: var(--search-cancel-filter);
  opacity: 0.88;
}

body[data-admin-role="Трейдер"] .filters,
body[data-admin-role="Сотрудник"] .filters {
  display: none !important;
}

body[data-admin-role="Администратор"] #adminHomeLink,
body[data-admin-role="Главный администратор"] #adminHomeLink {
  display: none !important;
}

body[data-admin-role="Трейдер"] [data-tab="requests"] .tab-badge,
body[data-admin-role="Сотрудник"] [data-tab="requests"] .tab-badge,
body[data-admin-role="Трейдер"] [data-tab="role-requests"] .tab-badge,
body[data-admin-role="Сотрудник"] [data-tab="role-requests"] .tab-badge {
  display: none !important;
}

input,
select,
button {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  background: var(--field-bg);
  color: var(--text);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-strong) 50%),
    linear-gradient(135deg, var(--accent-strong) 50%, transparent 50%);
  background-position:
    calc(100% - 21px) calc(50% - 2px),
    calc(100% - 15px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

button {
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button:hover,
.nav-link:hover {
  border-color: var(--theme-accent-border-weak);
  box-shadow: var(--theme-accent-glow);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--theme-accent-border-strong);
  box-shadow: var(--focus-ring);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--field-bg);
  color: var(--text);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tg-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 6px;
  border: 1.5px solid var(--theme-accent-border-weak);
  background: var(--field-bg);
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}

.tg-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.tg-checkbox::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--button-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
}

.tg-checkbox:checked::after {
  opacity: 1;
}

.tg-checkbox:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.selection-column {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.stack-list {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#participantsList {
  gap: 0;
}

.participants-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.software-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.software-upload-field {
  min-width: 0;
}

.software-upload-picker-field {
  position: relative;
}

.software-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.software-upload-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 15px;
  border: 1px solid var(--panel-border);
  background: var(--field-bg);
  color: var(--text-color);
  cursor: pointer;
  user-select: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.software-upload-picker:hover {
  border-color: var(--accent);
}

.software-upload-picker:active {
  transform: translateY(1px);
}

.software-upload-selection-state {
  min-height: 20px;
  margin-top: 9px;
  color: var(--muted-text);
  font-size: 0.93rem;
  line-height: 1.35;
  word-break: break-word;
}

.software-upload-button {
  min-width: 120px;
}

.software-upload-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.software-upload-chip {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: var(--field-bg);
  min-width: 0;
}

.software-upload-chip strong {
  display: block;
  padding-right: 22px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.software-upload-chip-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--theme-danger-rgb) / 0.14);
  color: var(--status-rejected-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.software-list {
  gap: 12px;
}

.software-list-toolbar {
  display: flex;
  justify-content: flex-end;
}

.software-card {
  display: grid;
  gap: 12px;
}

.software-card-head {
  margin-bottom: 0;
}

.software-card-copy {
  min-width: 0;
}

.software-card-copy strong {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.software-card-actions {
  margin-top: 0;
}

.pagination-footer {
  margin-top: 16px;
  margin-bottom: 0;
}

.requests-toolbar {
  margin-bottom: 16px;
}

.participants-page-size-field {
  min-width: 116px;
}

.participants-page-size-field select {
  min-width: 84px;
}

.participants-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  margin-left: auto;
}

.participants-page-index {
  color: var(--muted);
  font-size: 0.84rem;
}

.participants-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-nav-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
}

.participants-pagination-actions.single-page .participant-page-button,
.participants-pagination-actions.single-page .request-page-button {
  display: none;
}

.stack-card {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--field-bg);
  padding: 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.stack-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.role-request-requester {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 4px;
}

.role-request-requester > strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.role-request-requester-meta {
  margin-top: 0;
}

.stack-meta {
  color: var(--muted);
  margin-top: 6px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.participant-card {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--panel-border);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.participant-card:first-child {
  border-top: 1px solid var(--panel-border);
}

.participant-card-empty {
  padding: 16px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--field-bg);
}

.participant-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 12px 0;
  background: transparent;
  text-align: left;
}

.participant-summary-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.participant-summary-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.participant-summary-identity span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-summary-role {
  flex-shrink: 0;
  padding: 8px 14px;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent-strong);
  font-size: 0.88rem;
  border-radius: 999px;
}

.participant-summary-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.1);
  box-shadow: none;
}

.participant-summary-toggle:hover,
.participant-summary-toggle:focus-visible {
  border-color: transparent;
  box-shadow: none;
}

.participant-summary-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  font-size: 1.28rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

.participant-details {
  display: grid;
  gap: 2px;
  padding: 18px 0 18px;
  border-top: 1px solid var(--panel-border);
}

.participant-details.hidden {
  display: none;
}

.participant-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-pill {
  display: inline-flex;
  align-items: center;
  margin: 4px 6px 0 0;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgb(var(--accent-rgb) / 0.08);
  overflow: hidden;
  max-width: 100%;
  vertical-align: top;
}

.request-status-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.request-reject-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--status-rejected-bg);
  color: var(--status-rejected-text);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.confirm-shell {
  width: min(360px, 100%);
  max-height: none;
}

.confirm-copy {
  padding: 18px 18px 10px;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.request-reject-button:hover,
.request-reject-button:focus-visible {
  border-color: transparent;
  box-shadow: none;
  filter: brightness(0.98);
}

.participant-pill-link:hover {
  box-shadow: none;
}

.participant-pill-remove {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--panel-border);
  border-radius: 0 999px 999px 0;
  background: rgb(var(--theme-danger-rgb) / 0.1);
  color: var(--status-rejected-text);
  box-shadow: none;
}

.participant-pill-remove:hover {
  border-color: transparent;
  box-shadow: none;
}

.participant-focus-pulse {
  border-color: rgb(var(--accent-rgb) / 0.42) !important;
  box-shadow: var(--focus-ring), var(--shadow);
}

.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.participant-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  width: 100%;
}

.role-management-block {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.role-management-block.has-relation-field {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "role relation"
    "assign relation";
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
}

.role-management-block.has-relation-field > .inline-field:not(.trader-target-field) {
  grid-area: role;
}

.role-management-block.has-relation-field > .trader-target-field {
  grid-area: relation;
  min-width: 0;
}

.role-management-block.has-relation-field > .assign-role-button {
  grid-area: assign;
}

.trader-self-link-block {
  grid-template-columns: minmax(0, 1fr);
}

.participant-inline-tools {
  width: 100%;
  min-width: 0;
}

.participant-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.participant-link-row.has-unlink {
  grid-template-columns: minmax(0, 1fr) 38px 38px;
}

.trader-target-field > span {
  min-height: 19px;
}

.participant-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-left: 0;
  grid-column: 1 / -1;
}

.stack-actions button,
.inline-field select {
  min-height: 38px;
}

.inline-field {
  display: grid;
  gap: 6px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.primary-link,
.secondary-link,
.danger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.1);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.danger-link {
  background: rgb(var(--theme-danger-rgb) / 0.1);
  color: var(--status-rejected-text);
}

.secondary-link {
  background: rgb(var(--accent-rgb) / 0.08);
}

.primary-link {
  background: rgb(var(--accent-rgb) / 0.16);
}

.stack-actions .danger-link,
.stack-actions .secondary-link,
.stack-actions .primary-link {
  width: auto;
}

.participant-actions .danger-link,
.participant-actions .secondary-link,
.participant-actions .primary-link,
.participant-actions .inline-field select,
.participant-actions .inline-field input {
  width: 100%;
}

.participant-actions .assign-role-button {
  width: 100%;
  align-self: start;
}

.participant-inline-tools input,
.participant-inline-tools select {
  width: 100%;
}

.participant-link-button {
  min-width: 38px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
}

.participant-unlink-button {
  min-width: 38px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 0.96rem;
}

.icon-only {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0;
  font-size: 0.9rem;
  box-shadow: none;
}

.admin-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 220;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, -10px, 0);
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.admin-toast.hidden {
  display: none;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

.admin-toast-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 240px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.admin-toast-close {
  grid-column: 2;
  align-self: start;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

.admin-toast-body {
  grid-column: 1;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
}

.trust-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.trust-very_trusted {
  background: #2ea772;
}

.trust-trusted {
  background: #a8ff2f;
}

.trust-neutral {
  background: #d9e1ec;
}

.trust-suspicious {
  background: var(--theme-trust-low);
}

.trust-scam {
  background: var(--theme-trust-bad);
}

.history-diff {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgb(var(--accent-rgb) / 0.08);
  font-size: 0.8rem;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.history-actions {
  margin-top: 10px;
}

.stack-timestamp {
  color: var(--muted);
  font-size: 0.78rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay);
  backdrop-filter: blur(10px);
}

.overlay.hidden {
  display: none;
}

.modal-shell {
  width: min(760px, 100%);
  max-height: min(84vh, 920px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--panel-border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.06rem;
}

.modal-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.icon-only {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.chat-shell {
  width: min(760px, 100%);
  height: min(84vh, 860px);
  max-height: min(84vh, 860px);
}

.chat-messages {
  padding: 18px;
  display: grid;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 340px;
  align-content: end;
}

.chat-empty {
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
}

.chat-message {
  width: min(360px, 74%);
  max-width: min(360px, 74%);
  min-width: min(360px, 74%);
  display: grid;
  gap: 4px;
  padding: 7px 10px 5px;
  border-radius: 18px 18px 18px 10px;
  background: var(--chat-bubble-bg);
  border: 1px solid var(--chat-bubble-border);
  box-shadow: var(--theme-card-shadow);
}

.chat-message.own {
  margin-left: auto;
  background: var(--chat-own-bg);
  border-radius: 18px 18px 10px 18px;
  border-color: var(--chat-own-border);
}

.chat-message-text {
  white-space: pre-wrap;
  line-height: 1.32;
  font-size: 0.88rem;
  word-break: break-word;
}

.chat-message-meta {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.chat-message-time {
  color: inherit;
  font-size: inherit;
}

.chat-message-checks {
  letter-spacing: -0.08em;
  font-weight: 700;
  color: var(--chat-checks);
}

.chat-message-checks.seen {
  color: var(--accent-strong);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 0 18px 18px;
  border-top: 1px solid var(--panel-border);
}

.chat-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 22px;
  border: 1px solid var(--panel-border);
  background: var(--field-bg);
  color: var(--text);
  line-height: 46px;
}

.chat-form input::placeholder {
  color: var(--muted);
  font-size: 0.96rem;
}

.chat-form .submit-button {
  min-width: 112px;
  min-height: 46px;
  border-radius: 18px;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--theme-accent-border-strong);
  box-shadow: var(--focus-ring);
}

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

th,
td {
  border-bottom: 1px solid var(--panel-border);
  text-align: left;
  vertical-align: top;
  padding: 14px 12px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: inherit;
}

.status {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  appearance: none;
}

.status-toggle {
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

.status-toggle:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(0.98);
}

.status-new {
  background: var(--status-new-bg);
  color: var(--status-new-text);
}

.status-in_progress {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress-text);
}

.status-done {
  background: var(--status-done-bg);
  color: var(--status-done-text);
}

.status-rejected {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-text);
}

.meta-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.copy-button {
  display: block;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
  padding-inline: 0;
  padding-block: 0;
  color: inherit;
  text-align: left;
  text-indent: 0;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  align-self: stretch;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  border-radius: 0;
  line-height: inherit;
  font: inherit;
}

.copy-button pre {
  margin: 0;
  padding: 0;
  padding-inline: 0;
  padding-block: 0;
  margin-inline: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  text-indent: 0;
  font: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.request-message-cell {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  justify-items: stretch;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgb(var(--accent-rgb) / 0.04);
}

.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.statistics-toolbar {
  margin-bottom: 16px;
}

.statistics-table th,
.statistics-table td {
  white-space: nowrap;
}

.statistics-card {
  display: grid;
  gap: 12px;
}

.statistics-card-head {
  margin-bottom: 0;
}

.statistics-card-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.statistics-card-title {
  font-size: 1rem;
  line-height: 1.25;
  color: var(--text-color);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.statistics-card-role {
  color: var(--muted);
  font-size: 0.82rem;
}

.statistics-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.statistics-card-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgb(var(--accent-rgb) / 0.06);
  min-width: 0;
}

.statistics-card-label {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.statistics-card-value {
  color: var(--text-color);
  font-size: 1.08rem;
  line-height: 1.1;
}

#panelNotice {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgb(var(--accent-rgb) / 0.1);
}

@media (max-width: 860px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .filters {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: stretch;
  }

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

  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}

@media (max-width: 760px) {
  .admin-shell {
    padding: 18px 12px 28px;
  }

  .admin-tabs {
    gap: 8px;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: var(--field-bg);
  }

  td {
    border-bottom: 0;
    padding: 8px 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  td.hidden {
    display: none;
  }

  .status-select {
    width: 100%;
  }

  .role-management-block.has-relation-field {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "role"
      "assign"
      "relation";
  }
}

body.mobile-admin-preview .admin-shell {
  display: block;
  position: relative;
  max-width: none;
  padding: 0;
  min-height: var(--admin-app-height);
  height: var(--admin-app-height);
  max-height: var(--admin-app-height);
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

body.mobile-admin-preview .mobile-header-shell {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 12;
  min-height: var(--mobile-header-shell-height);
  transform: translate3d(0, var(--mobile-header-translate), 0);
  opacity: 1;
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
}

body.mobile-admin-preview.tab-switching .admin-shell::after {
  inset: calc(var(--mobile-header-shell-height) + 8px) 0 0;
  border-radius: 0;
}

body.mobile-admin-preview .mobile-header-shell > * {
  pointer-events: auto;
}

body.mobile-admin-preview .admin-shell > * {
  min-width: 0;
  max-width: 100%;
}

body.mobile-admin-preview .toolbar,
body.mobile-admin-preview .table-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.mobile-admin-preview .toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 0;
  position: relative;
  z-index: 4;
  padding: 10px 10px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--panel-border);
  overflow: visible;
  contain: paint;
}

html.mobile-admin-preview[data-admin-bootstrap-role="Главный администратор"] .filters.hidden,
html.mobile-admin-preview[data-admin-bootstrap-role="Администратор"] .filters.hidden {
  display: grid;
  visibility: hidden;
  pointer-events: none;
}

html.mobile-admin-preview[data-admin-bootstrap-role] #panelNotice.hidden {
  display: block;
  visibility: hidden;
}

html.mobile-admin-preview[data-admin-bootstrap-role="Администратор"] .admin-tab[data-tab="history"],
html.mobile-admin-preview[data-admin-bootstrap-role="Администратор"] .admin-tab[data-tab="statistics"],
html.mobile-admin-preview[data-admin-bootstrap-role="Трейдер"] .admin-tab[data-tab="role-requests"],
html.mobile-admin-preview[data-admin-bootstrap-role="Трейдер"] .admin-tab[data-tab="history"],
html.mobile-admin-preview[data-admin-bootstrap-role="Трейдер"] .admin-tab[data-tab="statistics"],
html.mobile-admin-preview[data-admin-bootstrap-role="Сотрудник"] .admin-tab[data-tab="participants"],
html.mobile-admin-preview[data-admin-bootstrap-role="Сотрудник"] .admin-tab[data-tab="role-requests"],
html.mobile-admin-preview[data-admin-bootstrap-role="Сотрудник"] .admin-tab[data-tab="history"],
html.mobile-admin-preview[data-admin-bootstrap-role="Сотрудник"] .admin-tab[data-tab="statistics"] {
  display: none !important;
}

body.mobile-admin-preview .admin-tabs {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 8px 10px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--panel-border);
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  contain: paint;
  -webkit-overflow-scrolling: touch;
}

body.mobile-admin-preview .admin-tabs::-webkit-scrollbar {
  display: none;
}

body.mobile-admin-preview .admin-tab {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  min-height: 32px;
  height: auto;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  box-shadow: none;
}

body.mobile-admin-preview .admin-tab.active {
  background: var(--accent-soft);
  border-color: var(--theme-accent-border-weak);
  color: var(--accent-strong);
}

body.mobile-admin-preview .admin-tab.hidden {
  display: none;
}

body.mobile-admin-preview .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  min-width: 15px;
  height: 15px;
  font-size: 0.58rem;
  padding: 0 3px;
  line-height: 1;
}

body.mobile-admin-preview[data-device="android-compact"] .admin-tab,
body.mobile-admin-preview[data-device="android-tall"] .admin-tab {
  font-size: 0.66rem;
  padding: 6px 4px;
}

body.mobile-admin-preview .toolbar-heading h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
}

body.mobile-admin-preview .toolbar-heading {
  align-items: center;
  min-height: 34px;
}

body.mobile-admin-preview .toolbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  align-items: start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-top: 0;
}

body.mobile-admin-preview .filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-column: 1 / 2;
  align-items: start;
}

body.mobile-admin-preview .filters > #filterUser,
body.mobile-admin-preview .filters > #historyRequestFilter {
  grid-column: 1 / -1;
}

body.mobile-admin-preview input,
body.mobile-admin-preview select,
body.mobile-admin-preview button,
body.mobile-admin-preview .nav-link {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--device-filter-height);
  height: var(--device-filter-height);
  padding: 6px 10px;
  font-size: var(--device-filter-font);
  line-height: 1.2;
  border-radius: 12px;
}

body.mobile-admin-preview #filterUser {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: 0 0 34px;
  min-height: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  font-size: 16px !important;
  line-height: 34px !important;
  border-radius: 12px !important;
  display: block;
  align-self: stretch;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box !important;
  caret-color: #000000 !important;
  vertical-align: middle;
}

body.mobile-admin-preview #filterUser::placeholder {
  font-size: 16px !important;
  line-height: 34px !important;
}

body.mobile-admin-preview #filterStatus,
body.mobile-admin-preview #filterType,
body.mobile-admin-preview #historyRequestFilter,
body.mobile-admin-preview .filters .nav-link,
body.mobile-admin-preview .filters button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
}

body.mobile-admin-preview input,
body.mobile-admin-preview select,
body.mobile-admin-preview textarea {
  font-size: 16px;
}

body.mobile-admin-preview .nav-link {
  justify-content: flex-start;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  touch-action: manipulation;
}

body.mobile-admin-preview .admin-home-link {
  position: static;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  margin: 0;
  justify-content: center;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}

body.mobile-admin-preview .theme-toggle-button {
  position: static;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  margin: 0;
  align-self: start;
  justify-content: center;
  grid-column: 3;
  grid-row: 1;
}

body.mobile-admin-preview .overlay {
  padding: 0;
  width: 100vw;
  height: var(--admin-app-height);
  max-height: var(--admin-app-height);
}

body.mobile-admin-preview .modal-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
  border-radius: 0;
  border: 0;
  overflow: hidden;
}

body.mobile-admin-preview .chat-messages,
body.mobile-admin-preview .chat-form,
body.mobile-admin-preview .modal-header {
  padding-left: 12px;
  padding-right: 12px;
}

body.mobile-admin-preview .chat-message {
  max-width: 80%;
  padding: 6px 9px 5px;
  border-radius: 14px;
}

body.mobile-admin-preview .chat-shell {
  min-height: 100%;
  height: var(--admin-app-height);
  max-height: var(--admin-app-height);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

body.mobile-admin-preview .chat-messages {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
}

body.mobile-admin-preview .chat-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  position: sticky;
  bottom: var(--admin-keyboard-inset);
  flex: 0 0 auto;
  background: var(--bg);
  border-top: 1px solid var(--panel-border);
}

body.mobile-admin-preview .chat-form input {
  height: 42px;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 42px;
}

body.mobile-admin-preview .chat-form input::placeholder {
  font-size: 1rem;
}

body.mobile-admin-preview .chat-close-button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  height: 30px;
  font-size: 0.82rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  text-align: center;
}

body.mobile-admin-preview .chat-form .submit-button {
  min-width: 98px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 18px;
}

body.mobile-admin-preview .table-card {
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: calc(8px + var(--mobile-header-shell-height));
  padding-right: 10px;
  padding-bottom: 12px;
  padding-left: 10px;
  background: var(--bg);
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  overflow-anchor: auto;
}

body.mobile-admin-preview #requestsSection {
  position: relative;
  --request-pull-offset: 0px;
}

body.mobile-admin-preview #requestsPullIndicator {
  position: absolute;
  top: calc(var(--mobile-header-shell-height) - 24px);
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, calc(-10px + var(--request-pull-offset)), 0);
  transition: opacity 140ms ease, transform 180ms ease;
}

body.mobile-admin-preview #requestsSection.pull-refresh-visible #requestsPullIndicator {
  opacity: 1;
}

body.mobile-admin-preview #requestsSection.pull-refresh-armed #requestsPullIndicator,
body.mobile-admin-preview #requestsSection.pull-refreshing #requestsPullIndicator {
  opacity: 1;
}

body.mobile-admin-preview .pull-refresh-spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: var(--accent-strong);
  border-right-color: rgb(var(--accent-rgb) / 0.58);
  transform: rotate(0deg) scale(0.82);
  transition: transform 160ms ease, opacity 160ms ease;
  opacity: 0.66;
  animation: pull-refresh-spin 900ms linear infinite;
  animation-play-state: paused;
}

body.mobile-admin-preview #requestsSection.pull-refresh-visible .pull-refresh-spinner {
  opacity: 0.86;
  animation-play-state: running;
}

body.mobile-admin-preview #requestsSection.pull-refresh-armed .pull-refresh-spinner,
body.mobile-admin-preview #requestsSection.pull-refreshing .pull-refresh-spinner {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

body.mobile-admin-preview #requestsSection .request-cards,
body.mobile-admin-preview #requestsSection .requests-toolbar {
  transform: translate3d(0, var(--request-pull-offset), 0);
  transition: transform 180ms ease;
  will-change: transform;
}

@keyframes pull-refresh-spin {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

body.mobile-admin-preview .participant-quick-actions {
  margin-left: 0;
}

body.mobile-admin-preview .participants-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
}

body.mobile-admin-preview .software-upload-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

body.mobile-admin-preview .software-upload-queue {
  grid-template-columns: minmax(0, 1fr);
}

body.mobile-admin-preview .software-list-toolbar {
  justify-content: stretch;
}

body.mobile-admin-preview .software-list-toolbar .secondary-link {
  width: 100%;
}

body.mobile-admin-preview .software-upload-button {
  width: 100%;
}

body.mobile-admin-preview .participants-page-size-field {
  width: 100%;
}

body.mobile-admin-preview .participants-pagination {
  justify-content: center;
  width: 100%;
  margin-left: 0;
}

body.mobile-admin-preview .participants-pagination-actions {
  width: auto;
  gap: 6px;
  justify-content: center;
  margin: 0 auto;
}

body.mobile-admin-preview .statistics-card {
  padding: 13px;
  border-radius: 15px;
}

body.mobile-admin-preview .statistics-card-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.mobile-admin-preview .page-nav-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 0.94rem;
}

body.mobile-admin-preview .participant-actions {
  grid-template-columns: minmax(0, 1fr);
}

body.mobile-admin-preview .participant-quick-actions {
  grid-template-columns: minmax(0, 1fr);
}

body.mobile-admin-preview .admin-toast {
  top: 10px;
  right: 10px;
  left: 10px;
}

body.mobile-admin-preview .admin-toast-shell {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  padding: 12px 12px 12px 14px;
}

body.mobile-admin-preview .admin-toast-close {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
}

body.mobile-admin-preview table {
  display: none;
}

.request-cards,
.scroll-top-button {
  display: none;
}

body.mobile-admin-preview .request-cards {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.mobile-admin-preview .tg-checkbox {
  width: 19px;
  height: 19px;
}

body.mobile-admin-preview .tg-checkbox::after {
  left: 5px;
  top: 1px;
}

body.mobile-admin-preview .scroll-top-button {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-text);
  box-shadow: 0 10px 24px rgb(15 32 56 / 0.24);
}

body.mobile-admin-preview .scroll-top-button.hidden {
  display: none;
}

.request-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel-bg);
  padding: 12px;
  overflow: hidden;
}

.request-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.request-card-head-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
}

.request-card-head-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.request-card-head strong {
  display: block;
  min-width: 0;
  font-size: 0.96rem;
  line-height: 1.05;
}

.request-card-head-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.request-card-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.request-card-details {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-top: 2px;
}

.request-card-details.hidden {
  display: none;
}

.request-card-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.request-card.expanded .request-chat-summary-button {
  display: none;
}

.request-card-type-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.request-card-type-value {
  display: block;
  font-size: 1rem;
  line-height: 1.22;
  font-weight: 700;
  color: var(--text);
}

.request-card-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.request-card-label {
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.request-card-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  min-width: 0;
}

.request-card-user {
  grid-column: 1 / -1;
}

.request-card-user-summary {
  grid-column: 1 / -1;
}

.request-card-user-value {
  font-weight: 600;
  line-height: 1.28;
}

.request-created-at {
  color: var(--muted);
}

.request-created-at .request-card-label {
  color: var(--muted);
}

.request-created-at > div {
  font-size: 0.78rem;
  line-height: 1.3;
}

.request-card-actions {
  display: flex;
  justify-content: flex-end;
}

.request-chat-pill {
  width: auto;
  max-width: 100%;
  min-width: 98px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: none;
}

body.mobile-admin-preview .request-card-actions .secondary-link {
  width: auto;
}

body.mobile-admin-preview .request-card-summary-actions .secondary-link {
  width: auto;
}

body.mobile-admin-preview .status-toggle {
  border: 0;
  box-shadow: none;
  min-height: 34px;
  height: 34px;
  width: auto;
  padding: 7px 13px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

body.mobile-admin-preview .status {
  min-height: 34px;
  font-size: 0.8rem;
  text-align: center;
}

body.mobile-admin-preview .request-status-controls {
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

body.mobile-admin-preview .request-summary-toggle {
  flex: 0 0 auto;
}

body.mobile-admin-preview .request-reject-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  font-size: 0.84rem;
}

body.mobile-admin-preview .copy-button pre {
  font-size: 0.84rem;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

body.mobile-admin-preview .request-card-message .request-message-cell {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

body.mobile-admin-preview .request-card-message .copy-button,
body.mobile-admin-preview .request-card-message .copy-button pre {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  text-indent: 0;
}

body.mobile-admin-preview .request-card-message .copy-button {
  display: block;
  overflow: hidden;
}

body.mobile-admin-preview .request-card-message,
body.mobile-admin-preview .request-card-message * {
  min-width: 0;
  max-width: 100%;
}

body.mobile-admin-preview .request-card-message-row {
  gap: 8px;
}

body.mobile-admin-preview .request-chat-summary-button {
  align-self: start;
  min-width: 86px;
  max-width: 86px;
  justify-self: end;
  flex: 0 0 86px;
}

body.mobile-admin-preview .request-card {
  padding: 12px 12px 13px;
}

body.mobile-admin-preview .request-card-head {
  margin-bottom: 8px;
}

body.mobile-admin-preview .request-card-head-main {
  gap: 0;
}

body.mobile-admin-preview .request-card-grid {
  gap: 10px;
}

body.mobile-admin-preview .request-card-type-block,
body.mobile-admin-preview .request-card-user-summary,
body.mobile-admin-preview .request-card-message {
  gap: 4px;
}

body.mobile-admin-preview .request-card-type-value {
  font-size: 0.98rem;
  line-height: 1.2;
}

body.mobile-admin-preview .request-card-message .copy-button pre {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-inline-size: 100%;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
}

body.mobile-admin-preview .request-card.expanded .request-card-message .copy-button pre {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

body.mobile-admin-preview .request-card-meta-grid {
  gap: 9px 12px;
  padding-top: 2px;
}

.request-card-item div,
.request-card-item strong,
.request-card-item span {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

body.mobile-admin-preview .copy-button {
  height: auto;
  min-height: 0;
}

body.mobile-admin-preview #panelNotice {
  margin: 0 10px 8px;
  padding: 7px 10px;
  font-size: 0.72rem;
  line-height: 1.25;
  border-radius: 10px;
  overflow: hidden;
  contain: paint;
}

html:not([data-admin-bootstrap-role]) body.mobile-admin-preview #panelNotice.hidden {
  display: none;
}

body.mobile-admin-preview .admin-panel-section {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  contain: layout paint;
  overflow-anchor: none;
}

body.mobile-admin-preview .stack-card,
body.mobile-admin-preview .stack-card-head,
body.mobile-admin-preview .participant-actions,
body.mobile-admin-preview .role-management-block,
body.mobile-admin-preview .participant-inline-tools,
body.mobile-admin-preview .participant-link-row,
body.mobile-admin-preview .participant-quick-actions,
body.mobile-admin-preview .participant-summary-main,
body.mobile-admin-preview .participant-details {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body.mobile-admin-preview .participant-summary {
  align-items: center;
  gap: 10px;
}

body.mobile-admin-preview .participant-summary-main {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

body.mobile-admin-preview .participant-summary-role {
  max-width: 100%;
}

body.mobile-admin-preview .participant-summary-toggle {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  margin-left: auto;
  align-self: center;
}

body.mobile-admin-preview .participant-summary-chevron {
  font-size: 1rem;
}

.iphone-frame {
  width: min(100%, 390px);
  margin: 12px auto;
  padding: 10px;
  border-radius: 34px;
  background: #0f131b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  position: relative;
}

.iphone-notch {
  width: 124px;
  height: 24px;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
  background: #070a10;
  z-index: 3;
}

body.mobile-admin-preview .iphone-frame {
  width: calc(var(--device-screen-width) + (var(--device-frame-padding) * 2));
  max-width: 100%;
  margin: 12px auto;
  padding: var(--device-frame-padding);
  border-radius: var(--device-frame-radius);
}

body.mobile-admin-preview .iphone-screen {
  position: relative;
  width: 100%;
  height: var(--device-screen-height);
  border-radius: var(--device-screen-radius);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

body.mobile-admin-preview[data-device="android-tall"] .iphone-notch,
body.mobile-admin-preview[data-device="android-compact"] .iphone-notch {
  width: var(--device-notch-width);
  height: var(--device-notch-height);
  border-radius: 0 0 12px 12px;
  background: #111823;
}

body.mobile-admin-preview.embedded-preview .iphone-frame {
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.mobile-admin-preview.embedded-preview .iphone-notch {
  display: none;
}

body.mobile-admin-preview.embedded-preview .iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

body.mobile-admin-preview.header-collapsed .mobile-header-shell {
  pointer-events: none;
  opacity: 0;
}
