/* Installed PWA-only corrections belong here only. */
html.rc-display-standalone { --rc-display: standalone; }

/*
 * Final iOS PWA guardrails. These rules are deliberately kept in the last
 * loaded stylesheet: the installed application must never inherit the old
 * desktop-sized inner scroll panels.
 */
@media (max-width: 760px) {
  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field,
  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field > input,
  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field > select {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field,
  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .rc-month-1 {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    overflow: clip !important;
  }

  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-label {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.25 !important;
  }

  /* Month select look/alignment: «месяц1» in ui-library.css — do not re-center. */
  html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field > select {
    margin: 0 !important;
    border: 1px solid var(--line, #d9dfe8) !important;
    background-color: #fff !important;
  }

  /* Shared participant/executor picker. It appears in check-lists, shift
     meetings, inventory, supplies and internship diaries. */
  html.rc-platform-ios.rc-display-standalone .rc-person-picker,
  html.rc-platform-ios.rc-display-standalone .employee-picker,
  html.rc-platform-ios.rc-display-standalone .assignment-member-picker,
  html.rc-platform-ios.rc-display-standalone .meeting-participant-picker,
  html.rc-platform-ios.rc-display-standalone .meeting-participants-panel,
  html.rc-platform-ios.rc-display-standalone .employee-picker-panel,
  html.rc-platform-ios.rc-display-standalone .participant-selection-panel,
  html.rc-platform-ios.rc-display-standalone .rc-person-picker__groups,
  html.rc-platform-ios.rc-display-standalone .employee-picker-groups,
  html.rc-platform-ios.rc-display-standalone .assignment-member-groups,
  html.rc-platform-ios.rc-display-standalone .meeting-participant-groups,
  html.rc-platform-ios.rc-display-standalone .meeting-participants-list,
  html.rc-platform-ios.rc-display-standalone .meeting-participant-list,
  html.rc-platform-ios.rc-display-standalone .rc-person-picker__options,
  html.rc-platform-ios.rc-display-standalone .employee-picker-options,
  html.rc-platform-ios.rc-display-standalone .assignment-member-options,
  html.rc-platform-ios.rc-display-standalone .meeting-participant-options,
  html.rc-platform-ios.rc-display-standalone .staff-choice-list {
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
  }

  html.rc-platform-ios.rc-display-standalone .rc-person-picker__groups,
  html.rc-platform-ios.rc-display-standalone .employee-picker-groups,
  html.rc-platform-ios.rc-display-standalone .assignment-member-groups,
  html.rc-platform-ios.rc-display-standalone .meeting-participant-groups,
  html.rc-platform-ios.rc-display-standalone .meeting-participants-list,
  html.rc-platform-ios.rc-display-standalone .meeting-participant-list,
  html.rc-platform-ios.rc-display-standalone .participant-selection-panel,
  html.rc-platform-ios.rc-display-standalone .staff-choice-list {
    display: grid !important;
    gap: 8px !important;
    padding: 0 !important;
  }

  /* DDS and household goods use the document scroll only; neither a metrics
     card nor an issue form may become sticky or independently scrollable. */
  html.rc-platform-ios.rc-display-standalone #tab-dds,
  html.rc-platform-ios.rc-display-standalone #tab-dds .panel,
  html.rc-platform-ios.rc-display-standalone #tab-dds .nested-panel,
  html.rc-platform-ios.rc-display-standalone #tab-supplies,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .panel,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .nested-panel,
  html.rc-platform-ios.rc-display-standalone #tab-supplies #supplyHomeView,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .supply-home-grid,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .supply-main-grid,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .supply-operations-grid,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .supply-home-panel,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .supply-items-panel,
  html.rc-platform-ios.rc-display-standalone #tab-supplies .supply-metrics,
  html.rc-platform-ios.rc-display-standalone #tab-supplies [data-supply-section] {
    position: static !important;
    inset: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
  }
}

/*
 * Финальный мобильный каскад мотивации.
 * Этот блок намеренно находится последним: установленная iOS-версия подключает
 * layout-standalone.css после остальных адаптивных таблиц стилей.
 */
@media (max-width: 760px) {
  html body #tab-motivations,
  html body #tab-motivations > .panel,
  html body #tab-motivations #motivationsHome,
  html body #tab-motivations #motivationsHome > *,
  html body #tab-motivations #motivationsHome .nonfinancial-variants-section,
  html body #tab-motivations #motivationsHome #financialMotivations {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body #tab-motivations #motivationsHome {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
    overflow-x: clip !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details {
    display: block !important;
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details[open] {
    grid-column: 1 / -1 !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px 4px !important;
    overflow: hidden !important;
    border: 1px solid #d9e0e9 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1f2937 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::marker,
  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::-webkit-details-marker,
  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::after {
    display: none !important;
    content: none !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details:first-child > summary {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fff7f7 !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details[open] > summary {
    margin-bottom: 10px !important;
    color: #0f5dcc !important;
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details:first-child[open] > summary {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fff1f2 !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details[open] > :not(summary) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body #tab-motivations #motivationsHome .nonfinancial-variants-section,
  html body #tab-motivations #motivationsHome #financialMotivations {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    contain: none !important;
  }

  html body #tab-motivations #motivationsHome .nonfinancial-variants-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/*
 * Мотивация на узких экранах.
 * Это правило намеренно не зависит от standalone/platform-классов: iOS может
 * восстановить PWA без них до завершения bootstrap, но раскладка должна быть
 * корректной уже на первом кадре.
 */
@media (max-width: 760px) {
  #tab-motivations,
  #tab-motivations > .panel,
  #tab-motivations #motivationsHome,
  #tab-motivations #motivationsHome > .panel,
  #tab-motivations #motivationsHome > .nested-panel,
  #tab-motivations #motivationsHome .nonfinancial-variants-section,
  #tab-motivations #motivationsHome #financialMotivations {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  #tab-motivations #motivationsHome {
    overflow-x: clip !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar > details {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar > details[open] {
    grid-column: 1 / -1 !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar > details > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px 4px !important;
    color: #1f2937 !important;
    background: #fff !important;
    border: 1px solid var(--line, #dce2eb) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::-webkit-details-marker {
    display: none !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar > details[open] > summary {
    margin-bottom: 10px !important;
    color: var(--blue, #087ff5) !important;
    background: #eef6ff !important;
    border-color: #93c5fd !important;
  }

  #tab-motivations #motivationsHome .motivation-actions-bar > details > :not(summary) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variants-section,
  #tab-motivations #motivationsHome #financialMotivations {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin-top: 12px !important;
    padding: 12px !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    contain: none !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variants-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variant-card {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
}

/* Installed iOS motivation: do not depend on the reported layout viewport width. */
html.rc-platform-ios.rc-display-standalone #tab-motivations,
html.rc-platform-ios.rc-display-standalone #tab-motivations > .panel,
html.rc-platform-ios.rc-display-standalone #motivationsHome,
html.rc-platform-ios.rc-display-standalone #motivationsHome > .panel,
html.rc-platform-ios.rc-display-standalone #motivationsHome > .nested-panel,
html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variants-section,
html.rc-platform-ios.rc-display-standalone #financialMotivations {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar > details {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar > details[open] {
  grid-column: 1 / -1 !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar > details > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 7px 4px !important;
  border: 1px solid #d8dee8 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #1f2937 !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar > details[open] > summary {
  margin-bottom: 10px !important;
  background: #eef6ff !important;
  color: #0b70d6 !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variants-section,
html.rc-platform-ios.rc-display-standalone #financialMotivations {
  padding: 12px !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variants-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variant-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

/* Установленное мобильное приложение: компактная навигация мотивации без обрезания секций. */
@media (max-width: 760px) {
  html.rc-display-standalone #tab-motivations > .panel,
  html.rc-display-standalone #motivationsHome,
  html.rc-display-standalone #motivationsHome > .panel,
  html.rc-display-standalone #motivationsHome > .nested-panel,
  html.rc-display-standalone #motivationsHome .nonfinancial-variants-section,
  html.rc-display-standalone #financialMotivations {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html.rc-display-standalone #motivationsHome .motivation-actions-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  html.rc-display-standalone #motivationsHome .motivation-actions-bar > details,
  html.rc-display-standalone #motivationsHome .motivation-actions-bar > details[open] {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html.rc-display-standalone #motivationsHome .motivation-actions-bar > details[open] {
    grid-column: 1 / -1 !important;
  }

  html.rc-display-standalone #motivationsHome .motivation-actions-bar > details > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 7px 4px !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1f2937 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }

  html.rc-display-standalone #motivationsHome .motivation-actions-bar > details[open] > summary {
    margin-bottom: 10px !important;
    background: #eef6ff !important;
    color: #0b70d6 !important;
  }
}

/*
 * The installed iOS shell reports a larger layout viewport on some devices.
 * Keep these safeguards outside the 760px breakpoint, but only for the
 * standalone iOS application. They must not affect the desktop interface.
 */
html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field,
html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .rc-month-1 {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: clip !important;
}

html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-label,
html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field > .dds-recognition-month-select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Month select sizing/alignment owned by «месяц1» (ui-library.css). */
html.rc-platform-ios.rc-display-standalone #ddsExpenseForm .dds-recognition-month-field > .dds-recognition-month-select {
  margin: 0 !important;
}

/* DLC must use the document scroll. In particular, the transfer picker must
   never create a narrow inner scroll panel or put its label under the control. */
html.rc-platform-ios.rc-display-standalone #dlcHomeDepositsExportButton,
html.rc-platform-android.rc-display-standalone #dlcHomeDepositsExportButton,
html.rc-store-shell #dlcHomeDepositsExportButton,
html.rc-platform-ios.rc-display-standalone #dlcHomeDepositsPanel .dlc-deposits-export,
html.rc-platform-android.rc-display-standalone #dlcHomeDepositsPanel .dlc-deposits-export,
html.rc-store-shell #dlcHomeDepositsPanel .dlc-deposits-export {
  display: inline-grid !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 36px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dlc,
html.rc-platform-ios.rc-display-standalone #tab-dlc .panel,
html.rc-platform-ios.rc-display-standalone #dlcReportView,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-panel,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .internship-mentor-field,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .rc-person-picker,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .rc-person-picker__groups,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .employee-picker-groups,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .rc-person-picker__options,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .assignment-member-options,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .employee-picker-options {
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .internship-mentor-field,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .button,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .rc-person-picker,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .rc-person-picker > summary {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .internship-mentor-label {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  white-space: normal !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .rc-person-picker__groups,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .employee-picker-groups {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 8px 0 0 !important;
}

/* Передача смены: один компактный вертикальный блок. Не наследует двухколоночную
   сетку desktop-версии и не сжимает подпись рядом с селектором. */
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-panel {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 20px 0 0 !important;
  padding: 20px 0 0 !important;
  border-top: 1px solid var(--border, #e1e6ee) !important;
  box-sizing: border-box !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-panel > h3 {
  margin: 0 0 8px !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-panel > .muted {
  margin: 0 0 16px !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .internship-mentor-field {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .internship-mentor-label,
html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .rc-person-picker {
  grid-column: 1 / -1 !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .internship-mentor-label {
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions .rc-person-picker > summary {
  min-height: 52px !important;
}

html.rc-platform-ios.rc-display-standalone #dlcReportEditor .dlc-transfer-actions [data-dlc-transfer] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-height: 52px !important;
  margin: 0 !important;
}

/*
 * In the installed iOS app the page itself is the only scroll container.
 * Statistics, task lists, check-list directions and employee selectors must
 * stay in normal document flow: no sticky cards and no nested scroll panes.
 */
html.rc-platform-ios.rc-display-standalone #tab-today,
html.rc-platform-ios.rc-display-standalone #tab-today .panel,
html.rc-platform-ios.rc-display-standalone #tab-today .nested-panel,
html.rc-platform-ios.rc-display-standalone #tab-today .checks-subnav,
html.rc-platform-ios.rc-display-standalone #tab-today #todayStats,
html.rc-platform-ios.rc-display-standalone #tab-today #tasksList,
html.rc-platform-ios.rc-display-standalone #tab-today .metric-row,
html.rc-platform-ios.rc-display-standalone #tab-today .task-list,
html.rc-platform-ios.rc-display-standalone #tab-today .checklist-workspace {
  position: static !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}

html.rc-platform-ios.rc-display-standalone #inventoryResponsibleMembersList,
html.rc-platform-ios.rc-display-standalone #assignmentMembersList,
html.rc-platform-ios.rc-display-standalone #meetingManualParticipantsList,
html.rc-platform-ios.rc-display-standalone #meetingEditManualParticipantsList,
html.rc-platform-ios.rc-display-standalone #shiftExecutionParticipants,
html.rc-platform-ios.rc-display-standalone #goodDeedAssignmentMemberPicker,
html.rc-platform-ios.rc-display-standalone #warningMemberPicker,
html.rc-platform-ios.rc-display-standalone #internshipDiaryMembersList,
html.rc-platform-ios.rc-display-standalone #inventoryResponsibleMembersList .employee-picker,
html.rc-platform-ios.rc-display-standalone #assignmentMembersList .employee-picker,
html.rc-platform-ios.rc-display-standalone #assignmentMembersList .assignment-member-picker,
html.rc-platform-ios.rc-display-standalone #meetingManualParticipantsList .assignment-member-picker,
html.rc-platform-ios.rc-display-standalone #meetingEditManualParticipantsList .assignment-member-picker,
html.rc-platform-ios.rc-display-standalone #shiftExecutionParticipants .assignment-member-picker,
html.rc-platform-ios.rc-display-standalone #goodDeedAssignmentMemberPicker .assignment-member-picker,
html.rc-platform-ios.rc-display-standalone #warningMemberPicker .assignment-member-picker {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}

html.rc-platform-ios.rc-display-standalone #inventoryResponsibleMembersList .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #inventoryResponsibleMembersList .employee-picker-groups,
html.rc-platform-ios.rc-display-standalone #assignmentMembersList .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #assignmentMembersList .employee-picker-groups,
html.rc-platform-ios.rc-display-standalone #meetingManualParticipantsList .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #meetingEditManualParticipantsList .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #shiftExecutionParticipants .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #goodDeedAssignmentMemberPicker .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #warningMemberPicker .assignment-member-groups,
html.rc-platform-ios.rc-display-standalone #internshipDiaryMembersList .assignment-member-groups {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}

html.rc-platform-ios.rc-display-standalone #inventoryResponsibleMembersList .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #assignmentMembersList .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #meetingManualParticipantsList .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #meetingEditManualParticipantsList .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #shiftExecutionParticipants .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #goodDeedAssignmentMemberPicker .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #warningMemberPicker .employee-picker-search-wrap,
html.rc-platform-ios.rc-display-standalone #internshipDiaryMembersList .employee-picker-search-wrap {
  position: static !important;
}

/* Выдача хозтоваров: на установленном iOS все элементы формы держат одну сетку. */
html.rc-platform-ios.rc-display-standalone #supplyIssueForm,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm .form-grid-2,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm .supply-issue-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.rc-platform-ios.rc-display-standalone #supplyIssueForm .form-grid-2,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm .supply-issue-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  padding: 0 !important;
}

html.rc-platform-ios.rc-display-standalone #supplyIssueForm .form-grid-2 > label,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm .supply-issue-grid > label,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm > label {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

html.rc-platform-ios.rc-display-standalone #supplyIssueForm,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  width: 100% !important;
}

html.rc-platform-ios.rc-display-standalone #supplyIssueForm > *,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm > *,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm label > input:not([type="hidden"]),
html.rc-platform-ios.rc-display-standalone #supplyIssueForm label > select,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm label > textarea,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm label > input:not([type="hidden"]),
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm label > select,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm label > textarea,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm #supplyIssueRecipientPicker,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm #supplyNotifyRecipientPicker,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm .supply-person-trigger,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm .supply-person-trigger,
html.rc-platform-ios.rc-display-standalone #supplyIssueForm .button,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm .button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

html.rc-platform-ios.rc-display-standalone #supplyIssueForm .supply-person-trigger,
html.rc-platform-ios.rc-display-standalone #supplyNotifyForm .supply-person-trigger {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: var(--control-height, 48px) !important;
  min-height: var(--control-height, 48px) !important;
  padding: 0 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

/* Мотивация: единая мобильная раскладка для браузера и установленного приложения. */
@media (max-width: 760px) {
  #tab-motivations #motivationsHome,
  #tab-motivations #motivationsHome .nonfinancial-variants-grid,
  #tab-motivations #motivationsHome .nonfinancial-variant-card,
  #tab-motivations #motivationsHome .mot-template-edit {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #tab-motivations #motivationsHome {
    overflow-x: clip !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variants-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    overflow: visible !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variants-grid[hidden],
  #tab-motivations #motivationsHome .nonfinancial-variants-section.is-collapsed .nonfinancial-variants-grid {
    display: none !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variant-card {
    display: flex !important;
    position: relative !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: 0 !important;
    gap: 12px !important;
    padding: 16px !important;
    overflow: visible !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit:not(.hidden) {
    display: grid !important;
    position: static !important;
    inset: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin: 4px 0 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid var(--line, #dce2eb) !important;
    transform: none !important;
    overflow: visible !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit.hidden {
    display: none !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit > label,
  #tab-motivations #motivationsHome .mot-template-edit > .button-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit > label:not(.mot-template-confirmation) {
    display: block !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit input:not([type="checkbox"]),
  #tab-motivations #motivationsHome .mot-template-edit select,
  #tab-motivations #motivationsHome .mot-template-edit textarea {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
    box-sizing: border-box !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit .mot-template-confirmation {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit .mot-template-confirmation input[type="checkbox"] {
    display: block !important;
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
  }

  #tab-motivations #motivationsHome .mot-template-edit .mot-template-confirmation span {
    min-width: 0 !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variant-actions {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variant-issue {
    min-width: 0 !important;
    min-height: 40px !important;
    margin-right: auto !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variant-actions .icon-button {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  #tab-motivations #motivationsHome .nonfinancial-variant-actions .icon-button.danger {
    background: #fff !important;
    color: #e11d48 !important;
    border-color: #fecdd3 !important;
    box-shadow: none !important;
  }
}

/*
 * DO NOT MOVE: окончательный каскад мобильной мотивации.
 * Он должен оставаться последним в файле, потому что установленная iOS-версия
 * подключает layout-standalone.css после остальных адаптивных стилей.
 */
@media (max-width: 760px) {
  html body #tab-motivations,
  html body #tab-motivations > .panel,
  html body #tab-motivations #motivationsHome,
  html body #tab-motivations #motivationsHome > *,
  html body #tab-motivations #motivationsHome .nonfinancial-variants-section,
  html body #tab-motivations #motivationsHome #financialMotivations {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body #tab-motivations #motivationsHome {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
    overflow-x: clip !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details {
    display: block !important;
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details[open] {
    grid-column: 1 / -1 !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px 4px !important;
    overflow: hidden !important;
    border: 1px solid #d9e0e9 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1f2937 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::marker,
  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::-webkit-details-marker,
  html body #tab-motivations #motivationsHome .motivation-actions-bar > details > summary::after {
    display: none !important;
    content: none !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details:first-child > summary {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fff7f7 !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details[open] > summary {
    margin-bottom: 10px !important;
    color: #0f5dcc !important;
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details:first-child[open] > summary {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fff1f2 !important;
  }

  html body #tab-motivations #motivationsHome .motivation-actions-bar > details[open] > :not(summary) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body #tab-motivations #motivationsHome .nonfinancial-variants-section,
  html body #tab-motivations #motivationsHome #financialMotivations {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    contain: none !important;
  }

  html body #tab-motivations #motivationsHome .nonfinancial-variants-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}


/* Collapse must beat standalone display:grid !important on variants grid. */
html body #tab-motivations #motivationsHome .nonfinancial-variants-grid[hidden],
html body #tab-motivations #motivationsHome .nonfinancial-variants-section.is-collapsed .nonfinancial-variants-grid,
html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variants-grid[hidden],
html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variants-section.is-collapsed .nonfinancial-variants-grid {
  display: none !important;
}

/*
 * Capacitor store shell only.
 * Document grows; native contentOffset is driven by the iOS scroll bridge.
 * touch-action:none — pan-y lets WK's UIScrollView claim fingers and then
 * often fail to move pixels. Browser/PWA unaffected (no .rc-store-shell).
 */
html.rc-store-shell,
html.rc-store-shell body {
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
  overscroll-behavior-y: auto !important;
  touch-action: none !important;
}

html.rc-store-shell .shell,
html.rc-store-shell #authView,
html.rc-store-shell .auth-layout,
html.rc-store-shell #appView {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

html.rc-store-shell .app-layout {
  overflow: visible !important;
  height: auto !important;
  min-height: 100% !important;
  position: static !important;
}

html.rc-store-shell .workspace,
html.rc-store-shell .sidebar {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  position: static !important;
}

html.rc-store-shell .workspace {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}

html.rc-store-shell #pullToRefresh {
  display: none !important;
  pointer-events: none !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-opening-form-actions,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-opening-form-actions,
html.rc-store-shell #tab-dds .dds-opening-form-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-opening-form-actions .button,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-opening-form-actions .button,
html.rc-store-shell #tab-dds .dds-opening-form-actions .button {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-full-table-form .button-row,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-full-table-form .button-row,
html.rc-store-shell #tab-dds .dds-full-table-form .button-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-full-table-form .button-row .button,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-full-table-form .button-row .button,
html.rc-store-shell #tab-dds .dds-full-table-form .button-row .button {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-directory,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-directory,
html.rc-store-shell #tab-dds .dds-articles-directory {
  gap: 6px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary,
html.rc-store-shell #tab-dds .dds-articles-block > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto 16px !important;
  align-items: center !important;
  column-gap: 6px !important;
  row-gap: 0 !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 6px 8px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-title,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-title,
html.rc-store-shell #tab-dds .dds-articles-block > summary .dds-block-title {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: 100% !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-title > span:last-child,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-title > span:last-child,
html.rc-store-shell #tab-dds .dds-articles-block > summary .dds-block-title > span:last-child {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-summary-actions,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-summary-actions,
html.rc-store-shell #tab-dds .dds-articles-block > summary .dds-block-summary-actions {
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  align-items: center !important;
  gap: 4px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-summary-actions small,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary .dds-block-summary-actions small,
html.rc-store-shell #tab-dds .dds-articles-block > summary .dds-block-summary-actions small {
  margin: 0 2px 0 0 !important;
  white-space: nowrap !important;
  font-size: 11px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary::after,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary::after,
html.rc-store-shell #tab-dds .dds-articles-block > summary::after {
  grid-column: 3 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  justify-self: center !important;
  align-self: center !important;
  line-height: 1 !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block > summary .icon-button,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block > summary .icon-button,
html.rc-store-shell #tab-dds .dds-articles-block > summary .icon-button,
html.rc-platform-ios.rc-display-standalone #tab-dds .dds-article-actions .icon-button,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-article-actions .icon-button,
html.rc-store-shell #tab-dds .dds-article-actions .icon-button {
  display: inline-grid !important;
  place-items: center !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  flex: 0 0 32px !important;
  border-radius: 10px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block-content,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block-content,
html.rc-store-shell #tab-dds .dds-articles-block-content {
  display: grid !important;
  gap: 8px !important;
  padding: 8px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-block-content > .button,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-block-content > .button,
html.rc-store-shell #tab-dds .dds-articles-block-content > .button {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds .dds-articles-list,
html.rc-platform-android.rc-display-standalone #tab-dds .dds-articles-list,
html.rc-store-shell #tab-dds .dds-articles-list {
  gap: 6px !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds form.dds-article-row,
html.rc-platform-android.rc-display-standalone #tab-dds form.dds-article-row,
html.rc-store-shell #tab-dds form.dds-article-row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  grid-auto-flow: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds form.dds-article-row > *,
html.rc-platform-android.rc-display-standalone #tab-dds form.dds-article-row > *,
html.rc-store-shell #tab-dds form.dds-article-row > * {
  grid-column: auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds form.dds-article-row > input[type="hidden"],
html.rc-platform-android.rc-display-standalone #tab-dds form.dds-article-row > input[type="hidden"],
html.rc-store-shell #tab-dds form.dds-article-row > input[type="hidden"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds form.dds-article-row > .dds-drag-handle,
html.rc-platform-android.rc-display-standalone #tab-dds form.dds-article-row > .dds-drag-handle,
html.rc-store-shell #tab-dds form.dds-article-row > .dds-drag-handle {
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 32px !important;
  min-height: 0 !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds form.dds-article-row > input[name="name"],
html.rc-platform-android.rc-display-standalone #tab-dds form.dds-article-row > input[name="name"],
html.rc-store-shell #tab-dds form.dds-article-row > input[name="name"] {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 40px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html.rc-platform-ios.rc-display-standalone #tab-dds form.dds-article-row > .dds-article-actions,
html.rc-platform-android.rc-display-standalone #tab-dds form.dds-article-row > .dds-article-actions,
html.rc-store-shell #tab-dds form.dds-article-row > .dds-article-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  width: auto !important;
  max-width: none !important;
}

html body #tab-motivations #motivationsHome .motivation-home-row,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-home-row,
html.rc-display-standalone #motivationsHome .motivation-home-row,
html body #tab-motivations #motivationsHome .motivation-actions-row,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-row,
html.rc-display-standalone #motivationsHome .motivation-actions-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
}

html body #tab-motivations #motivationsHome .motivation-home-bar,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-home-bar,
html.rc-display-standalone #motivationsHome .motivation-home-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 13 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 0 8px !important;
  background: #fff !important;
}

html body #tab-motivations #motivationsHome .motivation-actions-bar,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar,
html.rc-display-standalone #motivationsHome .motivation-actions-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 0 8px !important;
  background: #fff !important;
}

html body #tab-motivations #motivationsHome.has-motivation-home .motivation-actions-bar,
html.rc-platform-ios.rc-display-standalone #motivationsHome.has-motivation-home .motivation-actions-bar,
html.rc-display-standalone #motivationsHome.has-motivation-home .motivation-actions-bar {
  top: 72px !important;
}

html body #tab-motivations #motivationsHome .motivation-home-bar > .button,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-home-bar > .button,
html.rc-display-standalone #motivationsHome .motivation-home-bar > .button,
html body #tab-motivations #motivationsHome .motivation-actions-bar > .button,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-bar > .button,
html.rc-display-standalone #motivationsHome .motivation-actions-bar > .button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 56px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-sizing: border-box !important;
}

html body #tab-motivations #motivationsHome .motivation-actions-page,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-page,
html.rc-display-standalone #motivationsHome .motivation-actions-page {
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 12px !important;
  border: 1px solid #dce2eb !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

html body #tab-motivations #motivationsHome .motivation-issued-grid,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-issued-grid,
html.rc-display-standalone #motivationsHome .motivation-issued-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body #tab-motivations #motivationsHome .motivation-issued-card,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-issued-card,
html.rc-display-standalone #motivationsHome .motivation-issued-card {
  min-width: 0 !important;
  min-height: 136px !important;
  padding: 11px !important;
  border-radius: 14px !important;
}

html body #tab-motivations #motivationsHome .motivation-issued-card .small-button,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-issued-card .small-button,
html.rc-display-standalone #motivationsHome .motivation-issued-card .small-button {
  width: auto !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

@media (min-width: 1100px) {
  html body #tab-motivations #motivationsHome .motivation-issued-grid,
  html.rc-display-standalone #motivationsHome .motivation-issued-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

html body #tab-motivations #motivationsHome .motivation-home-page[hidden],
html body #tab-motivations #motivationsHome:not(.has-motivation-home) .motivation-home-pages,
html body #tab-motivations #motivationsHome .motivation-actions-page[hidden],
html body #tab-motivations #motivationsHome:not(.has-motivation-page) .motivation-actions-pages,
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-home-page[hidden],
html.rc-display-standalone #motivationsHome .motivation-home-page[hidden],
html.rc-platform-ios.rc-display-standalone #motivationsHome .motivation-actions-page[hidden],
html.rc-display-standalone #motivationsHome .motivation-actions-page[hidden] {
  display: none !important;
}

html body #tab-motivations,
html body #tab-motivations > .panel,
html body #tab-motivations #motivationsHome,
html.rc-display-standalone #tab-motivations,
html.rc-display-standalone #tab-motivations > .panel,
html.rc-display-standalone #motivationsHome,
html.rc-platform-ios.rc-display-standalone #tab-motivations,
html.rc-platform-ios.rc-display-standalone #tab-motivations > .panel,
html.rc-platform-ios.rc-display-standalone #motivationsHome,
html,
body,
#appView,
.workspace,
.content,
.tab-panel {
  overflow-anchor: none !important;
}

html body #tab-motivations #motivationsHome,
html.rc-display-standalone #motivationsHome,
html.rc-platform-ios.rc-display-standalone #motivationsHome {
  overflow: clip !important;
}

html body #tab-motivations #motivationsHome .nonfinancial-variant-card--create,
html.rc-display-standalone #motivationsHome .nonfinancial-variant-card--create,
html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variant-card--create {
  display: grid !important;
  grid-template-rows: auto !important;
  flex-direction: unset !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 10px !important;
  min-height: 132px !important;
  border: 1.5px dashed #c5d3e6 !important;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%) !important;
  box-shadow: none !important;
}

html body #tab-motivations #motivationsHome .nonfinancial-variants-grid[hidden],
html.rc-display-standalone #motivationsHome .nonfinancial-variants-grid[hidden],
html.rc-platform-ios.rc-display-standalone #motivationsHome .nonfinancial-variants-grid[hidden] {
  display: none !important;
}

html.rc-display-standalone #messengerPanel .messenger-compose__row,
html.rc-platform-ios.rc-display-standalone #messengerPanel .messenger-compose__row,
html.rc-platform-android.rc-display-standalone #messengerPanel .messenger-compose__row {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 44px !important;
  align-items: center !important;
}

html.rc-display-standalone #messengerPanel .messenger-compose__row input[name="body"],
html.rc-platform-ios.rc-display-standalone #messengerPanel .messenger-compose__row input[name="body"],
html.rc-platform-android.rc-display-standalone #messengerPanel .messenger-compose__row input[name="body"] {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Analytics: no RestCheck footer / dock chrome */
body.analytics-tab .mobile-bottom-actions,
body.analytics-tab .app-shell-footer,
body.analytics-tab .legal-support-row,
body.analytics-tab .legal-requisites,
body.analytics-tab .support-telegram,
.analytics-chrome-hide,
html body.analytics-tab.analytics-landscape #mobileBottomNav,
html body.analytics-tab.analytics-landscape #mobileBottomNav.mobile-bottom-nav,
html body.analytics-tab.analytics-landscape #mobileBottomNav.rc-mobile-bottom-nav,
html body.analytics-landscape #mobileBottomNav,
html body.analytics-landscape #mobileBottomNav.mobile-bottom-nav,
html body.analytics-landscape #mobileBottomNav.rc-mobile-bottom-nav,
html body.analytics-landscape #mobileBottomNav[data-bottom-nav="true"],
body.analytics-landscape .topbar,
body.analytics-landscape .mobile-menu-label,
body.analytics-landscape .sidebar,
#appView:has(#tab-analytics:not(.hidden)) > .mobile-bottom-actions,
#appView:has(#tab-analytics:not(.hidden)) > .app-shell-footer,
#appView:has(#tab-analytics:not(.hidden)) .mobile-bottom-actions,
#appView:has(#tab-analytics:not(.hidden)) .app-shell-footer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (orientation: landscape) and (max-height: 560px) {
  #appView:has(#tab-analytics:not(.hidden)) #mobileBottomNav,
  #appView:has(#tab-analytics:not(.hidden)) #mobileBottomNav.mobile-bottom-nav,
  #appView:has(#tab-analytics:not(.hidden)) #mobileBottomNav.rc-mobile-bottom-nav,
  html body #appView:has(#tab-analytics:not(.hidden)) #mobileBottomNav.rc-mobile-bottom-nav:not(.hidden):not(:empty) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

#appView .sidebar .tab[data-tab="analytics"],
#appView .sidebar .tab[data-tab="analytics"] .tab-label,
#appView .sidebar .tab[data-tab="analytics"] .tab-icon,
#appView .mobile-sections-list section[data-tab-group="analytics"] .mobile-section-title,
#appView .mobile-sections-list button[data-mobile-tab="analytics"] {
  color: #0b6fe8 !important;
}

html:has(#tab-analytics:not(.hidden)),
html:has(body.analytics-tab),
body.analytics-tab,
body:has(#tab-analytics:not(.hidden)),
#appView:has(#tab-analytics:not(.hidden)),
#appView:has(#tab-analytics:not(.hidden)).app-layout,
#appView:has(#tab-analytics:not(.hidden)) .workspace {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}


