@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&display=swap');

:root {
  --theme-bg: radial-gradient(circle at 15% 10%, #f2f6ff 0%, #e8eefc 35%, #dbe7fb 100%);
  --theme-surface: #ffffff;
  --theme-surface-soft: #f5f8ff;
  --theme-text: #1d2b45;
  --theme-muted: #4a5f84;
  --theme-primary: #0f4c81;
  --theme-primary-2: #1b6ca8;
  --theme-accent: #ff9f43;
  --theme-accent-2: #ffd166;
  --theme-border: #d5e2f7;
  --header-small-part: 38.2vh;
  --header-min: 180px;
  --header-max: 340px;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 901px) {
  html {
    overflow: hidden;
  }

  body {
    min-height: 100vh;
  }

  /* Schuetzt den App-Shell-Scroller gegen spaetere Body/Html-Overrides in Seiten-CSS */
  html,
  body,
  body > .golden-layout {
    overflow: hidden !important;
  }
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif !important;
  background: var(--theme-bg) !important;
  color: var(--theme-text);
  overflow: hidden;
}

body > header.site-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 1.6vw + 1rem, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f8fbff;
}

/* Einheitliches Cockpit-Branding fuer Seitenheader */
.brand-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  text-align: left;
  line-height: 1.05;
}

.brand-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: clamp(0.6rem, 0.5vw + 0.28rem, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff9f43 0%, #ffd166 100%);
  color: #1c1100;
  padding: 3px 11px 3px 9px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(255, 159, 67, 0.45), 0 0 0 1px rgba(255, 209, 102, 0.3);
  text-shadow: none;
}

.brand-main {
  font-size: clamp(1.55rem, 1.6vw + 1rem, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fbff;
}

.brand-context {
  font-size: clamp(1.4rem, 1.35vw + 0.82rem, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(240, 247, 255, 0.9);
}

.brand-title-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.brand-title-stacked .brand-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

body > header.site-header.site-header-index .brand-title-stacked .brand-line {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

body > header.site-header.site-header-index .brand-title-stacked .brand-context {
  margin-top: 2.8rem;
}

/* Reichhaltiger Header fuer Unterseiten */
body > header.site-header.site-header-rich,
body > header.site-header.site-header-index {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  background:
    linear-gradient(90deg, rgba(10, 34, 60, 0.96) 0 38.2%, rgba(18, 76, 129, 0.94) 38.2% 100%),
    radial-gradient(circle at 80% 30%, rgba(255, 209, 102, 0.32), transparent 55%);
}

body > header.site-header .header-top-row {
  display: grid;
  grid-template-columns: minmax(230px, 38.2%) minmax(0, 61.8%) auto;
  grid-template-areas: "brand main right";
  align-items: start;
  column-gap: clamp(12px, 1.6vw, 24px);
  row-gap: 6px;
}

body > header.site-header.site-header-index .header-top-row {
  display: grid;
  grid-template-columns: minmax(230px, 38.2%) minmax(0, 61.8%) auto;
  grid-template-areas: "brand main right";
  align-items: start;
  justify-content: initial;
  gap: 6px clamp(12px, 1.6vw, 24px);
}

body > header.site-header .header-left > h1 {
  grid-area: brand;
  margin: 0;
  white-space: nowrap;
}

body > header.site-header .header-left {
  width: min(38.2%, 520px);
  min-width: 230px;
}

body > header.site-header .header-main {
  grid-area: main;
}

body > header.site-header .header-main > .hero-tagline {
  margin: 0;
  padding-right: clamp(12px, 2vw, 20px);
}

body > header.site-header .header-right {
  grid-area: right;
  justify-self: end;
  align-self: start;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

body > header.site-header .session-line {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  color: rgba(240, 247, 255, 0.5);
  text-align: left;
  width: min(38.2%, 520px);
  min-width: 230px;
  white-space: nowrap;
}

body > header.site-header.site-header-index .session-line {
  width: min(38.2%, 520px);
  min-width: 230px;
}

body > header.site-header .scenario-tabs {
  margin-top: 8px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

body > header.site-header .scenario-tab {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(11, 40, 77, 0.28);
  color: rgba(240, 247, 255, 0.85);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

body > header.site-header .scenario-tab.is-active {
  background: linear-gradient(140deg, rgba(255, 209, 102, 0.24), rgba(255, 184, 77, 0.2));
  border-color: rgba(255, 209, 102, 0.65);
  color: #ffe8ae;
}

body > header.site-header .scenario-inline-label {
  color: rgba(255, 225, 159, 0.86);
  font-weight: 700;
}

body > header.site-header.site-header-rich .session-line strong {
  color: rgba(240, 247, 255, 0.75);
}

body > header.site-header.site-header-rich .hero-tagline,
body > header.site-header.site-header-index .hero-tagline {
  margin: 0;
}

body > header.site-header.site-header-rich .brand-title-stacked .brand-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

body > header.site-header.site-header-rich .brand-title-stacked .brand-main {
  display: block;
}

body > header.site-header.site-header-rich .brand-title-stacked .brand-context {
  position: static;
  margin-top: 2.8rem;
  max-width: min(38.2vw, 500px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body > header.site-header.site-header-rich .brand-title-stacked .brand-context.brand-context-long {
  font-size: clamp(0.78rem, 0.75vw + 0.28rem, 1.02rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-overflow: clip;
}

body > header.site-header .header-main .hero-tagline .hero-steps {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 4px;
  line-height: 1.3;
}

body > header.site-header .hero-steps > span {
  display: block !important;
  white-space: nowrap !important;
}

body > header.site-header .hero-steps .hero-arrow {
  display: none !important;
}

body > header.site-header .hero-steps .hero-verb-desc.hero-verb-desc-commit {
  margin-top: 8px !important;
  white-space: nowrap !important;
}

body > header.site-header.site-header-rich .hero-verb {
  font-size: clamp(1.05rem, 1.4vw + 0.45rem, 1.5rem);
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body > header.site-header.site-header-rich .hero-verb-desc {
  font-size: clamp(0.8rem, 0.7vw + 0.38rem, 0.98rem);
  color: rgba(240, 247, 255, 0.78);
  font-weight: 500;
}

body > header.site-header .hero-verb-desc.hero-verb-desc-commit {
  display: block;
  margin-top: 6px;
  margin-left: 0;
  font-size: clamp(1rem, 0.8vw + 0.55rem, 1.25rem);
  color: rgba(240, 247, 255, 0.88);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

body > header.site-header .hero-steps .hero-message-note {
  display: block;
  margin-top: 4px;
  font-size: clamp(0.92rem, 0.72vw + 0.5rem, 1.08rem);
  color: rgba(214, 226, 244, 0.78);
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

body > header.site-header.site-header-rich .hero-arrow {
  font-size: 1.3em;
  color: rgba(255, 209, 102, 0.5);
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 1200px) {
  body > header.site-header {
    position: relative;
  }

  body > header.site-header .header-top-row,
  body > header.site-header.site-header-index .header-top-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "main"
      "right";
  }

  body > header.site-header .header-main {
    width: 100%;
    min-width: 0;
  }

  body > header.site-header .header-main > .hero-tagline {
    padding-right: 0;
    width: 100%;
  }

  body > header.site-header .header-right {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 4;
    width: auto;
    justify-self: auto;
  }

  body > header.site-header .header-right .btn-logout {
    padding: 8px 12px;
    font-size: 0.9rem;
    line-height: 1.1;
  }

  body > header.site-header .hero-steps > span,
  body > header.site-header .hero-steps .hero-verb-desc,
  body > header.site-header .hero-steps .hero-message-note,
  body > header.site-header .hero-steps .hero-verb-desc.hero-verb-desc-commit {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 900px) {
  .brand-title {
    gap: 6px 10px;
  }

  body > header.site-header .header-top-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "main"
      "right";
  }

  body > header.site-header.site-header-index .header-top-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "main"
      "right";
  }

  body > header.site-header .header-right {
    justify-self: auto;
  }

  body > header.site-header.site-header-rich .brand-title-stacked .brand-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-height: 0;
  }

  body > header.site-header.site-header-rich .brand-title-stacked .brand-context {
    position: static;
    white-space: normal;
  }

  body > header.site-header .session-line {
    white-space: normal;
    width: 100%;
    min-width: 0;
  }

  body > header.site-header .hero-steps > span {
    white-space: normal !important;
  }

  body > header.site-header .hero-steps .hero-verb {
    white-space: nowrap !important;
  }

  body > header.site-header .hero-steps .hero-verb-desc {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body > header.site-header .hero-steps .hero-message-note {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body > header.site-header .hero-verb-desc.hero-verb-desc-commit {
    margin-left: 0;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    line-height: 1.25;
    max-width: 100%;
  }
}

body > header.site-header p {
  color: rgba(240, 247, 255, 0.92);
}

body > header.site-header .btn,
body > header.site-header .btn-back,
body > header.site-header .btn-logout {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.22), rgba(255, 159, 67, 0.3));
  color: #f8fbff;
  backdrop-filter: blur(4px);
}

#logoutBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 5000;
}

body > .golden-layout > .golden-layout-left .side-action-buttons .btn-energy-data,
body > .golden-layout > .golden-layout-left .side-menu-link.side-menu-link-accent {
  border-radius: 12px;
  border: 1px solid rgba(255, 209, 102, 0.42);
  background: linear-gradient(135deg, #ffd166, #ff9f43);
  color: #1c1100;
  box-shadow: 0 10px 24px rgba(255, 159, 67, 0.28);
}

body > .golden-layout > .golden-layout-left .side-action-buttons .btn-energy-data:hover,
body > .golden-layout > .golden-layout-left .side-menu-link.side-menu-link-accent:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

/* Mobile-Menü-Button standardmäßig ausblenden (nur in Mobile-Media-Query sichtbar) */
#nav-menu-toggle {
  display: none;
}

body > header.site-header .btn-back {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* Golden-ratio workspace split under the header */
body > .golden-layout {
  display: grid;
  grid-template-columns: minmax(220px, 38.2%) minmax(0, 61.8%);
  height: calc(100vh - clamp(var(--header-min), var(--header-small-part), var(--header-max)));
  min-height: 0;
}

body > .golden-layout > .golden-layout-left {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(20, 52, 87, 0.42), rgba(18, 45, 78, 0.58)),
    radial-gradient(circle at 30% 10%, rgba(64, 116, 174, 0.2), transparent 55%);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  padding: clamp(16px, 2.1vw, 30px);
}

body > .golden-layout > .golden-layout-left .side-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

body > .golden-layout > .golden-layout-left .side-action-buttons .btn-energy-data {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

body > .golden-layout > .golden-layout-left .side-menu {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body > .golden-layout > .golden-layout-left .side-menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  color: #f8fbff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(11, 40, 77, 0.45), rgba(18, 76, 129, 0.36));
  transition: transform 0.15s ease, filter 0.15s ease;
}

body > .golden-layout > .golden-layout-left .side-menu-link:hover {
  filter: brightness(1.08);
  transform: translateX(2px);
}

body > .golden-layout > .golden-layout-left .side-menu-link-session-start {
  margin-top: 0;
}

body > .golden-layout > .golden-layout-left .side-menu-link .menu-link-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: text-bottom;
  fill: currentColor;
}

body > .golden-layout > .golden-layout-left .side-menu.index-session-menu {
  margin-top: auto;
  margin-bottom: max(88px, calc(env(safe-area-inset-bottom, 0px) + 56px));
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #ffffff;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 1rem;
}

.grunddaten-modal-content {
  max-width: 900px;
}

.session-dialog-content {
  max-width: 520px;
}

.session-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.session-dialog-body p {
  margin: 0;
  color: #35507a;
  line-height: 1.45;
}

.session-dialog-label {
  display: block;
  font-weight: 700;
  color: #1f3d68;
}

.session-dialog-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd9ea;
  border-radius: 10px;
  font: inherit;
}

.session-dialog-input:focus {
  outline: none;
  border-color: #1b6ca8;
  box-shadow: 0 0 0 3px rgba(27, 108, 168, 0.14);
}

#grunddaten-preview-content,
#energiestatus-preview-content {
  max-height: 58vh;
  overflow-y: auto;
  text-align: left;
}

#grunddaten-preview-content section,
#grunddaten-preview-content h2,
#grunddaten-preview-content h3,
#grunddaten-preview-content h4,
#grunddaten-preview-content p,
#grunddaten-preview-content div,
#energiestatus-preview-content section,
#energiestatus-preview-content h2,
#energiestatus-preview-content h3,
#energiestatus-preview-content h4,
#energiestatus-preview-content p,
#energiestatus-preview-content div {
  text-align: left;
}

#grunddaten-preview-content table,
#energiestatus-preview-content table {
  margin-left: 0;
  margin-right: auto;
}

#grunddaten-preview-content th,
#grunddaten-preview-content td,
#energiestatus-preview-content th,
#energiestatus-preview-content td {
  text-align: left;
}

#grunddaten-preview-content th {
  text-align: left;
}

#grunddaten-preview-content td {
  text-align: right !important;
}

#grunddaten-preview-content table.kv-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

#grunddaten-preview-content table.kv-table th,
#grunddaten-preview-content table.kv-table td {
  border: 1px solid #dbe5f7;
  padding: 8px;
}

#grunddaten-preview-content table.kv-table th {
  width: 58%;
  text-align: left;
  background: #f3f7ff;
}

#grunddaten-preview-content table.kv-table td {
  width: 42%;
  text-align: right !important;
}

#grunddaten-preview-content .fahrzeug-container {
  margin-bottom: 16px;
  border: 1px solid #dbe5f7;
  border-radius: 8px;
  padding: 0;
}

#grunddaten-preview-content .fahrzeug-container h3 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #dbe5f7;
  background: #f3f7ff;
}

#grunddaten-preview-content .fahrzeug-property {
  display: grid;
  grid-template-columns: 58% 42%;
  gap: 0;
  align-items: center;
  border-bottom: 1px solid #dbe5f7;
  padding: 8px 10px;
}

#grunddaten-preview-content .fahrzeug-property:last-child {
  border-bottom: none;
}

#grunddaten-preview-content .fahrzeug-property strong {
  text-align: left !important;
}

#grunddaten-preview-content .fahrzeug-property span {
  text-align: right !important;
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #e7eefb;
  margin-top: 12px;
  padding-top: 12px;
}

body > .golden-layout > .golden-layout-right {
  background: rgba(255, 255, 255, 0.5);
  padding: clamp(16px, 2.1vw, 30px);
  overflow-y: auto;
  overflow-x: hidden;
}

body > .golden-layout > .golden-layout-right > .container,
body > .golden-layout > .golden-layout-right > main,
body > .golden-layout > .golden-layout-right > .login-container {
  margin-top: 0;
  margin-left: 0;
  margin-right: auto;
  width: min(100%, 1180px);
}

body > .golden-layout > .golden-layout-right > .mini-loader,
body > .golden-layout > .golden-layout-right > .druck-print-content,
body > .golden-layout > .golden-layout-right > .modal-overlay,
body > .golden-layout > .golden-layout-right > .data-modal,
body > .golden-layout > .golden-layout-right > .druckbereich-druck {
  margin-left: 0;
}

main,
.container,
.login-container {
  margin-top: 26px;
}

.container,
.login-box,
.card,
.form-group {
  border: 1px solid var(--theme-border);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(24, 52, 92, 0.12);
}

.btn,
.btn-primary,
.btn-action,
.btn-login,
.btn-refresh,
.btn-secondary,
.btn-print,
.btn-back,
.btn-logout {
  font-family: inherit;
  font-weight: 700;
}

@media (max-width: 900px) {
  body > header.site-header {
    min-height: clamp(96px, 18vh, 132px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 14px;
  }

  body > header.site-header .header-right {
    width: auto;
    display: flex;
    justify-content: flex-end;
  }

  body > .golden-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: calc(100dvh - clamp(96px, 18vh, 132px));
    min-height: 0;
  }

  body > .golden-layout > .golden-layout-left {
    display: block;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 10px;
    overflow-x: hidden;
  }

  body > .golden-layout > .golden-layout-left .side-action-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: thin;
  }

  body > .golden-layout > .golden-layout-left .side-action-buttons .btn-energy-data {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  body > .golden-layout > .golden-layout-left .side-menu {
    flex-direction: row;
    flex-wrap: nowrap;
    margin-top: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: thin;
  }

  body > .golden-layout > .golden-layout-left .side-menu-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
    max-width: 85vw;
  }

  body > .golden-layout > .golden-layout-left .side-menu.index-session-menu {
    margin: 0;
  }

  body > .golden-layout > .golden-layout-right {
    padding: 14px;
    background: rgba(255, 255, 255, 0.42);
  }

  .modal-actions-row {
    flex-direction: column;
  }

  .modal-actions-row .btn {
    width: 100%;
  }

  body > .golden-layout > .golden-layout-right > .container,
  body > .golden-layout > .golden-layout-right > main,
  body > .golden-layout > .golden-layout-right > .login-container {
    width: 100%;
  }
}

/* ── Mobiles Header-Layout (Smartphone) ─────────────────────────── */
@media (max-width: 600px) {
  /* Header kompakter machen */
  body > header.site-header {
    min-height: unset;
    padding: 10px 12px;
  }

  /* Nur Brand (links) + Button (rechts) in einer Zeile */
  body > header.site-header .header-top-row,
  body > header.site-header.site-header-index .header-top-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    /* Grid-Einstellungen überschreiben */
    grid-template-columns: unset;
    grid-template-areas: unset;
  }

  /* Mitte (Hero-Tagline) ausblenden */
  body > header.site-header .header-main {
    display: none;
  }

  /* Brand-Bereich: wächst, aber nicht zu groß */
  body > header.site-header .header-left {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  /* Session-Zeile ausblenden */
  body > header.site-header .session-line {
    display: none;
  }

  /* Reiter (Aktuell/Alternative) im Header rechts ausrichten */
  body > header.site-header .scenario-tabs {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    margin-left: 0;
    gap: 6px;
  }

  body > header.site-header .scenario-tab {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  /* Header-Right (Logout / Zurück-Button): inline neben Brand */
  body > header.site-header .header-right {
    position: static !important;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
  }

  /* Logout-Button: fixed-Positionierung aufheben */
  #logoutBtn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Zurück-Button auf Unterseiten ebenfalls kompakt */
  body > header.site-header .btn-back {
    padding: 8px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* Brand-Text-Größen auf Smartphone verkleinern */
  .brand-main,
  .logo-word {
    font-size: clamp(1.1rem, 5vw, 1.6rem) !important;
  }

  /* Bereichstext auf Handy ausblenden (z. B. "Meine Wohnsituation") */
  body > header.site-header.site-header-rich .brand-title-stacked .brand-context {
    display: none !important;
  }

  body > header.site-header.site-header-rich .brand-title-stacked .brand-line {
    gap: 0 !important;
  }

  .brand-chip,
  .logo-chip {
    font-size: clamp(0.55rem, 2.2vw, 0.72rem) !important;
  }

  body > header.site-header .hero-steps .hero-message-note {
    display: none !important;
  }

  /* ── Mobile Nav-Toggle Button ─────────────────────────────────── */
  #nav-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f8fbff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
  }

  #nav-menu-toggle:hover,
  #nav-menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
  }

  .nav-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
  }

  /* Menü-Inhalte standardmäßig einklappen */
  body > .golden-layout > .golden-layout-left .side-action-buttons,
  body > .golden-layout > .golden-layout-left .side-menu {
    display: none;
    flex-direction: column;
    margin-top: 6px;
  }

  /* Aufklappen wenn offen */
  body.nav-open > .golden-layout > .golden-layout-left .side-action-buttons,
  body.nav-open > .golden-layout > .golden-layout-left .side-menu {
    display: flex;
  }

  /* Links im aufgeklappten Zustand vertikal */
  body.nav-open > .golden-layout > .golden-layout-left .side-menu-link {
    display: block;
    flex: unset;
    white-space: normal;
    max-width: unset;
  }

  body.nav-open > .golden-layout > .golden-layout-left .side-action-buttons .btn-energy-data {
    flex: unset;
    width: 100%;
    white-space: normal;
  }
}
