.ssare-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 150px);
  gap: 14px;
  padding: 14px;
  box-sizing: border-box;
  background: #f5f7fb;
  font-family: Arial, sans-serif;
}

.ssare-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.ssare-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ssare-page-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1e2a3d;
}

.ssare-status-badge {
  background: #eef3ff;
  color: #264b96;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.ssare-topbar-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ssare-action-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  background: #e9edf5;
  color: #1f2b3d;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ssare-action-btn:hover,
.ssare-action-btn:focus {
  background: #dde5f0;
  outline: none;
}

.ssare-action-btn:active {
  transform: translateY(1px);
}

.ssare-action-btn.ssare-action-btn-primary {
  background: #2f66f3;
  color: #ffffff;
}

.ssare-action-btn.ssare-action-btn-primary:hover,
.ssare-action-btn.ssare-action-btn-primary:focus {
  background: #2857d0;
}

.ssare-action-btn.ssare-action-btn-success {
  background: #198754;
  color: #ffffff;
}

.ssare-action-btn.ssare-action-btn-success:hover,
.ssare-action-btn.ssare-action-btn-success:focus {
  background: #157347;
}

.ssare-editor-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px 1fr 420px;
  gap: 14px;
}

.ssare-left-nav,
.ssare-center-preview,
.ssare-right-editor,
.ssare-pdf-preview-bar {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.ssare-left-nav,
.ssare-center-preview,
.ssare-right-editor {
  min-height: 0;
  overflow: hidden;
}

.ssare-left-nav {
  padding: 14px;
}

.ssare-center-preview {
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.ssare-right-editor {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ssare-panel-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #3a4660;
  line-height: 1.2;
}

.ssare-editor-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a3d;
  line-height: 1.2;
}

.ssare-report-preview-host {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f3f5f8;
  border-radius: 12px;
  padding: 20px;
}

/* Vorschau-/Report-Styling */
.ssare-report-paper {
  width: 920px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.ssare-report-header {
  padding: 28px 34px;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border-bottom: 1px solid #e7ebf3;
}

.ssare-report-header h1 {
  margin: 0 0 6px 0;
  font-size: 28px;
  line-height: 1.2;
  color: #1e2a3d;
}

.ssare-report-header p {
  margin: 0;
  color: #5a6478;
  line-height: 1.5;
}

.ssare-report-section {
  padding: 24px 34px;
  border-bottom: 1px solid #eef1f5;
}

.ssare-report-section h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  line-height: 1.25;
  color: #22314d;
}

.ssare-report-section p:last-child,
.ssare-report-section ul:last-child,
.ssare-report-section ol:last-child {
  margin-bottom: 0;
}

.ssare-report-footer {
  padding: 20px 34px;
  background: #f9fbfd;
  color: #617089;
  font-size: 13px;
  line-height: 1.5;
}

.ssare-editor-actions {
  padding-top: 8px;
}

.ssare-right-editor #editorHost {
  flex: 1;
  min-height: 420px;
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
}

.ssare-pdf-preview-bar {
  padding: 14px;
  height: 260px;
}



/* Navigation im linken Bereich etwas robuster */
.ssare-left-nav #navSections {
  min-height: 80px;
}

/* Toolbar-Bereich sauber halten */
.ssare-right-editor #editorToolbar {
  min-height: 40px;
}

/* Responsive */
@media (max-width: 1399.98px) {
  .ssare-editor-layout {
    grid-template-columns: 220px 1fr 360px;
  }
}

@media (max-width: 1199.98px) {
  .ssare-shell {
    min-height: auto;
  }

  .ssare-editor-layout {
    grid-template-columns: 1fr;
  }

  .ssare-left-nav,
  .ssare-center-preview,
  .ssare-right-editor {
    min-height: auto;
  }

  .ssare-right-editor #editorHost {
    min-height: 320px;
  }

  .ssare-pdf-preview-bar {
    height: 320px;
  }
}

@media (max-width: 767.98px) {
  .ssare-shell {
    padding: 10px;
    gap: 10px;
  }

  .ssare-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .ssare-topbar-left {
    flex-wrap: wrap;
  }

  .ssare-topbar-right {
    width: 100%;
  }

  .ssare-action-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .ssare-left-nav,
  .ssare-center-preview,
  .ssare-right-editor,
  .ssare-pdf-preview-bar {
    border-radius: 12px;
  }

  .ssare-left-nav,
  .ssare-center-preview,
  .ssare-right-editor,
  .ssare-pdf-preview-bar {
    padding: 12px;
  }

  .ssare-report-preview-host {
    padding: 12px;
  }

  .ssare-report-header,
  .ssare-report-section,
  .ssare-report-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ssare-report-header h1 {
    font-size: 24px;
  }

  .ssare-report-section h2 {
    font-size: 18px;
  }
}

.ssare-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ssare-nav-list li {
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: 8px;
  cursor: pointer;
  background: #f7f9fc;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.ssare-nav-list li:hover {
  background: #eef3fb;
}

.ssare-nav-list li.active {
  background: #e3edff;
  border-color: #c7d8ff;
  font-weight: 600;
}

/* Container */
#navSections,
#navSections ul {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

/* einzelne Einträge */
#navSections li {
  list-style: none !important;
  margin: 0 0 6px 0;
  padding: 0;
}

/* klickbarer Inhalt */
#navSections li,
#navSections li a,
#navSections li span,
#navSections .list-group-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  background: #f7f9fc;
  border: 1px solid transparent;
  color: #1e2a3d;
  text-decoration: none;
}

/* Hover */
#navSections li:hover,
#navSections li a:hover,
#navSections .list-group-item:hover {
  background: #eef3fb;
}

/* aktiv */
#navSections li.active,
#navSections li.active a,
#navSections .list-group-item.active {
  background: #e3edff;
  border-color: #c7d8ff;
  font-weight: 600;
}

.ssare-editor-shell {
  display: flex;
  height: 100%;
}

.ssare-left-nav {
  width: 280px;
  display: flex;
  flex-direction: column;
}

#navSections {
  flex: 1;
  overflow-y: auto;
}

#navSections {
  user-select: none;
}

#editorHost {
  flex: 1;
  min-height: 420px;
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
  padding: 14px;
  box-sizing: border-box;
  line-height: 1.5;
}

#editorHost:focus {
  outline: none;
  border-color: #9db7ff;
  box-shadow: 0 0 0 3px rgba(47, 102, 243, 0.10);
}

#editorHost h1,
#editorHost h2,
#editorHost h3,
#editorHost h4 {
  margin-top: 0;
}

#editorHost p:first-child,
#editorHost ul:first-child,
#editorHost ol:first-child,
#editorHost div:first-child,
#editorHost h1:first-child,
#editorHost h2:first-child,
#editorHost h3:first-child {
  margin-top: 0;
}

.ssare-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 150px);
  gap: 14px;
  padding: 14px;
  box-sizing: border-box;
  background: #f5f7fb;
  font-family: Arial, sans-serif;
}

.ssare-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.ssare-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ssare-page-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1e2a3d;
}

.ssare-status-badge {
  background: #eef3ff;
  color: #264b96;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.ssare-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ssare-view-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  background: #f3f6fb;
  border-radius: 12px;
}

.ssare-action-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  background: #e9edf5;
  color: #1f2b3d;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ssare-action-btn:hover,
.ssare-action-btn:focus {
  background: #dde5f0;
  outline: none;
}

.ssare-action-btn:active {
  transform: translateY(1px);
}

.ssare-action-btn.ssare-action-btn-primary {
  background: #2f66f3;
  color: #ffffff;
}

.ssare-action-btn.ssare-action-btn-primary:hover,
.ssare-action-btn.ssare-action-btn-primary:focus {
  background: #2857d0;
}

.ssare-action-btn.ssare-action-btn-success {
  background: #198754;
  color: #ffffff;
}

.ssare-action-btn.ssare-action-btn-success:hover,
.ssare-action-btn.ssare-action-btn-success:focus {
  background: #157347;
}

.ssare-view-btn {
  background: transparent;
  color: #324159;
}

.ssare-view-btn.is-active {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  color: #1e2a3d;
  font-weight: 700;
}





.ssare-editor-layout {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: stretch;
}

.ssare-left-nav,
.ssare-center-preview,
.ssare-right-editor,
.ssare-pdf-preview-panel {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  min-height: 0;
}

.ssare-left-nav,
.ssare-center-preview,
.ssare-right-editor {
  overflow: hidden;
}

.ssare-left-nav {
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ssare-center-preview {
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ssare-right-editor {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ssare-panel-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #3a4660;
  line-height: 1.2;
}

.ssare-editor-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a3d;
  line-height: 1.2;
}

.ssare-report-preview-host {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f3f5f8;
  border-radius: 12px;
  padding: 20px;
}

.ssare-report-paper {
  width: 920px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.ssare-report-header {
  padding: 28px 34px;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border-bottom: 1px solid #e7ebf3;
}

.ssare-report-header h1 {
  margin: 0 0 6px 0;
  font-size: 28px;
  line-height: 1.2;
  color: #1e2a3d;
}

.ssare-report-header p {
  margin: 0;
  color: #5a6478;
  line-height: 1.5;
}

.ssare-report-section {
  padding: 24px 34px;
  border-bottom: 1px solid #eef1f5;
}

.ssare-report-section h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  line-height: 1.25;
  color: #22314d;
}

.ssare-report-section p:last-child,
.ssare-report-section ul:last-child,
.ssare-report-section ol:last-child {
  margin-bottom: 0;
}

.ssare-report-footer {
  padding: 20px 34px;
  background: #f9fbfd;
  color: #617089;
  font-size: 13px;
  line-height: 1.5;
}

.ssare-editor-actions {
  padding-top: 8px;
}

#editorToolbar {
  min-height: 40px;
}

#editorHost {
  flex: 1;
  min-height: 420px;
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
  padding: 14px;
  box-sizing: border-box;
  line-height: 1.5;
}

#editorHost:focus {
  outline: none;
  border-color: #9db7ff;
  box-shadow: 0 0 0 3px rgba(47, 102, 243, 0.10);
}

#navSections,
#navSections ul {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

#navSections {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
}

#navSections li {
  list-style: none !important;
  margin: 0 0 6px 0;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  background: #f7f9fc;
  border: 1px solid transparent;
  color: #1e2a3d;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#navSections li:hover {
  background: #eef3fb;
}

#navSections li.active {
  background: #e3edff;
  border-color: #c7d8ff;
  font-weight: 600;
}







@media (max-width: 1399.98px) {
  .ssare-editor-layout {
    grid-template-columns: 220px minmax(0, 1fr) 340px;
  }
}

@media (max-width: 1199.98px) {
  .ssare-shell {
    min-height: auto;
  }

  

  .ssare-editor-layout {
    grid-template-columns: 1fr;
  }

  .ssare-left-nav,
  .ssare-center-preview,
  .ssare-right-editor,
  .ssare-pdf-preview-panel {
    min-height: auto;
  }

  #editorHost {
    min-height: 320px;
  }

  
}

@media (max-width: 767.98px) {
  .ssare-shell {
    padding: 10px;
    gap: 10px;
  }

  .ssare-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .ssare-topbar-left {
    flex-wrap: wrap;
  }

  .ssare-topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .ssare-action-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .ssare-left-nav,
  .ssare-center-preview,
  .ssare-right-editor,
  .ssare-pdf-preview-panel {
    border-radius: 12px;
    padding: 12px;
  }

  .ssare-report-preview-host {
    padding: 12px;
  }

  .ssare-report-header,
  .ssare-report-section,
  .ssare-report-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ssare-report-header h1 {
    font-size: 24px;
  }

  .ssare-report-section h2 {
    font-size: 18px;
  }
}

.ssare-editor-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: stretch;
}

.ssare-left-nav,
.ssare-center-preview,
.ssare-right-editor {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ganz wichtig gegen optisches "Reinschieben" */
.ssare-left-nav {
  overflow: hidden;
}

.ssare-center-preview {
  overflow: hidden;
}

/* linke Navigation innen sauber halten */
#navSections {
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Listeneinträge dürfen nicht über die Karte hinausragen */
#navSections li {
  margin: 0 0 6px 0;
  width: 100%;
  box-sizing: border-box;
}

.ssare-editor-layout { gap: 16px; }

.ssare-left-nav,
.ssare-center-preview,
.ssare-right-editor {
  min-width: 0;
  box-sizing: border-box;
}

#navSections li {
  width: 100%;
  box-sizing: border-box;
}

.ssare-view-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  background: #f3f6fb;
  border-radius: 12px;
}

.ssare-view-btn {
  background: transparent;
  color: #324159;
}

.ssare-view-btn.is-active {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  color: #1e2a3d;
  font-weight: 700;
}









.ssare-hidden {
  display: none !important;
}

/* Overlay ohne Blur für PDF-Prozess */
.startup-loading-overlay.no-blur .startup-loading-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

.ssare-hidden {
  display: none !important;
}

.startup-loading-overlay.no-blur .startup-loading-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.72) !important;
}


.ssare-hidden {
  display: none !important;
}

/* ============================================================
   SchaefSache AdminReportEditor – aktive View / Kunden-PDF
   Verbindliche Regeln.
   Diese Regeln ersetzen die früheren mehrfach vorhandenen
   .ssare-main-view / .ssare-pdf-* Definitionen.
   ============================================================ */

.ssare-main-view {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

/*
  !important ist hier bewusst gesetzt, weil ufrm_adminpreresult.html
  zusätzlich eine lokale .ssare-main-view.is-active-Regel enthält.
  Damit bleibt die View unabhängig von der Lade-Reihenfolge Flexbox.
*/
.ssare-main-view.is-active {
  display: flex !important;
}

.ssare-pdf-view {
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: max(520px, calc(100vh - 360px));
  box-sizing: border-box;
}

.ssare-pdf-view.is-active {
  display: flex !important;
  flex-direction: column;
}

.ssare-pdf-preview-panel {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.ssare-pdf-preview-panel > .ssare-panel-title {
  flex: 0 0 auto;
}

.ssare-pdf-frame {
  display: block;
  flex: 1 1 auto;

  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 480px;

  border: 0;
  border-radius: 10px;
  background: #f5f7fb;
  box-sizing: border-box;
}

@media (max-width: 1199.98px) {
  .ssare-pdf-view {
    min-height: 560px;
  }

  .ssare-pdf-frame {
    min-height: 520px;
  }
}

@media (max-width: 767.98px) {
  .ssare-pdf-view {
    min-height: 520px;
  }

  .ssare-pdf-preview-panel {
    padding: 12px;
  }

  .ssare-pdf-frame {
    min-height: 480px;
  }
}
