/* Панель inline-редактирования (только ADMIN на публичных страницах) */
.page-admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.06);
}
.page-admin-bar--sticky {
  position: sticky;
  top: 58px;
  z-index: 40;
  margin: 0 0 14px;
  border-radius: 12px;
  background: rgba(2, 12, 8, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.page-admin-bar--hint {
  border-style: solid;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.2);
}
.page-admin-hint-text {
  font-size: 0.82rem;
  color: #fde68a;
  line-height: 1.4;
}
.page-admin-bar-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  margin-right: 4px;
}
.page-admin-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #ecfdf5;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}
.page-admin-btn:hover {
  background: rgba(34, 197, 94, 0.22);
}
.page-admin-btn--ghost {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.55);
  color: #cbd5e1;
}
.page-admin-edit-chip {
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}
.page-admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(2, 6, 23, 0.82);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 32px;
  overflow-y: auto;
}
.page-admin-modal {
  width: min(920px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
  padding: 16px 18px 18px;
}
.page-admin-modal h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.page-admin-modal .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 640px) {
  .page-admin-modal .grid2 {
    grid-template-columns: 1fr;
  }
}
.page-admin-modal label {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 4px;
}
.page-admin-modal input[type="text"],
.page-admin-modal textarea,
.page-admin-modal select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #020617;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.88rem;
}
.page-admin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.page-admin-msg {
  margin-top: 8px;
  font-size: 0.88rem;
}
.page-admin-msg.ok {
  color: #4ade80;
}
.page-admin-msg.err {
  color: #f87171;
}
.page-admin-modal .rich-editor-host {
  margin-top: 6px;
}
.page-admin-modal .rich-editor {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  overflow: hidden;
  background: #020617;
}
.page-admin-modal .rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.85);
}
.page-admin-modal .rich-editor-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.page-admin-modal .rich-editor-surface {
  min-height: 260px;
  padding: 12px 14px;
  outline: none;
  color: #e5e7eb;
  font-size: 0.9rem;
}
.page-admin-modal .rich-editor-surface:empty:before {
  content: attr(data-placeholder);
  color: #64748b;
}
.page-admin-modal .rich-editor-hidden {
  display: none;
}
.news-post-body.cms-prose {
  white-space: normal;
}

/* Обучение: карандаш и inline BBCode */
.training-admin-hint {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.06);
  font-size: 0.82rem;
  color: #86efac;
  text-align: center;
}
.page-admin-edit-chip--float {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 24;
  margin: 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}
.training-article-details.training-has-edit-pencil {
  overflow: visible;
}
.training-article-details.training-has-edit-pencil > summary {
  padding-right: 3.25rem;
}
.training-article-details,
.training-video-shell,
#training-static-basics,
#training-cms-basics,
#manifest-static-petition,
#manifest-cms-petition,
#manifest-static-step,
#manifest-cms-step,
.news-post,
#detail-wrap.is-open,
.mcard {
  position: relative;
}
.training-inline-edit {
  margin: 12px 0 20px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(2, 12, 8, 0.92);
  text-align: left;
}
.training-inline-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.training-inline-meta label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #86efac;
}
.training-inline-meta input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.85);
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.88rem;
}
.training-inline-lead {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #94a3b8;
}
.training-inline-edit .rich-editor-host {
  margin-bottom: 10px;
}
.training-inline-edit .rich-editor {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
}
.training-inline-edit .rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.9);
}
.training-inline-edit .rich-editor-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
}
.training-inline-edit .rich-editor-surface {
  min-height: 280px;
  padding: 12px 14px;
  outline: none;
  color: #e5e7eb;
  font-size: 0.9rem;
  text-align: left;
}
.training-inline-edit .rich-editor-surface:empty:before {
  content: attr(data-placeholder);
  color: #64748b;
}
.training-inline-edit .rich-editor-hidden {
  display: none;
}
.training-inline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.training-inline-st {
  font-size: 0.8rem;
  color: #94a3b8;
}
.training-inline-st-ok {
  color: #86efac;
}
.training-inline-st-err {
  color: #fca5a5;
}
.bbcode-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}
.bbcode-editor-toolbar .btn {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}
.bbcode-editor-toolbar .bbcode-tb-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-right: 2px;
}
.bbcode-editor-toolbar .bbcode-tb-sep {
  width: 1px;
  height: 22px;
  background: rgba(148, 163, 184, 0.25);
  margin: 0 4px;
}
.bbcode-editor-toolbar select {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.85);
  color: #e5e7eb;
  font-size: 0.78rem;
}
