:root {
  --gap: 14px;
  --radius: 14px;
  --page-bg: #eef3f9;
  --card-bg: #ffffff;
  --sidebar-head: #eaf2ff; /* ähnlich wie im Screenshot */
  --border: #dee6f3;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  background-image: url("/images/body.png");
}

/* Abstand zwischen den Bereichen */
.layout-wrap {
  flex: 1 1 auto;
  align-items: stretch;
  align-content: flex-start;
  min-height: 0;
  gap: var(--gap);
  padding: var(--gap);
}

@media (min-width: 992px) {
  .layout-wrap {
    flex-wrap: nowrap;
  }
}

/* Standard-Box-Stil für alle Bereiche */
.ui-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Content soll IMMER bis unten gehen */
.content-fill {
  flex: 1 1 auto;
  min-height: 100%;
}

aside.content-fill {
  min-height: 100%;
}

.sidebar-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.list-group-item, .list-group-item.active {
  border-radius: 0 0 12px 12px !important;
}

.sidebar-section + .sidebar-section {
  margin-top: 12px;
}

.sidebar-section .section-title {
  background: var(--sidebar-head);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border-radius: 12px 12px 0 0;
}

.sidebar-section .list-group-item {
  border: 0;
  border-top: 1px solid rgba(222, 230, 243, 0.8);
  padding: 0.55rem 0.85rem;
  font-size: 0.93rem;
}

.sidebar-section .list-group-item:first-child {
  border-top: 0;
}

.sidebar-section a {
  text-decoration: none;
}

.sidebar-section .bi {
  color: #1e6bd6;
}

/* Optional: Sidebar sticky unterhalb Navbar, wenn du scrollst */
.sticky-col {
  position: sticky;
  top: calc(var(--gap) + 56px); /* grob Navbar-Höhe + gap */
}

/* Footer "klebt" unten: wird durch flex layout erreicht */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 1 auto; /* schiebt Footer nach unten */
  display: flex;
  flex-direction: column;
  min-height: 0;
}

main > .container-fluid {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ck-editor .ck-editor__editable_inline {
  min-height: var(--editor-height, 240px) !important;
}

.ck-content,
.rich-content {
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-word;
}

.ck-content p,
.rich-content p {
  margin: 0 0 1rem;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  line-height: 1.3;
  margin: 1.1rem 0 0.6rem;
}

.ck-content ul,
.ck-content ol,
.rich-content ul,
.rich-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.ck-content blockquote,
.rich-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--border);
  background: #f8fbff;
}

.ck-content table,
.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.ck-content th,
.ck-content td,
.rich-content th,
.rich-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
}

.ck-content pre,
.rich-content pre {
  margin: 1rem 0;
  border-radius: 8px;
  overflow: auto;
}

.ck-content pre code,
.rich-content pre code {
  display: block;
  padding: 1rem;
}


@media (max-width: 991.98px) {
  .buttons-offcanvas {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.snippet-title {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #000;
  font-weight: lighter;
  font-size: 20px;
  margin: 30px 0;
}

.snippet-title::before,
.snippet-title::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ccc;
  margin: 0 10px;
}

code.hljs {
  padding: 0 !important;
  margin: 0 !important;
}

pre {
  border-radius: 8px !important;
}