main > .container, main > .container-fluid
{
  padding: 70px 15px 20px;
}

.footer {
  background-color: #f5f5f5;
  font-size: .9em;
  height: 60px;
}

.footer > .container, .footer > .container-fluid {
  padding-right: 15px;
  padding-left: 15px;
}

.not-set {
  color: #c55;
  font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
  content: '';
  left: 3px;
  display: inline-block;
  width: 0;
  height: 0;
  border: solid 5px transparent;
  margin: 4px 4px 2px 4px;
  background: transparent;
}

a.asc:after {
  border-bottom: solid 7px #212529;
  border-top-width: 0;
}

a.desc:after {
  border-top: solid 7px #212529;
  border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
  white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
  min-width: 50px;
}

.hint-block {
  display: block;
  margin-top: 5px;
  color: #999;
}

.error-summary {
  color: #a94442;
  background: #fdf7f7;
  border-left: 3px solid #eed3d7;
  padding: 10px 20px;
  margin: 0 0 15px 0;
}

.auth__block {
  max-width: 480px;
}

.auth__form .input__group {
  margin-bottom: 1rem;
}

.auth__form .form-control {
  min-height: 42px;
}

.auth__form .input__checkbox {
  margin-bottom: 1rem;
}

.auth__form .input__checkbox .form-check {
  margin-bottom: 0;
}

.auth__footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

.auth__footer a {
  text-decoration: none;
}

/* align the logout "link" (button in form) of the navbar */
.navbar form > button.logout {
  padding-top: 7px;
  color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
  .navbar form > button.logout {
    display:block;
    text-align: left;
    width: 100%;
    padding: 10px 0;
  }
}

.navbar form > button.logout:focus,
.navbar form > button.logout:hover {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
}

.navbar form > button.logout:focus {
  outline: none;
}

/* style breadcrumb widget as in previous bootstrap versions */
.breadcrumb {
  background-color: var(--bs-gray-200);
  border-radius: .25rem;
  padding: .75rem 1rem;
}

.breadcrumb-item > a
{
  text-decoration: none;
}

.skeleton-home code {
  display: inline-block;
  padding: .45rem .65rem;
  color: #213547;
  background: #eef3f8;
  border: 1px solid #d8e2ec;
  border-radius: .35rem;
}

.skeleton-status,
.skeleton-feature {
  border: 1px solid #d8e2ec;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.skeleton-status {
  padding: 1.25rem;
}

.skeleton-status > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid #eef3f8;
}

.skeleton-status > div:last-child {
  border-bottom: 0;
}

.skeleton-status span,
.skeleton-feature p {
  color: #6c757d;
}

.skeleton-feature {
  min-height: 160px;
  padding: 1.25rem;
}

.skeleton-feature h2 {
  font-size: 1.15rem;
}

/* Дело: ленты, решения, текст из Markdown */
.md p:last-child,
.md ul:last-child,
.md ol:last-child {
  margin-bottom: 0;
}

.md img {
  max-width: 100%;
}

.md pre,
.md table {
  max-width: 100%;
  overflow-x: auto;
}

.md table {
  display: block;
}

main,
main .card {
  overflow-wrap: anywhere;
}

.thread-item {
  padding: .6rem .75rem;
  margin-bottom: .5rem;
  border-left: 3px solid var(--bs-gray-300);
  background: var(--bs-gray-100);
  border-radius: .25rem;
}

.thread-item--decision {
  border-left-color: var(--bs-success);
  background: var(--bs-success-bg-subtle);
}

.thread-item--status {
  border-left-color: var(--bs-primary);
  background: #fff;
}

.thread-item__head a {
  text-decoration: none;
}

.list-group-item-action .badge {
  white-space: nowrap;
}
/* Всплывающие подсказки-легенды: стадии, приоритеты, пояснения полей */
.case-tooltip .tooltip-inner {
  max-width: min(360px, calc(100vw - 24px));
  text-align: left;
  padding: .5rem .75rem;
}

.case-tooltip .tooltip-inner ul {
  margin-top: .25rem;
}

[data-bs-toggle="tooltip"] {
  cursor: help;
}

.priority-mark {
  white-space: nowrap;
}

/* Визуальный редактор Markdown */
.markdown-editor {
  background: #fff;
}

.markdown-editor .toastui-editor-defaultUI {
  border-radius: .375rem;
}

.site-help th {
  width: 32%;
}

/* Телефон: перенос длинных названий и размер элементов для касания. */
@media (max-width: 575.98px) {
  main > .container,
  main > .container-fluid {
    padding: 64px 12px 16px;
  }

  .breadcrumb {
    padding: .5rem .75rem;
    font-size: .875rem;
  }

  h1.h3 {
    font-size: 1.35rem;
  }

  .navbar-toggler,
  .navbar .nav-link,
  .navbar .dropdown-item,
  main .btn,
  main .form-control,
  main .form-select,
  main .ts-control,
  main .page-link,
  .site-index .nav-link,
  .thread-item__head a {
    min-height: 40px;
  }

  main a.btn,
  .site-index .nav-link,
  .thread-item__head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navbar .dropdown-item,
  main .badge {
    white-space: normal;
  }

  .navbar .navbar-collapse.show {
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }

  main .pagination {
    flex-wrap: wrap;
  }

  .markdown-editor .toastui-editor-defaultUI-toolbar {
    padding-inline: .25rem;
  }

  /* Значки панели — спрайт под кнопку 32 px: растянутая кнопка их ломает. Палец попадает
     за счёт отступов между кнопками. */
  .markdown-editor .toastui-editor-defaultUI-toolbar button {
    margin: 4px;
  }

  .markdown-editor .toastui-editor-mode-switch,
  .markdown-editor .toastui-editor-mode-switch .tab-item {
    height: 40px;
    line-height: 40px;
  }

  .markdown-editor .toastui-editor-popup {
    max-width: calc(100vw - 4rem);
  }

  .markdown-editor .toastui-editor-popup button {
    min-height: 40px;
  }

  [data-bs-toggle="tooltip"]:not(a):not(button) {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
}
.markdown-editor .toastui-editor-contents {
  font-size: 1rem;
}

.thread-item--new {
  box-shadow: 0 0 0 2px var(--bs-warning);
}

/* Кнопки панели редактора — спрайты фиксированной ширины: сжатие ломает значки на телефоне. */
.markdown-editor .toastui-editor-toolbar-icons {
  flex: 0 0 auto;
}

/*
 * Подсказка-заглушка пустого редактора. Toast UI помечает её классом .placeholder, а у Bootstrap
 * это «скелет загрузки» — серая полоса с курсором ожидания. Возвращаем обычный серый текст.
 */
.markdown-editor .placeholder {
  display: inline;
  min-height: 0;
  vertical-align: baseline;
  cursor: text;
  background-color: transparent;
  opacity: 1;
}